From 1a077109610d65db7318e981833b42285237a205 Mon Sep 17 00:00:00 2001
From: Christopher Pietsch <cpietsch@gmail.com>
Date: Tue, 24 Sep 2019 14:36:41 +0200
Subject: [PATCH] update pixi and various bug fixes

---
 css/style.css            |     2 +-
 index.html               |     3 +
 js/canvas.js             |   169 +-
 js/loader.js             |     8 +
 js/pixi-packer-parser.js |    10 +-
 js/pixi.js               | 43644 +++++++++++++++++++++++++++++++++++++
 js/pixi.js.map           |     1 +
 js/pixi.min.5.js         |     9 +
 js/utils.js              |     5 +-
 js/viz.js                |    34 +-
 10 files changed, 43797 insertions(+), 88 deletions(-)
 create mode 100644 js/pixi.js
 create mode 100644 js/pixi.js.map
 create mode 100644 js/pixi.min.5.js

diff --git a/css/style.css b/css/style.css
index 2a99919..1b909dc 100644
--- a/css/style.css
+++ b/css/style.css
@@ -694,7 +694,7 @@ svg {
     position: absolute;
     width: 520px;
     color: #2D2D2D;
-    background: rgb(255, 254, 250);
+    
     /* background: url("img/koenigspapier.png"); */
     /* font-size: 13px; */
     line-height: 1.3em;
diff --git a/index.html b/index.html
index 809ac77..84eaa04 100644
--- a/index.html
+++ b/index.html
@@ -118,6 +118,9 @@ cpietsch@gmail.com
 								<span v-else-if="entry.type === 'markdown'">
 									<span v-html="getContent(entry)"></span>
 								</span>
+								<span v-else-if="entry.type === 'function'">
+									<span v-html="getContent(entry)"></span>
+								</span>
 								<span v-else>
 									{{ getContent(entry) }}
 								</span>
diff --git a/js/canvas.js b/js/canvas.js
index fa0f108..c001d4c 100644
--- a/js/canvas.js
+++ b/js/canvas.js
@@ -40,7 +40,7 @@ function Canvas() {
 
     var quadtree;
 
-    var maxZoomLevel = utils.isMobile() ? 5000 : 2500;
+    var maxZoomLevel = utils.isMobile() ? 400 : 800;
 
     var zoom = d3.behavior.zoom()
         .scaleExtent([1, maxZoomLevel])
@@ -90,7 +90,7 @@ function Canvas() {
     };
 
     var zoomedToImage = false;
-    var zoomedToImageScale = 117;
+    var zoomedToImageScale = 30;
     var zoomBarrier = 2;
 
     var startTranslate = [0, 0];
@@ -104,6 +104,8 @@ function Canvas() {
     var tsne = []
     var tsneIndex = {}
 
+    var scaleFactor = 0.9
+
     function canvas() {}
 
     canvas.rangeBand = function () {
@@ -161,7 +163,7 @@ function Canvas() {
         timeline.rescale(scale1)
 
         cursorCutoff =  1/scale1 * imageSize * 0.48
-        zoomedToImageScale = 0.8 / (x.rangeBand() / collumns / width)
+        zoomedToImageScale = 0.3 / (x.rangeBand() / collumns / width)
         // console.log("zoomedToImageScale", zoomedToImageScale)
     }
 
@@ -184,9 +186,11 @@ function Canvas() {
 
         var renderOptions = {
             resolution: 1,
-            antialiasing: false
+            antialiasing: false,
+            width: width + margin.left + margin.right,
+            height: height
         };
-        renderer = new PIXI.WebGLRenderer(width + margin.left + margin.right, height, renderOptions);
+        renderer = new PIXI.WebGLRenderer(renderOptions);
         renderer.backgroundColor = parseInt(config.style.canvasBackground.substring(1), 16)
         window.renderer = renderer;
 
@@ -239,8 +243,8 @@ function Canvas() {
             sprite.anchor.x = 0.5;
             sprite.anchor.y = 0.5;
 
-            sprite.scale.x = d.scaleFactor;
-            sprite.scale.y = d.scaleFactor;
+            sprite.scale.x = scaleFactor;
+            sprite.scale.y = scaleFactor;
 
             sprite._data = d;
             d.sprite = sprite;
@@ -270,23 +274,25 @@ function Canvas() {
             })
             .on("click", function () {
                 console.log("click");
-                if (spriteClick) {
-                    spriteClick = false;
-                    return;
-                }
+                // if (spriteClick) {
+                //     spriteClick = false;
+                //     return;
+                // }
 
-                if (selectedImage && !selectedImage.id) return;
+                // if (selectedImage && !selectedImage.id) return;
                 if (drag) return;
-                if (selectedImageDistance > cursorCutoff) return;
-                if (selectedImage && !selectedImage.active) return;
+                // if (selectedImageDistance > cursorCutoff) return;
+                // if (selectedImage && !selectedImage.active) return;
                 if (timelineHover) return;
                 // console.log(selectedImage)
 
-                if (Math.abs(zoomedToImageScale - scale) < 0.1) {
-                    canvas.resetZoom();
-                } else {
-                    zoomToImage(selectedImage, 1400 / Math.sqrt(Math.sqrt(scale)));
-                }
+                // if (Math.abs(zoomedToImageScale - scale) < 0.1) {
+                //     canvas.resetZoom();
+                // } else {
+                //     zoomToImage(selectedImage, 1400 / Math.sqrt(Math.sqrt(scale)));
+                // }
+                console.log("zoom to ")
+                zoomToImage(selectedImage, 1400 / Math.sqrt(Math.sqrt(scale)));
 
             })
 
@@ -324,6 +330,10 @@ function Canvas() {
             ]
         })
 
+        data.forEach(d => {
+            d.active = tsneIndex[d.id] !== undefined
+        })
+
         console.timeEnd("tsne")
     }
 
@@ -344,12 +354,8 @@ function Canvas() {
         selectedImageDistance = best.d;
         // console.log(cursorCutoff,scale, scale1,  selectedImageDistance)
 
-        if (bottomZooming && best.p && best.p.ii < 3 && selectedImageDistance > 7) {
-            selectedImage = null;
-            zoom.center(null);
-            container.style("cursor", "default");
-        } else {
-            if (best.p && !zoomedToImage) {
+        
+            if (best.p) {
                 var d = best.p;
                 var center = [((d.x + imgPadding) * scale) + translate[0], (height + d.y + imgPadding) * scale + translate[1]];
                 zoom.center(center);
@@ -359,8 +365,7 @@ function Canvas() {
             container.style("cursor", function () {
                 return ((selectedImageDistance < cursorCutoff) && selectedImage.active) ? "pointer" : "default";
             });
-        }
-
+        
     }
 
 
@@ -376,7 +381,7 @@ function Canvas() {
             var startX = x(year.key);
             var total = year.values.length;
             year.values.sort(function (a, b) {
-                return b.keywords.length - a.keywords.length;
+                return b._layerId - a._layerId;
             })
 
             year.values.forEach(function (d, i) {
@@ -389,6 +394,8 @@ function Canvas() {
                 d.x1 = d.x * scale1 + imageSize / 2;
                 d.y1 = d.y * scale1 + imageSize / 2;
 
+                d.sprite.scale.x = d.sprite.scale.y = scaleFactor
+
                 if (d.sprite.position.x == 0) {
                     d.sprite.position.x = d.x1;
                     d.sprite.position.y = d.y1;
@@ -440,7 +447,10 @@ function Canvas() {
                 sleep = false;
             }
 
-            d.sprite.visible = d.sprite.alpha > 0.1;
+            d.sprite.visible = d.visible && d.sprite.alpha > 0.1;
+
+            // d.sprite.visible = d.visible;
+
 
             if (d.sprite2) {
                 diff = (d.alpha2 - d.sprite2.alpha);
@@ -494,8 +504,10 @@ function Canvas() {
         d3.select(".tagcloud").classed("hide", true);
         var padding = x.rangeBand() / collumns / 2;
         var sidbar = width / 8;
-        var scale = 0.8 / (x.rangeBand() / collumns / width);
-        var translateNow = [(-scale * (d.x - padding / 2)) - sidbar, -scale * (height + d.y)];
+        var scale = 0.3 / (x.rangeBand() / collumns / width);
+        var translateNow = [(-scale * d.x) - sidbar + width/2 - imageSize/2, (-scale * (height + d.y)) + height/4];
+
+        console.log(translateNow, width, scale, d.x)
 
         zoomedToImageScale = scale;
 
@@ -554,6 +566,7 @@ function Canvas() {
 
 
     function hideTheRest(d) {
+        return;
         data.forEach(function (d2) {
             if (d2.id !== d.id) {
                 d2.alpha = 0;
@@ -636,12 +649,14 @@ function Canvas() {
         startTranslate = false;
         drag = false
         startScale = scale;
+        sleep = false
     }
 
     function zoomend(d) {
         drag = startTranslate && translate !== startTranslate;
         zooming = false;
         filterVisible();
+        sleep = false
 
         if (zoomedToImage && !selectedImage.big && state.lastZoomed != selectedImage.id && !state.zoomingToImage) {
             loadBigImage(selectedImage, "zoom");
@@ -664,8 +679,10 @@ function Canvas() {
     canvas.project = function () {
         sleep = false
         if (state.mode == "tsne") {
+            scaleFactor = 0.5
             canvas.projectTSNE();
         } else {
+            scaleFactor = 0.9
             canvas.split();
         }
         canvas.resetZoom();
@@ -717,6 +734,8 @@ function Canvas() {
             d.x1 = d.x * scale1 + imageSize / 2;
             d.y1 = d.y * scale1 + imageSize / 2;
 
+            d.sprite.scale.x = d.sprite.scale.y = scaleFactor
+
             if (d.sprite.position.x == 0) {
                 d.sprite.position.x = d.x1;
                 d.sprite.position.y = d.y1;
@@ -742,13 +761,13 @@ function Canvas() {
             return d.y;
         });
 
-        var y = -extent[1] - bottomPadding;
-        y = (extent[1] / -3) - bottomPadding
+        var y = -extent[1]*2 -height -extent[0]/4;
+        // y = (extent[1] / -1.5) - bottomPadding
 
         vizContainer
             .call(zoom.translate(translate).event)
             .transition().duration(duration)
-            .call(zoom.translate([0, y]).scale(1).event)
+            .call(zoom.translate([-width/2, y]).scale(2).event)
     }
 
     canvas.split = function () {
@@ -771,10 +790,10 @@ function Canvas() {
             var p = d.sprite.position;
             var x = (p.x / scale1) + translate[0] / zoomScale;
             var y = ((p.y / scale1) + (translate[1]) / zoomScale);
-            var padding = 5;
+            var padding = (width/3) / scale;
 
             if (x > (-padding) && x < ((width / zoomScale) + padding) && y + height < (height / zoomScale + padding) && y > (height * -1) - padding) {
-                d.visible = true;
+                d.visible = true;              
             } else {
                 d.visible = false;
             }
@@ -784,17 +803,22 @@ function Canvas() {
             return d.visible;
         });
 
-        if (visible.length < 40) {
+        console.log(visible.length)
+
+        if (visible.length < 200) {
             data.forEach(function (d) {
-                if (d.visible && d.loaded && d.active) d.alpha2 = 1;
+                if (d.visible && d.loaded && d.active) {d.alpha2 = 1 }
                 else if (d.visible && !d.loaded && d.active) loadImagesCue.push(d);
-                else d.alpha2 = 0;
-            })
-        } else {
-            data.forEach(function (d) {
-                d.alpha2 = 0;
+                else {d.alpha2 = 0}
             })
-        }
+        } 
+        // else {
+        //     data.forEach(function (d) {
+        //         d.alpha2 = 0;
+        //         // d.alpha = 1
+        //         d.visible = true;
+        //     })
+        // }
     }
 
     function loadMiddleImage(d) {
@@ -805,18 +829,19 @@ function Canvas() {
 
         // console.log("load", d)
         var url = config.loader.textures.detail.url + d.id + '.jpg'
-        var texture = new PIXI.Texture.fromImage(url, true)
+        var texture = new PIXI.Texture.fromImage(url)
         var sprite = new PIXI.Sprite(texture);
 
         var update = function () {
             sleep = false
+            d.visible = false
         }
 
         sprite.on('added', update)
         texture.once('update', update)
 
-        sprite.scale.x = d.scaleFactor;
-        sprite.scale.y = d.scaleFactor;
+        sprite.scale.x = scaleFactor;
+        sprite.scale.y = scaleFactor;
 
         sprite.anchor.x = 0.5;
         sprite.anchor.y = 0.5;
@@ -840,41 +865,21 @@ function Canvas() {
         var page = d.page ? '_' + d.page : ''
         var url = config.loader.textures.big.url + d.id + page + ".jpg";
 
-        var texture = new PIXI.Texture.fromImage(url, true)
+        console.log(url)
+
+        var texture = new PIXI.Texture.from(url)
         var sprite = new PIXI.Sprite(texture);
         var res = config.loader.textures.big.size
 
         var updateSize = function () {
             var size = Math.max(texture.width, texture.height)
-            sprite.scale.x = sprite.scale.y = (imageSize3 / size) * d.scaleFactor;
+            sprite.scale.x = sprite.scale.y = (imageSize3 / size) * scaleFactor;
             sleep = false
         }
 
         sprite.on('added', updateSize)
         texture.once('update', updateSize)
 
-        if (d.imagenum) {
-            sprite.on("mousemove", function (s) {
-                var pos = s.data.getLocalPosition(s.currentTarget)
-                s.currentTarget.cursor = pos.x > 0 ? "e-resize" : "w-resize"
-            })
-            sprite.on("click", function (s) {
-                if (drag) return
-
-                s.stopPropagation()
-                spriteClick = true
-                var pos = s.data.getLocalPosition(s.currentTarget)
-                var dir = pos.x > 0 ? 1 : -1
-                var page = d.page + dir
-                var nextPage = page
-                if (page > d.imagenum - 1) nextPage = 0
-                if (page < 0) nextPage = d.imagenum - 1
-
-                canvas.changePage(d.id, nextPage)
-            })
-            sprite.interactive = true;
-        }
-
         sprite.anchor.x = 0.5;
         sprite.anchor.y = 0.5;
         sprite.position.x = d.x * scale3 + imageSize3 / 2;
@@ -899,10 +904,32 @@ function Canvas() {
 
         if (loadImagesCue.length) {
             var d = loadImagesCue.pop();
+            // console.log(d.id)
+            if (!d.loaded) {
+                loadMiddleImage(d);
+            }
+        }
+        if (loadImagesCue.length) {
+            var d = loadImagesCue.pop();
+            // console.log(d.id)
+            if (!d.loaded) {
+                loadMiddleImage(d);
+            }
+        }
+        if (loadImagesCue.length) {
+            var d = loadImagesCue.pop();
+            // console.log(d.id)
             if (!d.loaded) {
                 loadMiddleImage(d);
             }
         }
+        // if (loadImagesCue.length) {
+        //     var d = loadImagesCue.pop();
+        //     console.log(d.id)
+        //     if (!d.loaded) {
+        //         loadMiddleImage(d);
+        //     }
+        // }
     }
 
     function nearest(x, y, best, node) {
diff --git a/js/loader.js b/js/loader.js
index c6062cf..09ed913 100644
--- a/js/loader.js
+++ b/js/loader.js
@@ -68,6 +68,7 @@ function LoaderSprites(){
 
   var loader = {};
   var progress = function(){};
+  var done = function(){};
 
   var pixiloader = new PIXI.loaders.Loader();
     pixiloader
@@ -85,12 +86,19 @@ function LoaderSprites(){
     return loader;
   };
 
+  loader.done = function(value) {
+    if (!arguments.length) return done;
+    done = value;
+    return loader;
+  };
+
   loader.load = function(url){
     pixiloader
       .add(url)
       .load(function (r) {
           console.log("done", r);
           container.selectAll("div").remove();
+          done()
       });
   }
 
diff --git a/js/pixi-packer-parser.js b/js/pixi-packer-parser.js
index e628754..fd21de4 100644
--- a/js/pixi-packer-parser.js
+++ b/js/pixi-packer-parser.js
@@ -58,10 +58,10 @@ window.pixiPackerParser = function (PIXI)
                 res.textures = {};
                 spritesheet.sprites.forEach(function(sprite) {
                     var frame = new PIXI.Rectangle(
-                        sprite.position.x / resolution,
-                        sprite.position.y / resolution,
-                        sprite.dimension.w / resolution,
-                        sprite.dimension.h / resolution
+                        sprite.position.x+1 / resolution,
+                        sprite.position.y+1 / resolution,
+                        sprite.dimension.w-2 / resolution,
+                        sprite.dimension.h-2 / resolution
                     );
 
                     var crop;
@@ -106,7 +106,7 @@ window.pixiPackerParser = function (PIXI)
                     res.textures[sprite.name] = new PIXI.Texture(res.texture.baseTexture, frame, crop, trim, false);
 
                     // lets also add the frame to pixi's global cache for fromFrame and fromImage functions
-                    PIXI.utils.TextureCache[sprite.name] = res.textures[sprite.name];
+                    // PIXI.utils.TextureCache[sprite.name] = res.textures[sprite.name];
                 });
                 waiter.done();
             });
diff --git a/js/pixi.js b/js/pixi.js
new file mode 100644
index 0000000..60a4067
--- /dev/null
+++ b/js/pixi.js
@@ -0,0 +1,43644 @@
+/*!
+ * pixi.js - v5.1.4
+ * Compiled Fri, 20 Sep 2019 17:22:13 UTC
+ *
+ * pixi.js is licensed under the MIT License.
+ * http://www.opensource.org/licenses/mit-license
+ */
+var PIXI = (function (exports) {
+	'use strict';
+
+	var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
+
+	function commonjsRequire () {
+		throw new Error('Dynamic requires are not currently supported by rollup-plugin-commonjs');
+	}
+
+	function unwrapExports (x) {
+		return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
+	}
+
+	function createCommonjsModule(fn, module) {
+		return module = { exports: {} }, fn(module, module.exports), module.exports;
+	}
+
+	function getCjsExportFromNamespace (n) {
+		return n && n['default'] || n;
+	}
+
+	var promise = createCommonjsModule(function (module, exports) {
+	(function(global){
+
+	//
+	// Check for native Promise and it has correct interface
+	//
+
+	var NativePromise = global['Promise'];
+	var nativePromiseSupported =
+	  NativePromise &&
+	  // Some of these methods are missing from
+	  // Firefox/Chrome experimental implementations
+	  'resolve' in NativePromise &&
+	  'reject' in NativePromise &&
+	  'all' in NativePromise &&
+	  'race' in NativePromise &&
+	  // Older version of the spec had a resolver object
+	  // as the arg rather than a function
+	  (function(){
+	    var resolve;
+	    new NativePromise(function(r){ resolve = r; });
+	    return typeof resolve === 'function';
+	  })();
+
+
+	//
+	// export if necessary
+	//
+
+	if ('object' !== 'undefined' && exports)
+	{
+	  // node.js
+	  exports.Promise = nativePromiseSupported ? NativePromise : Promise;
+	  exports.Polyfill = Promise;
+	}
+	else
+	{
+	  // AMD
+	  if (typeof undefined == 'function' && undefined.amd)
+	  {
+	    undefined(function(){
+	      return nativePromiseSupported ? NativePromise : Promise;
+	    });
+	  }
+	  else
+	  {
+	    // in browser add to global
+	    if (!nativePromiseSupported)
+	      { global['Promise'] = Promise; }
+	  }
+	}
+
+
+	//
+	// Polyfill
+	//
+
+	var PENDING = 'pending';
+	var SEALED = 'sealed';
+	var FULFILLED = 'fulfilled';
+	var REJECTED = 'rejected';
+	var NOOP = function(){};
+
+	function isArray(value) {
+	  return Object.prototype.toString.call(value) === '[object Array]';
+	}
+
+	// async calls
+	var asyncSetTimer = typeof setImmediate !== 'undefined' ? setImmediate : setTimeout;
+	var asyncQueue = [];
+	var asyncTimer;
+
+	function asyncFlush(){
+	  // run promise callbacks
+	  for (var i = 0; i < asyncQueue.length; i++)
+	    { asyncQueue[i][0](asyncQueue[i][1]); }
+
+	  // reset async asyncQueue
+	  asyncQueue = [];
+	  asyncTimer = false;
+	}
+
+	function asyncCall(callback, arg){
+	  asyncQueue.push([callback, arg]);
+
+	  if (!asyncTimer)
+	  {
+	    asyncTimer = true;
+	    asyncSetTimer(asyncFlush, 0);
+	  }
+	}
+
+
+	function invokeResolver(resolver, promise) {
+	  function resolvePromise(value) {
+	    resolve(promise, value);
+	  }
+
+	  function rejectPromise(reason) {
+	    reject(promise, reason);
+	  }
+
+	  try {
+	    resolver(resolvePromise, rejectPromise);
+	  } catch(e) {
+	    rejectPromise(e);
+	  }
+	}
+
+	function invokeCallback(subscriber){
+	  var owner = subscriber.owner;
+	  var settled = owner.state_;
+	  var value = owner.data_;  
+	  var callback = subscriber[settled];
+	  var promise = subscriber.then;
+
+	  if (typeof callback === 'function')
+	  {
+	    settled = FULFILLED;
+	    try {
+	      value = callback(value);
+	    } catch(e) {
+	      reject(promise, e);
+	    }
+	  }
+
+	  if (!handleThenable(promise, value))
+	  {
+	    if (settled === FULFILLED)
+	      { resolve(promise, value); }
+
+	    if (settled === REJECTED)
+	      { reject(promise, value); }
+	  }
+	}
+
+	function handleThenable(promise, value) {
+	  var resolved;
+
+	  try {
+	    if (promise === value)
+	      { throw new TypeError('A promises callback cannot return that same promise.'); }
+
+	    if (value && (typeof value === 'function' || typeof value === 'object'))
+	    {
+	      var then = value.then;  // then should be retrived only once
+
+	      if (typeof then === 'function')
+	      {
+	        then.call(value, function(val){
+	          if (!resolved)
+	          {
+	            resolved = true;
+
+	            if (value !== val)
+	              { resolve(promise, val); }
+	            else
+	              { fulfill(promise, val); }
+	          }
+	        }, function(reason){
+	          if (!resolved)
+	          {
+	            resolved = true;
+
+	            reject(promise, reason);
+	          }
+	        });
+
+	        return true;
+	      }
+	    }
+	  } catch (e) {
+	    if (!resolved)
+	      { reject(promise, e); }
+
+	    return true;
+	  }
+
+	  return false;
+	}
+
+	function resolve(promise, value){
+	  if (promise === value || !handleThenable(promise, value))
+	    { fulfill(promise, value); }
+	}
+
+	function fulfill(promise, value){
+	  if (promise.state_ === PENDING)
+	  {
+	    promise.state_ = SEALED;
+	    promise.data_ = value;
+
+	    asyncCall(publishFulfillment, promise);
+	  }
+	}
+
+	function reject(promise, reason){
+	  if (promise.state_ === PENDING)
+	  {
+	    promise.state_ = SEALED;
+	    promise.data_ = reason;
+
+	    asyncCall(publishRejection, promise);
+	  }
+	}
+
+	function publish(promise) {
+	  var callbacks = promise.then_;
+	  promise.then_ = undefined;
+
+	  for (var i = 0; i < callbacks.length; i++) {
+	    invokeCallback(callbacks[i]);
+	  }
+	}
+
+	function publishFulfillment(promise){
+	  promise.state_ = FULFILLED;
+	  publish(promise);
+	}
+
+	function publishRejection(promise){
+	  promise.state_ = REJECTED;
+	  publish(promise);
+	}
+
+	/**
+	* @class
+	*/
+	function Promise(resolver){
+	  if (typeof resolver !== 'function')
+	    { throw new TypeError('Promise constructor takes a function argument'); }
+
+	  if (this instanceof Promise === false)
+	    { throw new TypeError('Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.'); }
+
+	  this.then_ = [];
+
+	  invokeResolver(resolver, this);
+	}
+
+	Promise.prototype = {
+	  constructor: Promise,
+
+	  state_: PENDING,
+	  then_: null,
+	  data_: undefined,
+
+	  then: function(onFulfillment, onRejection){
+	    var subscriber = {
+	      owner: this,
+	      then: new this.constructor(NOOP),
+	      fulfilled: onFulfillment,
+	      rejected: onRejection
+	    };
+
+	    if (this.state_ === FULFILLED || this.state_ === REJECTED)
+	    {
+	      // already resolved, call callback async
+	      asyncCall(invokeCallback, subscriber);
+	    }
+	    else
+	    {
+	      // subscribe
+	      this.then_.push(subscriber);
+	    }
+
+	    return subscriber.then;
+	  },
+
+	  'catch': function(onRejection) {
+	    return this.then(null, onRejection);
+	  }
+	};
+
+	Promise.all = function(promises){
+	  var Class = this;
+
+	  if (!isArray(promises))
+	    { throw new TypeError('You must pass an array to Promise.all().'); }
+
+	  return new Class(function(resolve, reject){
+	    var results = [];
+	    var remaining = 0;
+
+	    function resolver(index){
+	      remaining++;
+	      return function(value){
+	        results[index] = value;
+	        if (!--remaining)
+	          { resolve(results); }
+	      };
+	    }
+
+	    for (var i = 0, promise; i < promises.length; i++)
+	    {
+	      promise = promises[i];
+
+	      if (promise && typeof promise.then === 'function')
+	        { promise.then(resolver(i), reject); }
+	      else
+	        { results[i] = promise; }
+	    }
+
+	    if (!remaining)
+	      { resolve(results); }
+	  });
+	};
+
+	Promise.race = function(promises){
+	  var Class = this;
+
+	  if (!isArray(promises))
+	    { throw new TypeError('You must pass an array to Promise.race().'); }
+
+	  return new Class(function(resolve, reject) {
+	    for (var i = 0, promise; i < promises.length; i++)
+	    {
+	      promise = promises[i];
+
+	      if (promise && typeof promise.then === 'function')
+	        { promise.then(resolve, reject); }
+	      else
+	        { resolve(promise); }
+	    }
+	  });
+	};
+
+	Promise.resolve = function(value){
+	  var Class = this;
+
+	  if (value && typeof value === 'object' && value.constructor === Class)
+	    { return value; }
+
+	  return new Class(function(resolve){
+	    resolve(value);
+	  });
+	};
+
+	Promise.reject = function(reason){
+	  var Class = this;
+
+	  return new Class(function(resolve, reject){
+	    reject(reason);
+	  });
+	};
+
+	})(typeof window != 'undefined' ? window : typeof commonjsGlobal != 'undefined' ? commonjsGlobal : typeof self != 'undefined' ? self : commonjsGlobal);
+	});
+	var promise_1 = promise.Promise;
+	var promise_2 = promise.Polyfill;
+
+	/*
+	object-assign
+	(c) Sindre Sorhus
+	@license MIT
+	*/
+
+	'use strict';
+	/* eslint-disable no-unused-vars */
+	var getOwnPropertySymbols = Object.getOwnPropertySymbols;
+	var hasOwnProperty = Object.prototype.hasOwnProperty;
+	var propIsEnumerable = Object.prototype.propertyIsEnumerable;
+
+	function toObject(val) {
+		if (val === null || val === undefined) {
+			throw new TypeError('Object.assign cannot be called with null or undefined');
+		}
+
+		return Object(val);
+	}
+
+	function shouldUseNative() {
+		try {
+			if (!Object.assign) {
+				return false;
+			}
+
+			// Detect buggy property enumeration order in older V8 versions.
+
+			// https://bugs.chromium.org/p/v8/issues/detail?id=4118
+			var test1 = new String('abc');  // eslint-disable-line no-new-wrappers
+			test1[5] = 'de';
+			if (Object.getOwnPropertyNames(test1)[0] === '5') {
+				return false;
+			}
+
+			// https://bugs.chromium.org/p/v8/issues/detail?id=3056
+			var test2 = {};
+			for (var i = 0; i < 10; i++) {
+				test2['_' + String.fromCharCode(i)] = i;
+			}
+			var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
+				return test2[n];
+			});
+			if (order2.join('') !== '0123456789') {
+				return false;
+			}
+
+			// https://bugs.chromium.org/p/v8/issues/detail?id=3056
+			var test3 = {};
+			'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
+				test3[letter] = letter;
+			});
+			if (Object.keys(Object.assign({}, test3)).join('') !==
+					'abcdefghijklmnopqrst') {
+				return false;
+			}
+
+			return true;
+		} catch (err) {
+			// We don't expect any of the above to throw, but better to be safe.
+			return false;
+		}
+	}
+
+	var objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
+		var arguments$1 = arguments;
+
+		var from;
+		var to = toObject(target);
+		var symbols;
+
+		for (var s = 1; s < arguments.length; s++) {
+			from = Object(arguments$1[s]);
+
+			for (var key in from) {
+				if (hasOwnProperty.call(from, key)) {
+					to[key] = from[key];
+				}
+			}
+
+			if (getOwnPropertySymbols) {
+				symbols = getOwnPropertySymbols(from);
+				for (var i = 0; i < symbols.length; i++) {
+					if (propIsEnumerable.call(from, symbols[i])) {
+						to[symbols[i]] = from[symbols[i]];
+					}
+				}
+			}
+		}
+
+		return to;
+	};
+
+	/*!
+	 * @pixi/polyfill - v5.1.0
+	 * Compiled Fri, 20 Sep 2019 17:22:13 UTC
+	 *
+	 * @pixi/polyfill is licensed under the MIT License.
+	 * http://www.opensource.org/licenses/mit-license
+	 */
+
+	// Support for IE 9 - 11 which does not include Promises
+	if (!window.Promise)
+	{
+	    window.Promise = promise_2;
+	}
+
+	// References:
+
+	if (!Object.assign)
+	{
+	    Object.assign = objectAssign;
+	}
+
+	var commonjsGlobal$1 = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
+
+	// References:
+	// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
+	// https://gist.github.com/1579671
+	// http://updates.html5rocks.com/2012/05/requestAnimationFrame-API-now-with-sub-millisecond-precision
+	// https://gist.github.com/timhall/4078614
+	// https://github.com/Financial-Times/polyfill-service/tree/master/polyfills/requestAnimationFrame
+
+	// Expected to be used with Browserfiy
+	// Browserify automatically detects the use of `global` and passes the
+	// correct reference of `global`, `self`, and finally `window`
+
+	var ONE_FRAME_TIME = 16;
+
+	// Date.now
+	if (!(Date.now && Date.prototype.getTime))
+	{
+	    Date.now = function now()
+	    {
+	        return new Date().getTime();
+	    };
+	}
+
+	// performance.now
+	if (!(commonjsGlobal$1.performance && commonjsGlobal$1.performance.now))
+	{
+	    var startTime = Date.now();
+
+	    if (!commonjsGlobal$1.performance)
+	    {
+	        commonjsGlobal$1.performance = {};
+	    }
+
+	    commonjsGlobal$1.performance.now = function () { return Date.now() - startTime; };
+	}
+
+	// requestAnimationFrame
+	var lastTime = Date.now();
+	var vendors = ['ms', 'moz', 'webkit', 'o'];
+
+	for (var x = 0; x < vendors.length && !commonjsGlobal$1.requestAnimationFrame; ++x)
+	{
+	    var p = vendors[x];
+
+	    commonjsGlobal$1.requestAnimationFrame = commonjsGlobal$1[(p + "RequestAnimationFrame")];
+	    commonjsGlobal$1.cancelAnimationFrame = commonjsGlobal$1[(p + "CancelAnimationFrame")] || commonjsGlobal$1[(p + "CancelRequestAnimationFrame")];
+	}
+
+	if (!commonjsGlobal$1.requestAnimationFrame)
+	{
+	    commonjsGlobal$1.requestAnimationFrame = function (callback) {
+	        if (typeof callback !== 'function')
+	        {
+	            throw new TypeError((callback + "is not a function"));
+	        }
+
+	        var currentTime = Date.now();
+	        var delay = ONE_FRAME_TIME + lastTime - currentTime;
+
+	        if (delay < 0)
+	        {
+	            delay = 0;
+	        }
+
+	        lastTime = currentTime;
+
+	        return setTimeout(function () {
+	            lastTime = Date.now();
+	            callback(performance.now());
+	        }, delay);
+	    };
+	}
+
+	if (!commonjsGlobal$1.cancelAnimationFrame)
+	{
+	    commonjsGlobal$1.cancelAnimationFrame = function (id) { return clearTimeout(id); };
+	}
+
+	// References:
+	// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/sign
+
+	if (!Math.sign)
+	{
+	    Math.sign = function mathSign(x)
+	    {
+	        x = Number(x);
+
+	        if (x === 0 || isNaN(x))
+	        {
+	            return x;
+	        }
+
+	        return x > 0 ? 1 : -1;
+	    };
+	}
+
+	// References:
+	// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isInteger
+
+	if (!Number.isInteger)
+	{
+	    Number.isInteger = function numberIsInteger(value)
+	    {
+	        return typeof value === 'number' && isFinite(value) && Math.floor(value) === value;
+	    };
+	}
+
+	if (!window.ArrayBuffer)
+	{
+	    window.ArrayBuffer = Array;
+	}
+
+	if (!window.Float32Array)
+	{
+	    window.Float32Array = Array;
+	}
+
+	if (!window.Uint32Array)
+	{
+	    window.Uint32Array = Array;
+	}
+
+	if (!window.Uint16Array)
+	{
+	    window.Uint16Array = Array;
+	}
+
+	if (!window.Uint8Array)
+	{
+	    window.Uint8Array = Array;
+	}
+
+	if (!window.Int32Array)
+	{
+	    window.Int32Array = Array;
+	}
+
+	var isMobile_min = createCommonjsModule(function (module) {
+	!function(e){var n=/iPhone/i,t=/iPod/i,r=/iPad/i,a=/\bAndroid(?:.+)Mobile\b/i,p=/Android/i,b=/\bAndroid(?:.+)SD4930UR\b/i,l=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,f=/Windows Phone/i,s=/\bWindows(?:.+)ARM\b/i,u=/BlackBerry/i,c=/BB10/i,h=/Opera Mini/i,v=/\b(CriOS|Chrome)(?:.+)Mobile/i,w=/Mobile(?:.+)Firefox\b/i;function m(e,i){return e.test(i)}function i(e){var i=e||("undefined"!=typeof navigator?navigator.userAgent:""),o=i.split("[FBAN");void 0!==o[1]&&(i=o[0]),void 0!==(o=i.split("Twitter"))[1]&&(i=o[0]);var d={apple:{phone:m(n,i)&&!m(f,i),ipod:m(t,i),tablet:!m(n,i)&&m(r,i)&&!m(f,i),device:(m(n,i)||m(t,i)||m(r,i))&&!m(f,i)},amazon:{phone:m(b,i),tablet:!m(b,i)&&m(l,i),device:m(b,i)||m(l,i)},android:{phone:!m(f,i)&&m(b,i)||!m(f,i)&&m(a,i),tablet:!m(f,i)&&!m(b,i)&&!m(a,i)&&(m(l,i)||m(p,i)),device:!m(f,i)&&(m(b,i)||m(l,i)||m(a,i)||m(p,i))||m(/\bokhttp\b/i,i)},windows:{phone:m(f,i),tablet:m(s,i),device:m(f,i)||m(s,i)},other:{blackberry:m(u,i),blackberry10:m(c,i),opera:m(h,i),firefox:m(w,i),chrome:m(v,i),device:m(u,i)||m(c,i)||m(h,i)||m(w,i)||m(v,i)}};return d.any=d.apple.device||d.android.device||d.windows.device||d.other.device,d.phone=d.apple.phone||d.android.phone||d.windows.phone,d.tablet=d.apple.tablet||d.android.tablet||d.windows.tablet,d}"undefined"!='object'&&module.exports&&"undefined"==typeof window?module.exports=i:"undefined"!='object'&&module.exports&&"undefined"!=typeof window?(module.exports=i(),module.exports.isMobile=i):"function"==typeof undefined&&undefined.amd?undefined([],e.isMobile=i()):e.isMobile=i();}(commonjsGlobal);
+	});
+	var isMobile_min_1 = isMobile_min.isMobile;
+
+	/*!
+	 * @pixi/settings - v5.1.3
+	 * Compiled Fri, 20 Sep 2019 17:22:13 UTC
+	 *
+	 * @pixi/settings is licensed under the MIT License.
+	 * http://www.opensource.org/licenses/mit-license
+	 */
+
+	/**
+	 * The maximum recommended texture units to use.
+	 * In theory the bigger the better, and for desktop we'll use as many as we can.
+	 * But some mobile devices slow down if there is to many branches in the shader.
+	 * So in practice there seems to be a sweet spot size that varies depending on the device.
+	 *
+	 * In v4, all mobile devices were limited to 4 texture units because for this.
+	 * In v5, we allow all texture units to be used on modern Apple or Android devices.
+	 *
+	 * @private
+	 * @param {number} max
+	 * @returns {number}
+	 */
+	function maxRecommendedTextures(max)
+	{
+	    var allowMax = true;
+
+	    if (isMobile_min.tablet || isMobile_min.phone)
+	    {
+	        allowMax = false;
+
+	        if (isMobile_min.apple.device)
+	        {
+	            var match = (navigator.userAgent).match(/OS (\d+)_(\d+)?/);
+
+	            if (match)
+	            {
+	                var majorVersion = parseInt(match[1], 10);
+
+	                // All texture units can be used on devices that support ios 11 or above
+	                if (majorVersion >= 11)
+	                {
+	                    allowMax = true;
+	                }
+	            }
+	        }
+	        if (isMobile_min.android.device)
+	        {
+	            var match$1 = (navigator.userAgent).match(/Android\s([0-9.]*)/);
+
+	            if (match$1)
+	            {
+	                var majorVersion$1 = parseInt(match$1[1], 10);
+
+	                // All texture units can be used on devices that support Android 7 (Nougat) or above
+	                if (majorVersion$1 >= 7)
+	                {
+	                    allowMax = true;
+	                }
+	            }
+	        }
+	    }
+
+	    return allowMax ? max : 4;
+	}
+
+	/**
+	 * Uploading the same buffer multiple times in a single frame can cause performance issues.
+	 * Apparent on iOS so only check for that at the moment
+	 * This check may become more complex if this issue pops up elsewhere.
+	 *
+	 * @private
+	 * @returns {boolean}
+	 */
+	function canUploadSameBuffer()
+	{
+	    return !isMobile_min.apple.device;
+	}
+
+	/**
+	 * User's customizable globals for overriding the default PIXI settings, such
+	 * as a renderer's default resolution, framerate, float precision, etc.
+	 * @example
+	 * // Use the native window resolution as the default resolution
+	 * // will support high-density displays when rendering
+	 * PIXI.settings.RESOLUTION = window.devicePixelRatio;
+	 *
+	 * // Disable interpolation when scaling, will make texture be pixelated
+	 * PIXI.settings.SCALE_MODE = PIXI.SCALE_MODES.NEAREST;
+	 * @namespace PIXI.settings
+	 */
+	var settings = {
+
+	    /**
+	     * If set to true WebGL will attempt make textures mimpaped by default.
+	     * Mipmapping will only succeed if the base texture uploaded has power of two dimensions.
+	     *
+	     * @static
+	     * @name MIPMAP_TEXTURES
+	     * @memberof PIXI.settings
+	     * @type {PIXI.MIPMAP_MODES}
+	     * @default PIXI.MIPMAP_MODES.POW2
+	     */
+	    MIPMAP_TEXTURES: 1,
+
+	    /**
+	     * Default anisotropic filtering level of textures.
+	     * Usually from 0 to 16
+	     *
+	     * @static
+	     * @name ANISOTROPIC_LEVEL
+	     * @memberof PIXI.settings
+	     * @type {number}
+	     * @default 0
+	     */
+	    ANISOTROPIC_LEVEL: 0,
+
+	    /**
+	     * Default resolution / device pixel ratio of the renderer.
+	     *
+	     * @static
+	     * @name RESOLUTION
+	     * @memberof PIXI.settings
+	     * @type {number}
+	     * @default 1
+	     */
+	    RESOLUTION: 1,
+
+	    /**
+	     * Default filter resolution.
+	     *
+	     * @static
+	     * @name FILTER_RESOLUTION
+	     * @memberof PIXI.settings
+	     * @type {number}
+	     * @default 1
+	     */
+	    FILTER_RESOLUTION: 1,
+
+	    /**
+	     * The maximum textures that this device supports.
+	     *
+	     * @static
+	     * @name SPRITE_MAX_TEXTURES
+	     * @memberof PIXI.settings
+	     * @type {number}
+	     * @default 32
+	     */
+	    SPRITE_MAX_TEXTURES: maxRecommendedTextures(32),
+
+	    // TODO: maybe change to SPRITE.BATCH_SIZE: 2000
+	    // TODO: maybe add PARTICLE.BATCH_SIZE: 15000
+
+	    /**
+	     * The default sprite batch size.
+	     *
+	     * The default aims to balance desktop and mobile devices.
+	     *
+	     * @static
+	     * @name SPRITE_BATCH_SIZE
+	     * @memberof PIXI.settings
+	     * @type {number}
+	     * @default 4096
+	     */
+	    SPRITE_BATCH_SIZE: 4096,
+
+	    /**
+	     * The default render options if none are supplied to {@link PIXI.Renderer}
+	     * or {@link PIXI.CanvasRenderer}.
+	     *
+	     * @static
+	     * @name RENDER_OPTIONS
+	     * @memberof PIXI.settings
+	     * @type {object}
+	     * @property {HTMLCanvasElement} view=null
+	     * @property {number} resolution=1
+	     * @property {boolean} antialias=false
+	     * @property {boolean} forceFXAA=false
+	     * @property {boolean} autoDensity=false
+	     * @property {boolean} transparent=false
+	     * @property {number} backgroundColor=0x000000
+	     * @property {boolean} clearBeforeRender=true
+	     * @property {boolean} preserveDrawingBuffer=false
+	     * @property {number} width=800
+	     * @property {number} height=600
+	     * @property {boolean} legacy=false
+	     */
+	    RENDER_OPTIONS: {
+	        view: null,
+	        antialias: false,
+	        forceFXAA: false,
+	        autoDensity: false,
+	        transparent: false,
+	        backgroundColor: 0x000000,
+	        clearBeforeRender: true,
+	        preserveDrawingBuffer: false,
+	        width: 800,
+	        height: 600,
+	        legacy: false,
+	    },
+
+	    /**
+	     * Default Garbage Collection mode.
+	     *
+	     * @static
+	     * @name GC_MODE
+	     * @memberof PIXI.settings
+	     * @type {PIXI.GC_MODES}
+	     * @default PIXI.GC_MODES.AUTO
+	     */
+	    GC_MODE: 0,
+
+	    /**
+	     * Default Garbage Collection max idle.
+	     *
+	     * @static
+	     * @name GC_MAX_IDLE
+	     * @memberof PIXI.settings
+	     * @type {number}
+	     * @default 3600
+	     */
+	    GC_MAX_IDLE: 60 * 60,
+
+	    /**
+	     * Default Garbage Collection maximum check count.
+	     *
+	     * @static
+	     * @name GC_MAX_CHECK_COUNT
+	     * @memberof PIXI.settings
+	     * @type {number}
+	     * @default 600
+	     */
+	    GC_MAX_CHECK_COUNT: 60 * 10,
+
+	    /**
+	     * Default wrap modes that are supported by pixi.
+	     *
+	     * @static
+	     * @name WRAP_MODE
+	     * @memberof PIXI.settings
+	     * @type {PIXI.WRAP_MODES}
+	     * @default PIXI.WRAP_MODES.CLAMP
+	     */
+	    WRAP_MODE: 33071,
+
+	    /**
+	     * Default scale mode for textures.
+	     *
+	     * @static
+	     * @name SCALE_MODE
+	     * @memberof PIXI.settings
+	     * @type {PIXI.SCALE_MODES}
+	     * @default PIXI.SCALE_MODES.LINEAR
+	     */
+	    SCALE_MODE: 1,
+
+	    /**
+	     * Default specify float precision in vertex shader.
+	     *
+	     * @static
+	     * @name PRECISION_VERTEX
+	     * @memberof PIXI.settings
+	     * @type {PIXI.PRECISION}
+	     * @default PIXI.PRECISION.HIGH
+	     */
+	    PRECISION_VERTEX: 'highp',
+
+	    /**
+	     * Default specify float precision in fragment shader.
+	     * iOS is best set at highp due to https://github.com/pixijs/pixi.js/issues/3742
+	     *
+	     * @static
+	     * @name PRECISION_FRAGMENT
+	     * @memberof PIXI.settings
+	     * @type {PIXI.PRECISION}
+	     * @default PIXI.PRECISION.MEDIUM
+	     */
+	    PRECISION_FRAGMENT: isMobile_min.apple.device ? 'highp' : 'mediump',
+
+	    /**
+	     * Can we upload the same buffer in a single frame?
+	     *
+	     * @static
+	     * @name CAN_UPLOAD_SAME_BUFFER
+	     * @memberof PIXI.settings
+	     * @type {boolean}
+	     */
+	    CAN_UPLOAD_SAME_BUFFER: canUploadSameBuffer(),
+
+	    /**
+	     * Enables bitmap creation before image load. This feature is experimental.
+	     *
+	     * @static
+	     * @name CREATE_IMAGE_BITMAP
+	     * @memberof PIXI.settings
+	     * @type {boolean}
+	     * @default false
+	     */
+	    CREATE_IMAGE_BITMAP: false,
+
+	    /**
+	     * If true PixiJS will Math.floor() x/y values when rendering, stopping pixel interpolation.
+	     * Advantages can include sharper image quality (like text) and faster rendering on canvas.
+	     * The main disadvantage is movement of objects may appear less smooth.
+	     *
+	     * @static
+	     * @constant
+	     * @memberof PIXI.settings
+	     * @type {boolean}
+	     * @default false
+	     */
+	    ROUND_PIXELS: false,
+	};
+
+	var eventemitter3 = createCommonjsModule(function (module) {
+	'use strict';
+
+	var has = Object.prototype.hasOwnProperty
+	  , prefix = '~';
+
+	/**
+	 * Constructor to create a storage for our `EE` objects.
+	 * An `Events` instance is a plain object whose properties are event names.
+	 *
+	 * @constructor
+	 * @private
+	 */
+	function Events() {}
+
+	//
+	// We try to not inherit from `Object.prototype`. In some engines creating an
+	// instance in this way is faster than calling `Object.create(null)` directly.
+	// If `Object.create(null)` is not supported we prefix the event names with a
+	// character to make sure that the built-in object properties are not
+	// overridden or used as an attack vector.
+	//
+	if (Object.create) {
+	  Events.prototype = Object.create(null);
+
+	  //
+	  // This hack is needed because the `__proto__` property is still inherited in
+	  // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.
+	  //
+	  if (!new Events().__proto__) { prefix = false; }
+	}
+
+	/**
+	 * Representation of a single event listener.
+	 *
+	 * @param {Function} fn The listener function.
+	 * @param {*} context The context to invoke the listener with.
+	 * @param {Boolean} [once=false] Specify if the listener is a one-time listener.
+	 * @constructor
+	 * @private
+	 */
+	function EE(fn, context, once) {
+	  this.fn = fn;
+	  this.context = context;
+	  this.once = once || false;
+	}
+
+	/**
+	 * Add a listener for a given event.
+	 *
+	 * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.
+	 * @param {(String|Symbol)} event The event name.
+	 * @param {Function} fn The listener function.
+	 * @param {*} context The context to invoke the listener with.
+	 * @param {Boolean} once Specify if the listener is a one-time listener.
+	 * @returns {EventEmitter}
+	 * @private
+	 */
+	function addListener(emitter, event, fn, context, once) {
+	  if (typeof fn !== 'function') {
+	    throw new TypeError('The listener must be a function');
+	  }
+
+	  var listener = new EE(fn, context || emitter, once)
+	    , evt = prefix ? prefix + event : event;
+
+	  if (!emitter._events[evt]) { emitter._events[evt] = listener, emitter._eventsCount++; }
+	  else if (!emitter._events[evt].fn) { emitter._events[evt].push(listener); }
+	  else { emitter._events[evt] = [emitter._events[evt], listener]; }
+
+	  return emitter;
+	}
+
+	/**
+	 * Clear event by name.
+	 *
+	 * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.
+	 * @param {(String|Symbol)} evt The Event name.
+	 * @private
+	 */
+	function clearEvent(emitter, evt) {
+	  if (--emitter._eventsCount === 0) { emitter._events = new Events(); }
+	  else { delete emitter._events[evt]; }
+	}
+
+	/**
+	 * Minimal `EventEmitter` interface that is molded against the Node.js
+	 * `EventEmitter` interface.
+	 *
+	 * @constructor
+	 * @public
+	 */
+	function EventEmitter() {
+	  this._events = new Events();
+	  this._eventsCount = 0;
+	}
+
+	/**
+	 * Return an array listing the events for which the emitter has registered
+	 * listeners.
+	 *
+	 * @returns {Array}
+	 * @public
+	 */
+	EventEmitter.prototype.eventNames = function eventNames() {
+	  var names = []
+	    , events
+	    , name;
+
+	  if (this._eventsCount === 0) { return names; }
+
+	  for (name in (events = this._events)) {
+	    if (has.call(events, name)) { names.push(prefix ? name.slice(1) : name); }
+	  }
+
+	  if (Object.getOwnPropertySymbols) {
+	    return names.concat(Object.getOwnPropertySymbols(events));
+	  }
+
+	  return names;
+	};
+
+	/**
+	 * Return the listeners registered for a given event.
+	 *
+	 * @param {(String|Symbol)} event The event name.
+	 * @returns {Array} The registered listeners.
+	 * @public
+	 */
+	EventEmitter.prototype.listeners = function listeners(event) {
+	  var evt = prefix ? prefix + event : event
+	    , handlers = this._events[evt];
+
+	  if (!handlers) { return []; }
+	  if (handlers.fn) { return [handlers.fn]; }
+
+	  for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {
+	    ee[i] = handlers[i].fn;
+	  }
+
+	  return ee;
+	};
+
+	/**
+	 * Return the number of listeners listening to a given event.
+	 *
+	 * @param {(String|Symbol)} event The event name.
+	 * @returns {Number} The number of listeners.
+	 * @public
+	 */
+	EventEmitter.prototype.listenerCount = function listenerCount(event) {
+	  var evt = prefix ? prefix + event : event
+	    , listeners = this._events[evt];
+
+	  if (!listeners) { return 0; }
+	  if (listeners.fn) { return 1; }
+	  return listeners.length;
+	};
+
+	/**
+	 * Calls each of the listeners registered for a given event.
+	 *
+	 * @param {(String|Symbol)} event The event name.
+	 * @returns {Boolean} `true` if the event had listeners, else `false`.
+	 * @public
+	 */
+	EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {
+	  var arguments$1 = arguments;
+
+	  var evt = prefix ? prefix + event : event;
+
+	  if (!this._events[evt]) { return false; }
+
+	  var listeners = this._events[evt]
+	    , len = arguments.length
+	    , args
+	    , i;
+
+	  if (listeners.fn) {
+	    if (listeners.once) { this.removeListener(event, listeners.fn, undefined, true); }
+
+	    switch (len) {
+	      case 1: return listeners.fn.call(listeners.context), true;
+	      case 2: return listeners.fn.call(listeners.context, a1), true;
+	      case 3: return listeners.fn.call(listeners.context, a1, a2), true;
+	      case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;
+	      case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;
+	      case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;
+	    }
+
+	    for (i = 1, args = new Array(len -1); i < len; i++) {
+	      args[i - 1] = arguments$1[i];
+	    }
+
+	    listeners.fn.apply(listeners.context, args);
+	  } else {
+	    var length = listeners.length
+	      , j;
+
+	    for (i = 0; i < length; i++) {
+	      if (listeners[i].once) { this.removeListener(event, listeners[i].fn, undefined, true); }
+
+	      switch (len) {
+	        case 1: listeners[i].fn.call(listeners[i].context); break;
+	        case 2: listeners[i].fn.call(listeners[i].context, a1); break;
+	        case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;
+	        case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;
+	        default:
+	          if (!args) { for (j = 1, args = new Array(len -1); j < len; j++) {
+	            args[j - 1] = arguments$1[j];
+	          } }
+
+	          listeners[i].fn.apply(listeners[i].context, args);
+	      }
+	    }
+	  }
+
+	  return true;
+	};
+
+	/**
+	 * Add a listener for a given event.
+	 *
+	 * @param {(String|Symbol)} event The event name.
+	 * @param {Function} fn The listener function.
+	 * @param {*} [context=this] The context to invoke the listener with.
+	 * @returns {EventEmitter} `this`.
+	 * @public
+	 */
+	EventEmitter.prototype.on = function on(event, fn, context) {
+	  return addListener(this, event, fn, context, false);
+	};
+
+	/**
+	 * Add a one-time listener for a given event.
+	 *
+	 * @param {(String|Symbol)} event The event name.
+	 * @param {Function} fn The listener function.
+	 * @param {*} [context=this] The context to invoke the listener with.
+	 * @returns {EventEmitter} `this`.
+	 * @public
+	 */
+	EventEmitter.prototype.once = function once(event, fn, context) {
+	  return addListener(this, event, fn, context, true);
+	};
+
+	/**
+	 * Remove the listeners of a given event.
+	 *
+	 * @param {(String|Symbol)} event The event name.
+	 * @param {Function} fn Only remove the listeners that match this function.
+	 * @param {*} context Only remove the listeners that have this context.
+	 * @param {Boolean} once Only remove one-time listeners.
+	 * @returns {EventEmitter} `this`.
+	 * @public
+	 */
+	EventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {
+	  var evt = prefix ? prefix + event : event;
+
+	  if (!this._events[evt]) { return this; }
+	  if (!fn) {
+	    clearEvent(this, evt);
+	    return this;
+	  }
+
+	  var listeners = this._events[evt];
+
+	  if (listeners.fn) {
+	    if (
+	      listeners.fn === fn &&
+	      (!once || listeners.once) &&
+	      (!context || listeners.context === context)
+	    ) {
+	      clearEvent(this, evt);
+	    }
+	  } else {
+	    for (var i = 0, events = [], length = listeners.length; i < length; i++) {
+	      if (
+	        listeners[i].fn !== fn ||
+	        (once && !listeners[i].once) ||
+	        (context && listeners[i].context !== context)
+	      ) {
+	        events.push(listeners[i]);
+	      }
+	    }
+
+	    //
+	    // Reset the array, or remove it completely if we have no more listeners.
+	    //
+	    if (events.length) { this._events[evt] = events.length === 1 ? events[0] : events; }
+	    else { clearEvent(this, evt); }
+	  }
+
+	  return this;
+	};
+
+	/**
+	 * Remove all listeners, or those of the specified event.
+	 *
+	 * @param {(String|Symbol)} [event] The event name.
+	 * @returns {EventEmitter} `this`.
+	 * @public
+	 */
+	EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {
+	  var evt;
+
+	  if (event) {
+	    evt = prefix ? prefix + event : event;
+	    if (this._events[evt]) { clearEvent(this, evt); }
+	  } else {
+	    this._events = new Events();
+	    this._eventsCount = 0;
+	  }
+
+	  return this;
+	};
+
+	//
+	// Alias methods names because people roll like that.
+	//
+	EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
+	EventEmitter.prototype.addListener = EventEmitter.prototype.on;
+
+	//
+	// Expose the prefix.
+	//
+	EventEmitter.prefixed = prefix;
+
+	//
+	// Allow `EventEmitter` to be imported as module namespace.
+	//
+	EventEmitter.EventEmitter = EventEmitter;
+
+	//
+	// Expose the module.
+	//
+	if ('undefined' !== 'object') {
+	  module.exports = EventEmitter;
+	}
+	});
+
+	'use strict';
+
+	var earcut_1 = earcut;
+	var default_1 = earcut;
+
+	function earcut(data, holeIndices, dim) {
+
+	    dim = dim || 2;
+
+	    var hasHoles = holeIndices && holeIndices.length,
+	        outerLen = hasHoles ? holeIndices[0] * dim : data.length,
+	        outerNode = linkedList(data, 0, outerLen, dim, true),
+	        triangles = [];
+
+	    if (!outerNode || outerNode.next === outerNode.prev) { return triangles; }
+
+	    var minX, minY, maxX, maxY, x, y, invSize;
+
+	    if (hasHoles) { outerNode = eliminateHoles(data, holeIndices, outerNode, dim); }
+
+	    // if the shape is not too simple, we'll use z-order curve hash later; calculate polygon bbox
+	    if (data.length > 80 * dim) {
+	        minX = maxX = data[0];
+	        minY = maxY = data[1];
+
+	        for (var i = dim; i < outerLen; i += dim) {
+	            x = data[i];
+	            y = data[i + 1];
+	            if (x < minX) { minX = x; }
+	            if (y < minY) { minY = y; }
+	            if (x > maxX) { maxX = x; }
+	            if (y > maxY) { maxY = y; }
+	        }
+
+	        // minX, minY and invSize are later used to transform coords into integers for z-order calculation
+	        invSize = Math.max(maxX - minX, maxY - minY);
+	        invSize = invSize !== 0 ? 1 / invSize : 0;
+	    }
+
+	    earcutLinked(outerNode, triangles, dim, minX, minY, invSize);
+
+	    return triangles;
+	}
+
+	// create a circular doubly linked list from polygon points in the specified winding order
+	function linkedList(data, start, end, dim, clockwise) {
+	    var i, last;
+
+	    if (clockwise === (signedArea(data, start, end, dim) > 0)) {
+	        for (i = start; i < end; i += dim) { last = insertNode(i, data[i], data[i + 1], last); }
+	    } else {
+	        for (i = end - dim; i >= start; i -= dim) { last = insertNode(i, data[i], data[i + 1], last); }
+	    }
+
+	    if (last && equals(last, last.next)) {
+	        removeNode(last);
+	        last = last.next;
+	    }
+
+	    return last;
+	}
+
+	// eliminate colinear or duplicate points
+	function filterPoints(start, end) {
+	    if (!start) { return start; }
+	    if (!end) { end = start; }
+
+	    var p = start,
+	        again;
+	    do {
+	        again = false;
+
+	        if (!p.steiner && (equals(p, p.next) || area(p.prev, p, p.next) === 0)) {
+	            removeNode(p);
+	            p = end = p.prev;
+	            if (p === p.next) { break; }
+	            again = true;
+
+	        } else {
+	            p = p.next;
+	        }
+	    } while (again || p !== end);
+
+	    return end;
+	}
+
+	// main ear slicing loop which triangulates a polygon (given as a linked list)
+	function earcutLinked(ear, triangles, dim, minX, minY, invSize, pass) {
+	    if (!ear) { return; }
+
+	    // interlink polygon nodes in z-order
+	    if (!pass && invSize) { indexCurve(ear, minX, minY, invSize); }
+
+	    var stop = ear,
+	        prev, next;
+
+	    // iterate through ears, slicing them one by one
+	    while (ear.prev !== ear.next) {
+	        prev = ear.prev;
+	        next = ear.next;
+
+	        if (invSize ? isEarHashed(ear, minX, minY, invSize) : isEar(ear)) {
+	            // cut off the triangle
+	            triangles.push(prev.i / dim);
+	            triangles.push(ear.i / dim);
+	            triangles.push(next.i / dim);
+
+	            removeNode(ear);
+
+	            // skipping the next vertex leads to less sliver triangles
+	            ear = next.next;
+	            stop = next.next;
+
+	            continue;
+	        }
+
+	        ear = next;
+
+	        // if we looped through the whole remaining polygon and can't find any more ears
+	        if (ear === stop) {
+	            // try filtering points and slicing again
+	            if (!pass) {
+	                earcutLinked(filterPoints(ear), triangles, dim, minX, minY, invSize, 1);
+
+	            // if this didn't work, try curing all small self-intersections locally
+	            } else if (pass === 1) {
+	                ear = cureLocalIntersections(filterPoints(ear), triangles, dim);
+	                earcutLinked(ear, triangles, dim, minX, minY, invSize, 2);
+
+	            // as a last resort, try splitting the remaining polygon into two
+	            } else if (pass === 2) {
+	                splitEarcut(ear, triangles, dim, minX, minY, invSize);
+	            }
+
+	            break;
+	        }
+	    }
+	}
+
+	// check whether a polygon node forms a valid ear with adjacent nodes
+	function isEar(ear) {
+	    var a = ear.prev,
+	        b = ear,
+	        c = ear.next;
+
+	    if (area(a, b, c) >= 0) { return false; } // reflex, can't be an ear
+
+	    // now make sure we don't have other points inside the potential ear
+	    var p = ear.next.next;
+
+	    while (p !== ear.prev) {
+	        if (pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) &&
+	            area(p.prev, p, p.next) >= 0) { return false; }
+	        p = p.next;
+	    }
+
+	    return true;
+	}
+
+	function isEarHashed(ear, minX, minY, invSize) {
+	    var a = ear.prev,
+	        b = ear,
+	        c = ear.next;
+
+	    if (area(a, b, c) >= 0) { return false; } // reflex, can't be an ear
+
+	    // triangle bbox; min & max are calculated like this for speed
+	    var minTX = a.x < b.x ? (a.x < c.x ? a.x : c.x) : (b.x < c.x ? b.x : c.x),
+	        minTY = a.y < b.y ? (a.y < c.y ? a.y : c.y) : (b.y < c.y ? b.y : c.y),
+	        maxTX = a.x > b.x ? (a.x > c.x ? a.x : c.x) : (b.x > c.x ? b.x : c.x),
+	        maxTY = a.y > b.y ? (a.y > c.y ? a.y : c.y) : (b.y > c.y ? b.y : c.y);
+
+	    // z-order range for the current triangle bbox;
+	    var minZ = zOrder(minTX, minTY, minX, minY, invSize),
+	        maxZ = zOrder(maxTX, maxTY, minX, minY, invSize);
+
+	    var p = ear.prevZ,
+	        n = ear.nextZ;
+
+	    // look for points inside the triangle in both directions
+	    while (p && p.z >= minZ && n && n.z <= maxZ) {
+	        if (p !== ear.prev && p !== ear.next &&
+	            pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) &&
+	            area(p.prev, p, p.next) >= 0) { return false; }
+	        p = p.prevZ;
+
+	        if (n !== ear.prev && n !== ear.next &&
+	            pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y) &&
+	            area(n.prev, n, n.next) >= 0) { return false; }
+	        n = n.nextZ;
+	    }
+
+	    // look for remaining points in decreasing z-order
+	    while (p && p.z >= minZ) {
+	        if (p !== ear.prev && p !== ear.next &&
+	            pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) &&
+	            area(p.prev, p, p.next) >= 0) { return false; }
+	        p = p.prevZ;
+	    }
+
+	    // look for remaining points in increasing z-order
+	    while (n && n.z <= maxZ) {
+	        if (n !== ear.prev && n !== ear.next &&
+	            pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y) &&
+	            area(n.prev, n, n.next) >= 0) { return false; }
+	        n = n.nextZ;
+	    }
+
+	    return true;
+	}
+
+	// go through all polygon nodes and cure small local self-intersections
+	function cureLocalIntersections(start, triangles, dim) {
+	    var p = start;
+	    do {
+	        var a = p.prev,
+	            b = p.next.next;
+
+	        if (!equals(a, b) && intersects(a, p, p.next, b) && locallyInside(a, b) && locallyInside(b, a)) {
+
+	            triangles.push(a.i / dim);
+	            triangles.push(p.i / dim);
+	            triangles.push(b.i / dim);
+
+	            // remove two nodes involved
+	            removeNode(p);
+	            removeNode(p.next);
+
+	            p = start = b;
+	        }
+	        p = p.next;
+	    } while (p !== start);
+
+	    return filterPoints(p);
+	}
+
+	// try splitting polygon into two and triangulate them independently
+	function splitEarcut(start, triangles, dim, minX, minY, invSize) {
+	    // look for a valid diagonal that divides the polygon into two
+	    var a = start;
+	    do {
+	        var b = a.next.next;
+	        while (b !== a.prev) {
+	            if (a.i !== b.i && isValidDiagonal(a, b)) {
+	                // split the polygon in two by the diagonal
+	                var c = splitPolygon(a, b);
+
+	                // filter colinear points around the cuts
+	                a = filterPoints(a, a.next);
+	                c = filterPoints(c, c.next);
+
+	                // run earcut on each half
+	                earcutLinked(a, triangles, dim, minX, minY, invSize);
+	                earcutLinked(c, triangles, dim, minX, minY, invSize);
+	                return;
+	            }
+	            b = b.next;
+	        }
+	        a = a.next;
+	    } while (a !== start);
+	}
+
+	// link every hole into the outer loop, producing a single-ring polygon without holes
+	function eliminateHoles(data, holeIndices, outerNode, dim) {
+	    var queue = [],
+	        i, len, start, end, list;
+
+	    for (i = 0, len = holeIndices.length; i < len; i++) {
+	        start = holeIndices[i] * dim;
+	        end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;
+	        list = linkedList(data, start, end, dim, false);
+	        if (list === list.next) { list.steiner = true; }
+	        queue.push(getLeftmost(list));
+	    }
+
+	    queue.sort(compareX);
+
+	    // process holes from left to right
+	    for (i = 0; i < queue.length; i++) {
+	        eliminateHole(queue[i], outerNode);
+	        outerNode = filterPoints(outerNode, outerNode.next);
+	    }
+
+	    return outerNode;
+	}
+
+	function compareX(a, b) {
+	    return a.x - b.x;
+	}
+
+	// find a bridge between vertices that connects hole with an outer ring and and link it
+	function eliminateHole(hole, outerNode) {
+	    outerNode = findHoleBridge(hole, outerNode);
+	    if (outerNode) {
+	        var b = splitPolygon(outerNode, hole);
+	        filterPoints(b, b.next);
+	    }
+	}
+
+	// David Eberly's algorithm for finding a bridge between hole and outer polygon
+	function findHoleBridge(hole, outerNode) {
+	    var p = outerNode,
+	        hx = hole.x,
+	        hy = hole.y,
+	        qx = -Infinity,
+	        m;
+
+	    // find a segment intersected by a ray from the hole's leftmost point to the left;
+	    // segment's endpoint with lesser x will be potential connection point
+	    do {
+	        if (hy <= p.y && hy >= p.next.y && p.next.y !== p.y) {
+	            var x = p.x + (hy - p.y) * (p.next.x - p.x) / (p.next.y - p.y);
+	            if (x <= hx && x > qx) {
+	                qx = x;
+	                if (x === hx) {
+	                    if (hy === p.y) { return p; }
+	                    if (hy === p.next.y) { return p.next; }
+	                }
+	                m = p.x < p.next.x ? p : p.next;
+	            }
+	        }
+	        p = p.next;
+	    } while (p !== outerNode);
+
+	    if (!m) { return null; }
+
+	    if (hx === qx) { return m; } // hole touches outer segment; pick leftmost endpoint
+
+	    // look for points inside the triangle of hole point, segment intersection and endpoint;
+	    // if there are no points found, we have a valid connection;
+	    // otherwise choose the point of the minimum angle with the ray as connection point
+
+	    var stop = m,
+	        mx = m.x,
+	        my = m.y,
+	        tanMin = Infinity,
+	        tan;
+
+	    p = m;
+
+	    do {
+	        if (hx >= p.x && p.x >= mx && hx !== p.x &&
+	                pointInTriangle(hy < my ? hx : qx, hy, mx, my, hy < my ? qx : hx, hy, p.x, p.y)) {
+
+	            tan = Math.abs(hy - p.y) / (hx - p.x); // tangential
+
+	            if (locallyInside(p, hole) &&
+	                (tan < tanMin || (tan === tanMin && (p.x > m.x || (p.x === m.x && sectorContainsSector(m, p)))))) {
+	                m = p;
+	                tanMin = tan;
+	            }
+	        }
+
+	        p = p.next;
+	    } while (p !== stop);
+
+	    return m;
+	}
+
+	// whether sector in vertex m contains sector in vertex p in the same coordinates
+	function sectorContainsSector(m, p) {
+	    return area(m.prev, m, p.prev) < 0 && area(p.next, m, m.next) < 0;
+	}
+
+	// interlink polygon nodes in z-order
+	function indexCurve(start, minX, minY, invSize) {
+	    var p = start;
+	    do {
+	        if (p.z === null) { p.z = zOrder(p.x, p.y, minX, minY, invSize); }
+	        p.prevZ = p.prev;
+	        p.nextZ = p.next;
+	        p = p.next;
+	    } while (p !== start);
+
+	    p.prevZ.nextZ = null;
+	    p.prevZ = null;
+
+	    sortLinked(p);
+	}
+
+	// Simon Tatham's linked list merge sort algorithm
+	// http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html
+	function sortLinked(list) {
+	    var i, p, q, e, tail, numMerges, pSize, qSize,
+	        inSize = 1;
+
+	    do {
+	        p = list;
+	        list = null;
+	        tail = null;
+	        numMerges = 0;
+
+	        while (p) {
+	            numMerges++;
+	            q = p;
+	            pSize = 0;
+	            for (i = 0; i < inSize; i++) {
+	                pSize++;
+	                q = q.nextZ;
+	                if (!q) { break; }
+	            }
+	            qSize = inSize;
+
+	            while (pSize > 0 || (qSize > 0 && q)) {
+
+	                if (pSize !== 0 && (qSize === 0 || !q || p.z <= q.z)) {
+	                    e = p;
+	                    p = p.nextZ;
+	                    pSize--;
+	                } else {
+	                    e = q;
+	                    q = q.nextZ;
+	                    qSize--;
+	                }
+
+	                if (tail) { tail.nextZ = e; }
+	                else { list = e; }
+
+	                e.prevZ = tail;
+	                tail = e;
+	            }
+
+	            p = q;
+	        }
+
+	        tail.nextZ = null;
+	        inSize *= 2;
+
+	    } while (numMerges > 1);
+
+	    return list;
+	}
+
+	// z-order of a point given coords and inverse of the longer side of data bbox
+	function zOrder(x, y, minX, minY, invSize) {
+	    // coords are transformed into non-negative 15-bit integer range
+	    x = 32767 * (x - minX) * invSize;
+	    y = 32767 * (y - minY) * invSize;
+
+	    x = (x | (x << 8)) & 0x00FF00FF;
+	    x = (x | (x << 4)) & 0x0F0F0F0F;
+	    x = (x | (x << 2)) & 0x33333333;
+	    x = (x | (x << 1)) & 0x55555555;
+
+	    y = (y | (y << 8)) & 0x00FF00FF;
+	    y = (y | (y << 4)) & 0x0F0F0F0F;
+	    y = (y | (y << 2)) & 0x33333333;
+	    y = (y | (y << 1)) & 0x55555555;
+
+	    return x | (y << 1);
+	}
+
+	// find the leftmost node of a polygon ring
+	function getLeftmost(start) {
+	    var p = start,
+	        leftmost = start;
+	    do {
+	        if (p.x < leftmost.x || (p.x === leftmost.x && p.y < leftmost.y)) { leftmost = p; }
+	        p = p.next;
+	    } while (p !== start);
+
+	    return leftmost;
+	}
+
+	// check if a point lies within a convex triangle
+	function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {
+	    return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 &&
+	           (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 &&
+	           (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;
+	}
+
+	// check if a diagonal between two polygon nodes is valid (lies in polygon interior)
+	function isValidDiagonal(a, b) {
+	    return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) && // dones't intersect other edges
+	           (locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b) && // locally visible
+	            (area(a.prev, a, b.prev) || area(a, b.prev, b)) || // does not create opposite-facing sectors
+	            equals(a, b) && area(a.prev, a, a.next) > 0 && area(b.prev, b, b.next) > 0); // special zero-length case
+	}
+
+	// signed area of a triangle
+	function area(p, q, r) {
+	    return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);
+	}
+
+	// check if two points are equal
+	function equals(p1, p2) {
+	    return p1.x === p2.x && p1.y === p2.y;
+	}
+
+	// check if two segments intersect
+	function intersects(p1, q1, p2, q2) {
+	    var o1 = sign(area(p1, q1, p2));
+	    var o2 = sign(area(p1, q1, q2));
+	    var o3 = sign(area(p2, q2, p1));
+	    var o4 = sign(area(p2, q2, q1));
+
+	    if (o1 !== o2 && o3 !== o4) { return true; } // general case
+
+	    if (o1 === 0 && onSegment(p1, p2, q1)) { return true; } // p1, q1 and p2 are collinear and p2 lies on p1q1
+	    if (o2 === 0 && onSegment(p1, q2, q1)) { return true; } // p1, q1 and q2 are collinear and q2 lies on p1q1
+	    if (o3 === 0 && onSegment(p2, p1, q2)) { return true; } // p2, q2 and p1 are collinear and p1 lies on p2q2
+	    if (o4 === 0 && onSegment(p2, q1, q2)) { return true; } // p2, q2 and q1 are collinear and q1 lies on p2q2
+
+	    return false;
+	}
+
+	// for collinear points p, q, r, check if point q lies on segment pr
+	function onSegment(p, q, r) {
+	    return q.x <= Math.max(p.x, r.x) && q.x >= Math.min(p.x, r.x) && q.y <= Math.max(p.y, r.y) && q.y >= Math.min(p.y, r.y);
+	}
+
+	function sign(num) {
+	    return num > 0 ? 1 : num < 0 ? -1 : 0;
+	}
+
+	// check if a polygon diagonal intersects any polygon segments
+	function intersectsPolygon(a, b) {
+	    var p = a;
+	    do {
+	        if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&
+	                intersects(p, p.next, a, b)) { return true; }
+	        p = p.next;
+	    } while (p !== a);
+
+	    return false;
+	}
+
+	// check if a polygon diagonal is locally inside the polygon
+	function locallyInside(a, b) {
+	    return area(a.prev, a, a.next) < 0 ?
+	        area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 :
+	        area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;
+	}
+
+	// check if the middle point of a polygon diagonal is inside the polygon
+	function middleInside(a, b) {
+	    var p = a,
+	        inside = false,
+	        px = (a.x + b.x) / 2,
+	        py = (a.y + b.y) / 2;
+	    do {
+	        if (((p.y > py) !== (p.next.y > py)) && p.next.y !== p.y &&
+	                (px < (p.next.x - p.x) * (py - p.y) / (p.next.y - p.y) + p.x))
+	            { inside = !inside; }
+	        p = p.next;
+	    } while (p !== a);
+
+	    return inside;
+	}
+
+	// link two polygon vertices with a bridge; if the vertices belong to the same ring, it splits polygon into two;
+	// if one belongs to the outer ring and another to a hole, it merges it into a single ring
+	function splitPolygon(a, b) {
+	    var a2 = new Node(a.i, a.x, a.y),
+	        b2 = new Node(b.i, b.x, b.y),
+	        an = a.next,
+	        bp = b.prev;
+
+	    a.next = b;
+	    b.prev = a;
+
+	    a2.next = an;
+	    an.prev = a2;
+
+	    b2.next = a2;
+	    a2.prev = b2;
+
+	    bp.next = b2;
+	    b2.prev = bp;
+
+	    return b2;
+	}
+
+	// create a node and optionally link it with previous one (in a circular doubly linked list)
+	function insertNode(i, x, y, last) {
+	    var p = new Node(i, x, y);
+
+	    if (!last) {
+	        p.prev = p;
+	        p.next = p;
+
+	    } else {
+	        p.next = last.next;
+	        p.prev = last;
+	        last.next.prev = p;
+	        last.next = p;
+	    }
+	    return p;
+	}
+
+	function removeNode(p) {
+	    p.next.prev = p.prev;
+	    p.prev.next = p.next;
+
+	    if (p.prevZ) { p.prevZ.nextZ = p.nextZ; }
+	    if (p.nextZ) { p.nextZ.prevZ = p.prevZ; }
+	}
+
+	function Node(i, x, y) {
+	    // vertex index in coordinates array
+	    this.i = i;
+
+	    // vertex coordinates
+	    this.x = x;
+	    this.y = y;
+
+	    // previous and next vertex nodes in a polygon ring
+	    this.prev = null;
+	    this.next = null;
+
+	    // z-order curve value
+	    this.z = null;
+
+	    // previous and next nodes in z-order
+	    this.prevZ = null;
+	    this.nextZ = null;
+
+	    // indicates whether this is a steiner point
+	    this.steiner = false;
+	}
+
+	// return a percentage difference between the polygon area and its triangulation area;
+	// used to verify correctness of triangulation
+	earcut.deviation = function (data, holeIndices, dim, triangles) {
+	    var hasHoles = holeIndices && holeIndices.length;
+	    var outerLen = hasHoles ? holeIndices[0] * dim : data.length;
+
+	    var polygonArea = Math.abs(signedArea(data, 0, outerLen, dim));
+	    if (hasHoles) {
+	        for (var i = 0, len = holeIndices.length; i < len; i++) {
+	            var start = holeIndices[i] * dim;
+	            var end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;
+	            polygonArea -= Math.abs(signedArea(data, start, end, dim));
+	        }
+	    }
+
+	    var trianglesArea = 0;
+	    for (i = 0; i < triangles.length; i += 3) {
+	        var a = triangles[i] * dim;
+	        var b = triangles[i + 1] * dim;
+	        var c = triangles[i + 2] * dim;
+	        trianglesArea += Math.abs(
+	            (data[a] - data[c]) * (data[b + 1] - data[a + 1]) -
+	            (data[a] - data[b]) * (data[c + 1] - data[a + 1]));
+	    }
+
+	    return polygonArea === 0 && trianglesArea === 0 ? 0 :
+	        Math.abs((trianglesArea - polygonArea) / polygonArea);
+	};
+
+	function signedArea(data, start, end, dim) {
+	    var sum = 0;
+	    for (var i = start, j = end - dim; i < end; i += dim) {
+	        sum += (data[j] - data[i]) * (data[i + 1] + data[j + 1]);
+	        j = i;
+	    }
+	    return sum;
+	}
+
+	// turn a polygon in a multi-dimensional array form (e.g. as in GeoJSON) into a form Earcut accepts
+	earcut.flatten = function (data) {
+	    var dim = data[0][0].length,
+	        result = {vertices: [], holes: [], dimensions: dim},
+	        holeIndex = 0;
+
+	    for (var i = 0; i < data.length; i++) {
+	        for (var j = 0; j < data[i].length; j++) {
+	            for (var d = 0; d < dim; d++) { result.vertices.push(data[i][j][d]); }
+	        }
+	        if (i > 0) {
+	            holeIndex += data[i - 1].length;
+	            result.holes.push(holeIndex);
+	        }
+	    }
+	    return result;
+	};
+	earcut_1.default = default_1;
+
+	var punycode = createCommonjsModule(function (module, exports) {
+	/*! https://mths.be/punycode v1.3.2 by @mathias */
+	;(function(root) {
+
+		/** Detect free variables */
+		var freeExports = 'object' == 'object' && exports &&
+			!exports.nodeType && exports;
+		var freeModule = 'object' == 'object' && module &&
+			!module.nodeType && module;
+		var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal;
+		if (
+			freeGlobal.global === freeGlobal ||
+			freeGlobal.window === freeGlobal ||
+			freeGlobal.self === freeGlobal
+		) {
+			root = freeGlobal;
+		}
+
+		/**
+		 * The `punycode` object.
+		 * @name punycode
+		 * @type Object
+		 */
+		var punycode,
+
+		/** Highest positive signed 32-bit float value */
+		maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1
+
+		/** Bootstring parameters */
+		base = 36,
+		tMin = 1,
+		tMax = 26,
+		skew = 38,
+		damp = 700,
+		initialBias = 72,
+		initialN = 128, // 0x80
+		delimiter = '-', // '\x2D'
+
+		/** Regular expressions */
+		regexPunycode = /^xn--/,
+		regexNonASCII = /[^\x20-\x7E]/, // unprintable ASCII chars + non-ASCII chars
+		regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, // RFC 3490 separators
+
+		/** Error messages */
+		errors = {
+			'overflow': 'Overflow: input needs wider integers to process',
+			'not-basic': 'Illegal input >= 0x80 (not a basic code point)',
+			'invalid-input': 'Invalid input'
+		},
+
+		/** Convenience shortcuts */
+		baseMinusTMin = base - tMin,
+		floor = Math.floor,
+		stringFromCharCode = String.fromCharCode,
+
+		/** Temporary variable */
+		key;
+
+		/*--------------------------------------------------------------------------*/
+
+		/**
+		 * A generic error utility function.
+		 * @private
+		 * @param {String} type The error type.
+		 * @returns {Error} Throws a `RangeError` with the applicable error message.
+		 */
+		function error(type) {
+			throw RangeError(errors[type]);
+		}
+
+		/**
+		 * A generic `Array#map` utility function.
+		 * @private
+		 * @param {Array} array The array to iterate over.
+		 * @param {Function} callback The function that gets called for every array
+		 * item.
+		 * @returns {Array} A new array of values returned by the callback function.
+		 */
+		function map(array, fn) {
+			var length = array.length;
+			var result = [];
+			while (length--) {
+				result[length] = fn(array[length]);
+			}
+			return result;
+		}
+
+		/**
+		 * A simple `Array#map`-like wrapper to work with domain name strings or email
+		 * addresses.
+		 * @private
+		 * @param {String} domain The domain name or email address.
+		 * @param {Function} callback The function that gets called for every
+		 * character.
+		 * @returns {Array} A new string of characters returned by the callback
+		 * function.
+		 */
+		function mapDomain(string, fn) {
+			var parts = string.split('@');
+			var result = '';
+			if (parts.length > 1) {
+				// In email addresses, only the domain name should be punycoded. Leave
+				// the local part (i.e. everything up to `@`) intact.
+				result = parts[0] + '@';
+				string = parts[1];
+			}
+			// Avoid `split(regex)` for IE8 compatibility. See #17.
+			string = string.replace(regexSeparators, '\x2E');
+			var labels = string.split('.');
+			var encoded = map(labels, fn).join('.');
+			return result + encoded;
+		}
+
+		/**
+		 * Creates an array containing the numeric code points of each Unicode
+		 * character in the string. While JavaScript uses UCS-2 internally,
+		 * this function will convert a pair of surrogate halves (each of which
+		 * UCS-2 exposes as separate characters) into a single code point,
+		 * matching UTF-16.
+		 * @see `punycode.ucs2.encode`
+		 * @see <https://mathiasbynens.be/notes/javascript-encoding>
+		 * @memberOf punycode.ucs2
+		 * @name decode
+		 * @param {String} string The Unicode input string (UCS-2).
+		 * @returns {Array} The new array of code points.
+		 */
+		function ucs2decode(string) {
+			var output = [],
+			    counter = 0,
+			    length = string.length,
+			    value,
+			    extra;
+			while (counter < length) {
+				value = string.charCodeAt(counter++);
+				if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
+					// high surrogate, and there is a next character
+					extra = string.charCodeAt(counter++);
+					if ((extra & 0xFC00) == 0xDC00) { // low surrogate
+						output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
+					} else {
+						// unmatched surrogate; only append this code unit, in case the next
+						// code unit is the high surrogate of a surrogate pair
+						output.push(value);
+						counter--;
+					}
+				} else {
+					output.push(value);
+				}
+			}
+			return output;
+		}
+
+		/**
+		 * Creates a string based on an array of numeric code points.
+		 * @see `punycode.ucs2.decode`
+		 * @memberOf punycode.ucs2
+		 * @name encode
+		 * @param {Array} codePoints The array of numeric code points.
+		 * @returns {String} The new Unicode string (UCS-2).
+		 */
+		function ucs2encode(array) {
+			return map(array, function(value) {
+				var output = '';
+				if (value > 0xFFFF) {
+					value -= 0x10000;
+					output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);
+					value = 0xDC00 | value & 0x3FF;
+				}
+				output += stringFromCharCode(value);
+				return output;
+			}).join('');
+		}
+
+		/**
+		 * Converts a basic code point into a digit/integer.
+		 * @see `digitToBasic()`
+		 * @private
+		 * @param {Number} codePoint The basic numeric code point value.
+		 * @returns {Number} The numeric value of a basic code point (for use in
+		 * representing integers) in the range `0` to `base - 1`, or `base` if
+		 * the code point does not represent a value.
+		 */
+		function basicToDigit(codePoint) {
+			if (codePoint - 48 < 10) {
+				return codePoint - 22;
+			}
+			if (codePoint - 65 < 26) {
+				return codePoint - 65;
+			}
+			if (codePoint - 97 < 26) {
+				return codePoint - 97;
+			}
+			return base;
+		}
+
+		/**
+		 * Converts a digit/integer into a basic code point.
+		 * @see `basicToDigit()`
+		 * @private
+		 * @param {Number} digit The numeric value of a basic code point.
+		 * @returns {Number} The basic code point whose value (when used for
+		 * representing integers) is `digit`, which needs to be in the range
+		 * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is
+		 * used; else, the lowercase form is used. The behavior is undefined
+		 * if `flag` is non-zero and `digit` has no uppercase form.
+		 */
+		function digitToBasic(digit, flag) {
+			//  0..25 map to ASCII a..z or A..Z
+			// 26..35 map to ASCII 0..9
+			return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
+		}
+
+		/**
+		 * Bias adaptation function as per section 3.4 of RFC 3492.
+		 * http://tools.ietf.org/html/rfc3492#section-3.4
+		 * @private
+		 */
+		function adapt(delta, numPoints, firstTime) {
+			var k = 0;
+			delta = firstTime ? floor(delta / damp) : delta >> 1;
+			delta += floor(delta / numPoints);
+			for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {
+				delta = floor(delta / baseMinusTMin);
+			}
+			return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
+		}
+
+		/**
+		 * Converts a Punycode string of ASCII-only symbols to a string of Unicode
+		 * symbols.
+		 * @memberOf punycode
+		 * @param {String} input The Punycode string of ASCII-only symbols.
+		 * @returns {String} The resulting string of Unicode symbols.
+		 */
+		function decode(input) {
+			// Don't use UCS-2
+			var output = [],
+			    inputLength = input.length,
+			    out,
+			    i = 0,
+			    n = initialN,
+			    bias = initialBias,
+			    basic,
+			    j,
+			    index,
+			    oldi,
+			    w,
+			    k,
+			    digit,
+			    t,
+			    /** Cached calculation results */
+			    baseMinusT;
+
+			// Handle the basic code points: let `basic` be the number of input code
+			// points before the last delimiter, or `0` if there is none, then copy
+			// the first basic code points to the output.
+
+			basic = input.lastIndexOf(delimiter);
+			if (basic < 0) {
+				basic = 0;
+			}
+
+			for (j = 0; j < basic; ++j) {
+				// if it's not a basic code point
+				if (input.charCodeAt(j) >= 0x80) {
+					error('not-basic');
+				}
+				output.push(input.charCodeAt(j));
+			}
+
+			// Main decoding loop: start just after the last delimiter if any basic code
+			// points were copied; start at the beginning otherwise.
+
+			for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {
+
+				// `index` is the index of the next character to be consumed.
+				// Decode a generalized variable-length integer into `delta`,
+				// which gets added to `i`. The overflow checking is easier
+				// if we increase `i` as we go, then subtract off its starting
+				// value at the end to obtain `delta`.
+				for (oldi = i, w = 1, k = base; /* no condition */; k += base) {
+
+					if (index >= inputLength) {
+						error('invalid-input');
+					}
+
+					digit = basicToDigit(input.charCodeAt(index++));
+
+					if (digit >= base || digit > floor((maxInt - i) / w)) {
+						error('overflow');
+					}
+
+					i += digit * w;
+					t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
+
+					if (digit < t) {
+						break;
+					}
+
+					baseMinusT = base - t;
+					if (w > floor(maxInt / baseMinusT)) {
+						error('overflow');
+					}
+
+					w *= baseMinusT;
+
+				}
+
+				out = output.length + 1;
+				bias = adapt(i - oldi, out, oldi == 0);
+
+				// `i` was supposed to wrap around from `out` to `0`,
+				// incrementing `n` each time, so we'll fix that now:
+				if (floor(i / out) > maxInt - n) {
+					error('overflow');
+				}
+
+				n += floor(i / out);
+				i %= out;
+
+				// Insert `n` at position `i` of the output
+				output.splice(i++, 0, n);
+
+			}
+
+			return ucs2encode(output);
+		}
+
+		/**
+		 * Converts a string of Unicode symbols (e.g. a domain name label) to a
+		 * Punycode string of ASCII-only symbols.
+		 * @memberOf punycode
+		 * @param {String} input The string of Unicode symbols.
+		 * @returns {String} The resulting Punycode string of ASCII-only symbols.
+		 */
+		function encode(input) {
+			var n,
+			    delta,
+			    handledCPCount,
+			    basicLength,
+			    bias,
+			    j,
+			    m,
+			    q,
+			    k,
+			    t,
+			    currentValue,
+			    output = [],
+			    /** `inputLength` will hold the number of code points in `input`. */
+			    inputLength,
+			    /** Cached calculation results */
+			    handledCPCountPlusOne,
+			    baseMinusT,
+			    qMinusT;
+
+			// Convert the input in UCS-2 to Unicode
+			input = ucs2decode(input);
+
+			// Cache the length
+			inputLength = input.length;
+
+			// Initialize the state
+			n = initialN;
+			delta = 0;
+			bias = initialBias;
+
+			// Handle the basic code points
+			for (j = 0; j < inputLength; ++j) {
+				currentValue = input[j];
+				if (currentValue < 0x80) {
+					output.push(stringFromCharCode(currentValue));
+				}
+			}
+
+			handledCPCount = basicLength = output.length;
+
+			// `handledCPCount` is the number of code points that have been handled;
+			// `basicLength` is the number of basic code points.
+
+			// Finish the basic string - if it is not empty - with a delimiter
+			if (basicLength) {
+				output.push(delimiter);
+			}
+
+			// Main encoding loop:
+			while (handledCPCount < inputLength) {
+
+				// All non-basic code points < n have been handled already. Find the next
+				// larger one:
+				for (m = maxInt, j = 0; j < inputLength; ++j) {
+					currentValue = input[j];
+					if (currentValue >= n && currentValue < m) {
+						m = currentValue;
+					}
+				}
+
+				// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,
+				// but guard against overflow
+				handledCPCountPlusOne = handledCPCount + 1;
+				if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
+					error('overflow');
+				}
+
+				delta += (m - n) * handledCPCountPlusOne;
+				n = m;
+
+				for (j = 0; j < inputLength; ++j) {
+					currentValue = input[j];
+
+					if (currentValue < n && ++delta > maxInt) {
+						error('overflow');
+					}
+
+					if (currentValue == n) {
+						// Represent delta as a generalized variable-length integer
+						for (q = delta, k = base; /* no condition */; k += base) {
+							t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
+							if (q < t) {
+								break;
+							}
+							qMinusT = q - t;
+							baseMinusT = base - t;
+							output.push(
+								stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))
+							);
+							q = floor(qMinusT / baseMinusT);
+						}
+
+						output.push(stringFromCharCode(digitToBasic(q, 0)));
+						bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
+						delta = 0;
+						++handledCPCount;
+					}
+				}
+
+				++delta;
+				++n;
+
+			}
+			return output.join('');
+		}
+
+		/**
+		 * Converts a Punycode string representing a domain name or an email address
+		 * to Unicode. Only the Punycoded parts of the input will be converted, i.e.
+		 * it doesn't matter if you call it on a string that has already been
+		 * converted to Unicode.
+		 * @memberOf punycode
+		 * @param {String} input The Punycoded domain name or email address to
+		 * convert to Unicode.
+		 * @returns {String} The Unicode representation of the given Punycode
+		 * string.
+		 */
+		function toUnicode(input) {
+			return mapDomain(input, function(string) {
+				return regexPunycode.test(string)
+					? decode(string.slice(4).toLowerCase())
+					: string;
+			});
+		}
+
+		/**
+		 * Converts a Unicode string representing a domain name or an email address to
+		 * Punycode. Only the non-ASCII parts of the domain name will be converted,
+		 * i.e. it doesn't matter if you call it with a domain that's already in
+		 * ASCII.
+		 * @memberOf punycode
+		 * @param {String} input The domain name or email address to convert, as a
+		 * Unicode string.
+		 * @returns {String} The Punycode representation of the given domain name or
+		 * email address.
+		 */
+		function toASCII(input) {
+			return mapDomain(input, function(string) {
+				return regexNonASCII.test(string)
+					? 'xn--' + encode(string)
+					: string;
+			});
+		}
+
+		/*--------------------------------------------------------------------------*/
+
+		/** Define the public API */
+		punycode = {
+			/**
+			 * A string representing the current Punycode.js version number.
+			 * @memberOf punycode
+			 * @type String
+			 */
+			'version': '1.3.2',
+			/**
+			 * An object of methods to convert from JavaScript's internal character
+			 * representation (UCS-2) to Unicode code points, and back.
+			 * @see <https://mathiasbynens.be/notes/javascript-encoding>
+			 * @memberOf punycode
+			 * @type Object
+			 */
+			'ucs2': {
+				'decode': ucs2decode,
+				'encode': ucs2encode
+			},
+			'decode': decode,
+			'encode': encode,
+			'toASCII': toASCII,
+			'toUnicode': toUnicode
+		};
+
+		/** Expose `punycode` */
+		// Some AMD build optimizers, like r.js, check for specific condition patterns
+		// like the following:
+		if (
+			typeof undefined == 'function' &&
+			typeof undefined.amd == 'object' &&
+			undefined.amd
+		) {
+			undefined('punycode', function() {
+				return punycode;
+			});
+		} else if (freeExports && freeModule) {
+			if (module.exports == freeExports) { // in Node.js or RingoJS v0.8.0+
+				freeModule.exports = punycode;
+			} else { // in Narwhal or RingoJS v0.7.0-
+				for (key in punycode) {
+					punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);
+				}
+			}
+		} else { // in Rhino or a web browser
+			root.punycode = punycode;
+		}
+
+	}(commonjsGlobal));
+	});
+
+	'use strict';
+
+	var util = {
+	  isString: function(arg) {
+	    return typeof(arg) === 'string';
+	  },
+	  isObject: function(arg) {
+	    return typeof(arg) === 'object' && arg !== null;
+	  },
+	  isNull: function(arg) {
+	    return arg === null;
+	  },
+	  isNullOrUndefined: function(arg) {
+	    return arg == null;
+	  }
+	};
+	var util_1 = util.isString;
+	var util_2 = util.isObject;
+	var util_3 = util.isNull;
+	var util_4 = util.isNullOrUndefined;
+
+	// Copyright Joyent, Inc. and other Node contributors.
+	//
+	// Permission is hereby granted, free of charge, to any person obtaining a
+	// copy of this software and associated documentation files (the
+	// "Software"), to deal in the Software without restriction, including
+	// without limitation the rights to use, copy, modify, merge, publish,
+	// distribute, sublicense, and/or sell copies of the Software, and to permit
+	// persons to whom the Software is furnished to do so, subject to the
+	// following conditions:
+	//
+	// The above copyright notice and this permission notice shall be included
+	// in all copies or substantial portions of the Software.
+	//
+	// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+	// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+	// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+	// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+	// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+	// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+	// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+	'use strict';
+
+	// If obj.hasOwnProperty has been overridden, then calling
+	// obj.hasOwnProperty(prop) will break.
+	// See: https://github.com/joyent/node/issues/1707
+	function hasOwnProperty$1(obj, prop) {
+	  return Object.prototype.hasOwnProperty.call(obj, prop);
+	}
+
+	var decode = function(qs, sep, eq, options) {
+	  sep = sep || '&';
+	  eq = eq || '=';
+	  var obj = {};
+
+	  if (typeof qs !== 'string' || qs.length === 0) {
+	    return obj;
+	  }
+
+	  var regexp = /\+/g;
+	  qs = qs.split(sep);
+
+	  var maxKeys = 1000;
+	  if (options && typeof options.maxKeys === 'number') {
+	    maxKeys = options.maxKeys;
+	  }
+
+	  var len = qs.length;
+	  // maxKeys <= 0 means that we should not limit keys count
+	  if (maxKeys > 0 && len > maxKeys) {
+	    len = maxKeys;
+	  }
+
+	  for (var i = 0; i < len; ++i) {
+	    var x = qs[i].replace(regexp, '%20'),
+	        idx = x.indexOf(eq),
+	        kstr, vstr, k, v;
+
+	    if (idx >= 0) {
+	      kstr = x.substr(0, idx);
+	      vstr = x.substr(idx + 1);
+	    } else {
+	      kstr = x;
+	      vstr = '';
+	    }
+
+	    k = decodeURIComponent(kstr);
+	    v = decodeURIComponent(vstr);
+
+	    if (!hasOwnProperty$1(obj, k)) {
+	      obj[k] = v;
+	    } else if (Array.isArray(obj[k])) {
+	      obj[k].push(v);
+	    } else {
+	      obj[k] = [obj[k], v];
+	    }
+	  }
+
+	  return obj;
+	};
+
+	// Copyright Joyent, Inc. and other Node contributors.
+	//
+	// Permission is hereby granted, free of charge, to any person obtaining a
+	// copy of this software and associated documentation files (the
+	// "Software"), to deal in the Software without restriction, including
+	// without limitation the rights to use, copy, modify, merge, publish,
+	// distribute, sublicense, and/or sell copies of the Software, and to permit
+	// persons to whom the Software is furnished to do so, subject to the
+	// following conditions:
+	//
+	// The above copyright notice and this permission notice shall be included
+	// in all copies or substantial portions of the Software.
+	//
+	// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+	// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+	// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+	// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+	// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+	// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+	// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+	'use strict';
+
+	var stringifyPrimitive = function(v) {
+	  switch (typeof v) {
+	    case 'string':
+	      return v;
+
+	    case 'boolean':
+	      return v ? 'true' : 'false';
+
+	    case 'number':
+	      return isFinite(v) ? v : '';
+
+	    default:
+	      return '';
+	  }
+	};
+
+	var encode = function(obj, sep, eq, name) {
+	  sep = sep || '&';
+	  eq = eq || '=';
+	  if (obj === null) {
+	    obj = undefined;
+	  }
+
+	  if (typeof obj === 'object') {
+	    return Object.keys(obj).map(function(k) {
+	      var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;
+	      if (Array.isArray(obj[k])) {
+	        return obj[k].map(function(v) {
+	          return ks + encodeURIComponent(stringifyPrimitive(v));
+	        }).join(sep);
+	      } else {
+	        return ks + encodeURIComponent(stringifyPrimitive(obj[k]));
+	      }
+	    }).join(sep);
+
+	  }
+
+	  if (!name) { return ''; }
+	  return encodeURIComponent(stringifyPrimitive(name)) + eq +
+	         encodeURIComponent(stringifyPrimitive(obj));
+	};
+
+	var querystring = createCommonjsModule(function (module, exports) {
+	'use strict';
+
+	exports.decode = exports.parse = decode;
+	exports.encode = exports.stringify = encode;
+	});
+	var querystring_1 = querystring.decode;
+	var querystring_2 = querystring.parse;
+	var querystring_3 = querystring.encode;
+	var querystring_4 = querystring.stringify;
+
+	// Copyright Joyent, Inc. and other Node contributors.
+	//
+	// Permission is hereby granted, free of charge, to any person obtaining a
+	// copy of this software and associated documentation files (the
+	// "Software"), to deal in the Software without restriction, including
+	// without limitation the rights to use, copy, modify, merge, publish,
+	// distribute, sublicense, and/or sell copies of the Software, and to permit
+	// persons to whom the Software is furnished to do so, subject to the
+	// following conditions:
+	//
+	// The above copyright notice and this permission notice shall be included
+	// in all copies or substantial portions of the Software.
+	//
+	// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+	// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+	// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+	// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+	// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+	// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+	// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+	'use strict';
+
+
+
+
+	var parse = urlParse;
+	var resolve = urlResolve;
+	var resolveObject = urlResolveObject;
+	var format = urlFormat;
+
+	var Url_1 = Url;
+
+	function Url() {
+	  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;
+	}
+
+	// Reference: RFC 3986, RFC 1808, RFC 2396
+
+	// define these here so at least they only have to be
+	// compiled once on the first module load.
+	var protocolPattern = /^([a-z0-9.+-]+:)/i,
+	    portPattern = /:[0-9]*$/,
+
+	    // Special case for a simple path URL
+	    simplePathPattern = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,
+
+	    // RFC 2396: characters reserved for delimiting URLs.
+	    // We actually just auto-escape these.
+	    delims = ['<', '>', '"', '`', ' ', '\r', '\n', '\t'],
+
+	    // RFC 2396: characters not allowed for various reasons.
+	    unwise = ['{', '}', '|', '\\', '^', '`'].concat(delims),
+
+	    // Allowed by RFCs, but cause of XSS attacks.  Always escape these.
+	    autoEscape = ['\''].concat(unwise),
+	    // Characters that are never ever allowed in a hostname.
+	    // Note that any invalid chars are also handled, but these
+	    // are the ones that are *expected* to be seen, so we fast-path
+	    // them.
+	    nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape),
+	    hostEndingChars = ['/', '?', '#'],
+	    hostnameMaxLen = 255,
+	    hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,
+	    hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,
+	    // protocols that can allow "unsafe" and "unwise" chars.
+	    unsafeProtocol = {
+	      'javascript': true,
+	      'javascript:': true
+	    },
+	    // protocols that never have a hostname.
+	    hostlessProtocol = {
+	      'javascript': true,
+	      'javascript:': true
+	    },
+	    // protocols that always contain a // bit.
+	    slashedProtocol = {
+	      'http': true,
+	      'https': true,
+	      'ftp': true,
+	      'gopher': true,
+	      'file': true,
+	      'http:': true,
+	      'https:': true,
+	      'ftp:': true,
+	      'gopher:': true,
+	      'file:': true
+	    };
+
+	function urlParse(url, parseQueryString, slashesDenoteHost) {
+	  if (url && util.isObject(url) && url instanceof Url) { return url; }
+
+	  var u = new Url;
+	  u.parse(url, parseQueryString, slashesDenoteHost);
+	  return u;
+	}
+
+	Url.prototype.parse = function(url, parseQueryString, slashesDenoteHost) {
+	  if (!util.isString(url)) {
+	    throw new TypeError("Parameter 'url' must be a string, not " + typeof url);
+	  }
+
+	  // Copy chrome, IE, opera backslash-handling behavior.
+	  // Back slashes before the query string get converted to forward slashes
+	  // See: https://code.google.com/p/chromium/issues/detail?id=25916
+	  var queryIndex = url.indexOf('?'),
+	      splitter =
+	          (queryIndex !== -1 && queryIndex < url.indexOf('#')) ? '?' : '#',
+	      uSplit = url.split(splitter),
+	      slashRegex = /\\/g;
+	  uSplit[0] = uSplit[0].replace(slashRegex, '/');
+	  url = uSplit.join(splitter);
+
+	  var rest = url;
+
+	  // trim before proceeding.
+	  // This is to support parse stuff like "  http://foo.com  \n"
+	  rest = rest.trim();
+
+	  if (!slashesDenoteHost && url.split('#').length === 1) {
+	    // Try fast path regexp
+	    var simplePath = simplePathPattern.exec(rest);
+	    if (simplePath) {
+	      this.path = rest;
+	      this.href = rest;
+	      this.pathname = simplePath[1];
+	      if (simplePath[2]) {
+	        this.search = simplePath[2];
+	        if (parseQueryString) {
+	          this.query = querystring.parse(this.search.substr(1));
+	        } else {
+	          this.query = this.search.substr(1);
+	        }
+	      } else if (parseQueryString) {
+	        this.search = '';
+	        this.query = {};
+	      }
+	      return this;
+	    }
+	  }
+
+	  var proto = protocolPattern.exec(rest);
+	  if (proto) {
+	    proto = proto[0];
+	    var lowerProto = proto.toLowerCase();
+	    this.protocol = lowerProto;
+	    rest = rest.substr(proto.length);
+	  }
+
+	  // figure out if it's got a host
+	  // user@server is *always* interpreted as a hostname, and url
+	  // resolution will treat //foo/bar as host=foo,path=bar because that's
+	  // how the browser resolves relative URLs.
+	  if (slashesDenoteHost || proto || rest.match(/^\/\/[^@\/]+@[^@\/]+/)) {
+	    var slashes = rest.substr(0, 2) === '//';
+	    if (slashes && !(proto && hostlessProtocol[proto])) {
+	      rest = rest.substr(2);
+	      this.slashes = true;
+	    }
+	  }
+
+	  if (!hostlessProtocol[proto] &&
+	      (slashes || (proto && !slashedProtocol[proto]))) {
+
+	    // there's a hostname.
+	    // the first instance of /, ?, ;, or # ends the host.
+	    //
+	    // If there is an @ in the hostname, then non-host chars *are* allowed
+	    // to the left of the last @ sign, unless some host-ending character
+	    // comes *before* the @-sign.
+	    // URLs are obnoxious.
+	    //
+	    // ex:
+	    // http://a@b@c/ => user:a@b host:c
+	    // http://a@b?@c => user:a host:c path:/?@c
+
+	    // v0.12 TODO(isaacs): This is not quite how Chrome does things.
+	    // Review our test case against browsers more comprehensively.
+
+	    // find the first instance of any hostEndingChars
+	    var hostEnd = -1;
+	    for (var i = 0; i < hostEndingChars.length; i++) {
+	      var hec = rest.indexOf(hostEndingChars[i]);
+	      if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))
+	        { hostEnd = hec; }
+	    }
+
+	    // at this point, either we have an explicit point where the
+	    // auth portion cannot go past, or the last @ char is the decider.
+	    var auth, atSign;
+	    if (hostEnd === -1) {
+	      // atSign can be anywhere.
+	      atSign = rest.lastIndexOf('@');
+	    } else {
+	      // atSign must be in auth portion.
+	      // http://a@b/c@d => host:b auth:a path:/c@d
+	      atSign = rest.lastIndexOf('@', hostEnd);
+	    }
+
+	    // Now we have a portion which is definitely the auth.
+	    // Pull that off.
+	    if (atSign !== -1) {
+	      auth = rest.slice(0, atSign);
+	      rest = rest.slice(atSign + 1);
+	      this.auth = decodeURIComponent(auth);
+	    }
+
+	    // the host is the remaining to the left of the first non-host char
+	    hostEnd = -1;
+	    for (var i = 0; i < nonHostChars.length; i++) {
+	      var hec = rest.indexOf(nonHostChars[i]);
+	      if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))
+	        { hostEnd = hec; }
+	    }
+	    // if we still have not hit it, then the entire thing is a host.
+	    if (hostEnd === -1)
+	      { hostEnd = rest.length; }
+
+	    this.host = rest.slice(0, hostEnd);
+	    rest = rest.slice(hostEnd);
+
+	    // pull out port.
+	    this.parseHost();
+
+	    // we've indicated that there is a hostname,
+	    // so even if it's empty, it has to be present.
+	    this.hostname = this.hostname || '';
+
+	    // if hostname begins with [ and ends with ]
+	    // assume that it's an IPv6 address.
+	    var ipv6Hostname = this.hostname[0] === '[' &&
+	        this.hostname[this.hostname.length - 1] === ']';
+
+	    // validate a little.
+	    if (!ipv6Hostname) {
+	      var hostparts = this.hostname.split(/\./);
+	      for (var i = 0, l = hostparts.length; i < l; i++) {
+	        var part = hostparts[i];
+	        if (!part) { continue; }
+	        if (!part.match(hostnamePartPattern)) {
+	          var newpart = '';
+	          for (var j = 0, k = part.length; j < k; j++) {
+	            if (part.charCodeAt(j) > 127) {
+	              // we replace non-ASCII char with a temporary placeholder
+	              // we need this to make sure size of hostname is not
+	              // broken by replacing non-ASCII by nothing
+	              newpart += 'x';
+	            } else {
+	              newpart += part[j];
+	            }
+	          }
+	          // we test again with ASCII char only
+	          if (!newpart.match(hostnamePartPattern)) {
+	            var validParts = hostparts.slice(0, i);
+	            var notHost = hostparts.slice(i + 1);
+	            var bit = part.match(hostnamePartStart);
+	            if (bit) {
+	              validParts.push(bit[1]);
+	              notHost.unshift(bit[2]);
+	            }
+	            if (notHost.length) {
+	              rest = '/' + notHost.join('.') + rest;
+	            }
+	            this.hostname = validParts.join('.');
+	            break;
+	          }
+	        }
+	      }
+	    }
+
+	    if (this.hostname.length > hostnameMaxLen) {
+	      this.hostname = '';
+	    } else {
+	      // hostnames are always lower case.
+	      this.hostname = this.hostname.toLowerCase();
+	    }
+
+	    if (!ipv6Hostname) {
+	      // IDNA Support: Returns a punycoded representation of "domain".
+	      // It only converts parts of the domain name that
+	      // have non-ASCII characters, i.e. it doesn't matter if
+	      // you call it with a domain that already is ASCII-only.
+	      this.hostname = punycode.toASCII(this.hostname);
+	    }
+
+	    var p = this.port ? ':' + this.port : '';
+	    var h = this.hostname || '';
+	    this.host = h + p;
+	    this.href += this.host;
+
+	    // strip [ and ] from the hostname
+	    // the host field still retains them, though
+	    if (ipv6Hostname) {
+	      this.hostname = this.hostname.substr(1, this.hostname.length - 2);
+	      if (rest[0] !== '/') {
+	        rest = '/' + rest;
+	      }
+	    }
+	  }
+
+	  // now rest is set to the post-host stuff.
+	  // chop off any delim chars.
+	  if (!unsafeProtocol[lowerProto]) {
+
+	    // First, make 100% sure that any "autoEscape" chars get
+	    // escaped, even if encodeURIComponent doesn't think they
+	    // need to be.
+	    for (var i = 0, l = autoEscape.length; i < l; i++) {
+	      var ae = autoEscape[i];
+	      if (rest.indexOf(ae) === -1)
+	        { continue; }
+	      var esc = encodeURIComponent(ae);
+	      if (esc === ae) {
+	        esc = escape(ae);
+	      }
+	      rest = rest.split(ae).join(esc);
+	    }
+	  }
+
+
+	  // chop off from the tail first.
+	  var hash = rest.indexOf('#');
+	  if (hash !== -1) {
+	    // got a fragment string.
+	    this.hash = rest.substr(hash);
+	    rest = rest.slice(0, hash);
+	  }
+	  var qm = rest.indexOf('?');
+	  if (qm !== -1) {
+	    this.search = rest.substr(qm);
+	    this.query = rest.substr(qm + 1);
+	    if (parseQueryString) {
+	      this.query = querystring.parse(this.query);
+	    }
+	    rest = rest.slice(0, qm);
+	  } else if (parseQueryString) {
+	    // no query string, but parseQueryString still requested
+	    this.search = '';
+	    this.query = {};
+	  }
+	  if (rest) { this.pathname = rest; }
+	  if (slashedProtocol[lowerProto] &&
+	      this.hostname && !this.pathname) {
+	    this.pathname = '/';
+	  }
+
+	  //to support http.request
+	  if (this.pathname || this.search) {
+	    var p = this.pathname || '';
+	    var s = this.search || '';
+	    this.path = p + s;
+	  }
+
+	  // finally, reconstruct the href based on what has been validated.
+	  this.href = this.format();
+	  return this;
+	};
+
+	// format a parsed object into a url string
+	function urlFormat(obj) {
+	  // ensure it's an object, and not a string url.
+	  // If it's an obj, this is a no-op.
+	  // this way, you can call url_format() on strings
+	  // to clean up potentially wonky urls.
+	  if (util.isString(obj)) { obj = urlParse(obj); }
+	  if (!(obj instanceof Url)) { return Url.prototype.format.call(obj); }
+	  return obj.format();
+	}
+
+	Url.prototype.format = function() {
+	  var auth = this.auth || '';
+	  if (auth) {
+	    auth = encodeURIComponent(auth);
+	    auth = auth.replace(/%3A/i, ':');
+	    auth += '@';
+	  }
+
+	  var protocol = this.protocol || '',
+	      pathname = this.pathname || '',
+	      hash = this.hash || '',
+	      host = false,
+	      query = '';
+
+	  if (this.host) {
+	    host = auth + this.host;
+	  } else if (this.hostname) {
+	    host = auth + (this.hostname.indexOf(':') === -1 ?
+	        this.hostname :
+	        '[' + this.hostname + ']');
+	    if (this.port) {
+	      host += ':' + this.port;
+	    }
+	  }
+
+	  if (this.query &&
+	      util.isObject(this.query) &&
+	      Object.keys(this.query).length) {
+	    query = querystring.stringify(this.query);
+	  }
+
+	  var search = this.search || (query && ('?' + query)) || '';
+
+	  if (protocol && protocol.substr(-1) !== ':') { protocol += ':'; }
+
+	  // only the slashedProtocols get the //.  Not mailto:, xmpp:, etc.
+	  // unless they had them to begin with.
+	  if (this.slashes ||
+	      (!protocol || slashedProtocol[protocol]) && host !== false) {
+	    host = '//' + (host || '');
+	    if (pathname && pathname.charAt(0) !== '/') { pathname = '/' + pathname; }
+	  } else if (!host) {
+	    host = '';
+	  }
+
+	  if (hash && hash.charAt(0) !== '#') { hash = '#' + hash; }
+	  if (search && search.charAt(0) !== '?') { search = '?' + search; }
+
+	  pathname = pathname.replace(/[?#]/g, function(match) {
+	    return encodeURIComponent(match);
+	  });
+	  search = search.replace('#', '%23');
+
+	  return protocol + host + pathname + search + hash;
+	};
+
+	function urlResolve(source, relative) {
+	  return urlParse(source, false, true).resolve(relative);
+	}
+
+	Url.prototype.resolve = function(relative) {
+	  return this.resolveObject(urlParse(relative, false, true)).format();
+	};
+
+	function urlResolveObject(source, relative) {
+	  if (!source) { return relative; }
+	  return urlParse(source, false, true).resolveObject(relative);
+	}
+
+	Url.prototype.resolveObject = function(relative) {
+	  if (util.isString(relative)) {
+	    var rel = new Url();
+	    rel.parse(relative, false, true);
+	    relative = rel;
+	  }
+
+	  var result = new Url();
+	  var tkeys = Object.keys(this);
+	  for (var tk = 0; tk < tkeys.length; tk++) {
+	    var tkey = tkeys[tk];
+	    result[tkey] = this[tkey];
+	  }
+
+	  // hash is always overridden, no matter what.
+	  // even href="" will remove it.
+	  result.hash = relative.hash;
+
+	  // if the relative url is empty, then there's nothing left to do here.
+	  if (relative.href === '') {
+	    result.href = result.format();
+	    return result;
+	  }
+
+	  // hrefs like //foo/bar always cut to the protocol.
+	  if (relative.slashes && !relative.protocol) {
+	    // take everything except the protocol from relative
+	    var rkeys = Object.keys(relative);
+	    for (var rk = 0; rk < rkeys.length; rk++) {
+	      var rkey = rkeys[rk];
+	      if (rkey !== 'protocol')
+	        { result[rkey] = relative[rkey]; }
+	    }
+
+	    //urlParse appends trailing / to urls like http://www.example.com
+	    if (slashedProtocol[result.protocol] &&
+	        result.hostname && !result.pathname) {
+	      result.path = result.pathname = '/';
+	    }
+
+	    result.href = result.format();
+	    return result;
+	  }
+
+	  if (relative.protocol && relative.protocol !== result.protocol) {
+	    // if it's a known url protocol, then changing
+	    // the protocol does weird things
+	    // first, if it's not file:, then we MUST have a host,
+	    // and if there was a path
+	    // to begin with, then we MUST have a path.
+	    // if it is file:, then the host is dropped,
+	    // because that's known to be hostless.
+	    // anything else is assumed to be absolute.
+	    if (!slashedProtocol[relative.protocol]) {
+	      var keys = Object.keys(relative);
+	      for (var v = 0; v < keys.length; v++) {
+	        var k = keys[v];
+	        result[k] = relative[k];
+	      }
+	      result.href = result.format();
+	      return result;
+	    }
+
+	    result.protocol = relative.protocol;
+	    if (!relative.host && !hostlessProtocol[relative.protocol]) {
+	      var relPath = (relative.pathname || '').split('/');
+	      while (relPath.length && !(relative.host = relPath.shift())){ ; }
+	      if (!relative.host) { relative.host = ''; }
+	      if (!relative.hostname) { relative.hostname = ''; }
+	      if (relPath[0] !== '') { relPath.unshift(''); }
+	      if (relPath.length < 2) { relPath.unshift(''); }
+	      result.pathname = relPath.join('/');
+	    } else {
+	      result.pathname = relative.pathname;
+	    }
+	    result.search = relative.search;
+	    result.query = relative.query;
+	    result.host = relative.host || '';
+	    result.auth = relative.auth;
+	    result.hostname = relative.hostname || relative.host;
+	    result.port = relative.port;
+	    // to support http.request
+	    if (result.pathname || result.search) {
+	      var p = result.pathname || '';
+	      var s = result.search || '';
+	      result.path = p + s;
+	    }
+	    result.slashes = result.slashes || relative.slashes;
+	    result.href = result.format();
+	    return result;
+	  }
+
+	  var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'),
+	      isRelAbs = (
+	          relative.host ||
+	          relative.pathname && relative.pathname.charAt(0) === '/'
+	      ),
+	      mustEndAbs = (isRelAbs || isSourceAbs ||
+	                    (result.host && relative.pathname)),
+	      removeAllDots = mustEndAbs,
+	      srcPath = result.pathname && result.pathname.split('/') || [],
+	      relPath = relative.pathname && relative.pathname.split('/') || [],
+	      psychotic = result.protocol && !slashedProtocol[result.protocol];
+
+	  // if the url is a non-slashed url, then relative
+	  // links like ../.. should be able
+	  // to crawl up to the hostname, as well.  This is strange.
+	  // result.protocol has already been set by now.
+	  // Later on, put the first path part into the host field.
+	  if (psychotic) {
+	    result.hostname = '';
+	    result.port = null;
+	    if (result.host) {
+	      if (srcPath[0] === '') { srcPath[0] = result.host; }
+	      else { srcPath.unshift(result.host); }
+	    }
+	    result.host = '';
+	    if (relative.protocol) {
+	      relative.hostname = null;
+	      relative.port = null;
+	      if (relative.host) {
+	        if (relPath[0] === '') { relPath[0] = relative.host; }
+	        else { relPath.unshift(relative.host); }
+	      }
+	      relative.host = null;
+	    }
+	    mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === '');
+	  }
+
+	  if (isRelAbs) {
+	    // it's absolute.
+	    result.host = (relative.host || relative.host === '') ?
+	                  relative.host : result.host;
+	    result.hostname = (relative.hostname || relative.hostname === '') ?
+	                      relative.hostname : result.hostname;
+	    result.search = relative.search;
+	    result.query = relative.query;
+	    srcPath = relPath;
+	    // fall through to the dot-handling below.
+	  } else if (relPath.length) {
+	    // it's relative
+	    // throw away the existing file, and take the new path instead.
+	    if (!srcPath) { srcPath = []; }
+	    srcPath.pop();
+	    srcPath = srcPath.concat(relPath);
+	    result.search = relative.search;
+	    result.query = relative.query;
+	  } else if (!util.isNullOrUndefined(relative.search)) {
+	    // just pull out the search.
+	    // like href='?foo'.
+	    // Put this after the other two cases because it simplifies the booleans
+	    if (psychotic) {
+	      result.hostname = result.host = srcPath.shift();
+	      //occationaly the auth can get stuck only in host
+	      //this especially happens in cases like
+	      //url.resolveObject('mailto:local1@domain1', 'local2@domain2')
+	      var authInHost = result.host && result.host.indexOf('@') > 0 ?
+	                       result.host.split('@') : false;
+	      if (authInHost) {
+	        result.auth = authInHost.shift();
+	        result.host = result.hostname = authInHost.shift();
+	      }
+	    }
+	    result.search = relative.search;
+	    result.query = relative.query;
+	    //to support http.request
+	    if (!util.isNull(result.pathname) || !util.isNull(result.search)) {
+	      result.path = (result.pathname ? result.pathname : '') +
+	                    (result.search ? result.search : '');
+	    }
+	    result.href = result.format();
+	    return result;
+	  }
+
+	  if (!srcPath.length) {
+	    // no path at all.  easy.
+	    // we've already handled the other stuff above.
+	    result.pathname = null;
+	    //to support http.request
+	    if (result.search) {
+	      result.path = '/' + result.search;
+	    } else {
+	      result.path = null;
+	    }
+	    result.href = result.format();
+	    return result;
+	  }
+
+	  // if a url ENDs in . or .., then it must get a trailing slash.
+	  // however, if it ends in anything else non-slashy,
+	  // then it must NOT get a trailing slash.
+	  var last = srcPath.slice(-1)[0];
+	  var hasTrailingSlash = (
+	      (result.host || relative.host || srcPath.length > 1) &&
+	      (last === '.' || last === '..') || last === '');
+
+	  // strip single dots, resolve double dots to parent dir
+	  // if the path tries to go above the root, `up` ends up > 0
+	  var up = 0;
+	  for (var i = srcPath.length; i >= 0; i--) {
+	    last = srcPath[i];
+	    if (last === '.') {
+	      srcPath.splice(i, 1);
+	    } else if (last === '..') {
+	      srcPath.splice(i, 1);
+	      up++;
+	    } else if (up) {
+	      srcPath.splice(i, 1);
+	      up--;
+	    }
+	  }
+
+	  // if the path is allowed to go above the root, restore leading ..s
+	  if (!mustEndAbs && !removeAllDots) {
+	    for (; up--; up) {
+	      srcPath.unshift('..');
+	    }
+	  }
+
+	  if (mustEndAbs && srcPath[0] !== '' &&
+	      (!srcPath[0] || srcPath[0].charAt(0) !== '/')) {
+	    srcPath.unshift('');
+	  }
+
+	  if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) {
+	    srcPath.push('');
+	  }
+
+	  var isAbsolute = srcPath[0] === '' ||
+	      (srcPath[0] && srcPath[0].charAt(0) === '/');
+
+	  // put the host back
+	  if (psychotic) {
+	    result.hostname = result.host = isAbsolute ? '' :
+	                                    srcPath.length ? srcPath.shift() : '';
+	    //occationaly the auth can get stuck only in host
+	    //this especially happens in cases like
+	    //url.resolveObject('mailto:local1@domain1', 'local2@domain2')
+	    var authInHost = result.host && result.host.indexOf('@') > 0 ?
+	                     result.host.split('@') : false;
+	    if (authInHost) {
+	      result.auth = authInHost.shift();
+	      result.host = result.hostname = authInHost.shift();
+	    }
+	  }
+
+	  mustEndAbs = mustEndAbs || (result.host && srcPath.length);
+
+	  if (mustEndAbs && !isAbsolute) {
+	    srcPath.unshift('');
+	  }
+
+	  if (!srcPath.length) {
+	    result.pathname = null;
+	    result.path = null;
+	  } else {
+	    result.pathname = srcPath.join('/');
+	  }
+
+	  //to support request.http
+	  if (!util.isNull(result.pathname) || !util.isNull(result.search)) {
+	    result.path = (result.pathname ? result.pathname : '') +
+	                  (result.search ? result.search : '');
+	  }
+	  result.auth = relative.auth || result.auth;
+	  result.slashes = result.slashes || relative.slashes;
+	  result.href = result.format();
+	  return result;
+	};
+
+	Url.prototype.parseHost = function() {
+	  var host = this.host;
+	  var port = portPattern.exec(host);
+	  if (port) {
+	    port = port[0];
+	    if (port !== ':') {
+	      this.port = port.substr(1);
+	    }
+	    host = host.substr(0, host.length - port.length);
+	  }
+	  if (host) { this.hostname = host; }
+	};
+
+	var url = {
+		parse: parse,
+		resolve: resolve,
+		resolveObject: resolveObject,
+		format: format,
+		Url: Url_1
+	};
+
+	/*!
+	 * @pixi/constants - v5.1.0
+	 * Compiled Fri, 20 Sep 2019 17:22:13 UTC
+	 *
+	 * @pixi/constants is licensed under the MIT License.
+	 * http://www.opensource.org/licenses/mit-license
+	 */
+	/**
+	 * Different types of environments for WebGL.
+	 *
+	 * @static
+	 * @memberof PIXI
+	 * @name ENV
+	 * @enum {number}
+	 * @property {number} WEBGL_LEGACY - Used for older v1 WebGL devices. PixiJS will aim to ensure compatibility
+	 *  with older / less advanced devices. If you experience unexplained flickering prefer this environment.
+	 * @property {number} WEBGL - Version 1 of WebGL
+	 * @property {number} WEBGL2 - Version 2 of WebGL
+	 */
+	var ENV = {
+	    WEBGL_LEGACY: 0,
+	    WEBGL: 1,
+	    WEBGL2: 2,
+	};
+
+	/**
+	 * Constant to identify the Renderer Type.
+	 *
+	 * @static
+	 * @memberof PIXI
+	 * @name RENDERER_TYPE
+	 * @enum {number}
+	 * @property {number} UNKNOWN - Unknown render type.
+	 * @property {number} WEBGL - WebGL render type.
+	 * @property {number} CANVAS - Canvas render type.
+	 */
+	var RENDERER_TYPE = {
+	    UNKNOWN:    0,
+	    WEBGL:      1,
+	    CANVAS:     2,
+	};
+
+	/**
+	 * Various blend modes supported by PIXI.
+	 *
+	 * IMPORTANT - The WebGL renderer only supports the NORMAL, ADD, MULTIPLY and SCREEN blend modes.
+	 * Anything else will silently act like NORMAL.
+	 *
+	 * @memberof PIXI
+	 * @name BLEND_MODES
+	 * @enum {number}
+	 * @property {number} NORMAL
+	 * @property {number} ADD
+	 * @property {number} MULTIPLY
+	 * @property {number} SCREEN
+	 * @property {number} OVERLAY
+	 * @property {number} DARKEN
+	 * @property {number} LIGHTEN
+	 * @property {number} COLOR_DODGE
+	 * @property {number} COLOR_BURN
+	 * @property {number} HARD_LIGHT
+	 * @property {number} SOFT_LIGHT
+	 * @property {number} DIFFERENCE
+	 * @property {number} EXCLUSION
+	 * @property {number} HUE
+	 * @property {number} SATURATION
+	 * @property {number} COLOR
+	 * @property {number} LUMINOSITY
+	 * @property {number} NORMAL_NPM
+	 * @property {number} ADD_NPM
+	 * @property {number} SCREEN_NPM
+	 * @property {number} NONE
+	 * @property {number} SRC_IN
+	 * @property {number} SRC_OUT
+	 * @property {number} SRC_ATOP
+	 * @property {number} DST_OVER
+	 * @property {number} DST_IN
+	 * @property {number} DST_OUT
+	 * @property {number} DST_ATOP
+	 * @property {number} SUBTRACT
+	 * @property {number} SRC_OVER
+	 * @property {number} ERASE
+	 */
+	var 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,
+	    NONE:           20,
+
+	    SRC_OVER:       0,
+	    SRC_IN:         21,
+	    SRC_OUT:        22,
+	    SRC_ATOP:       23,
+	    DST_OVER:       24,
+	    DST_IN:         25,
+	    DST_OUT:        26,
+	    DST_ATOP:       27,
+	    ERASE:          26,
+	    SUBTRACT:       28,
+	};
+
+	/**
+	 * Various webgl draw modes. These can be used to specify which GL drawMode to use
+	 * under certain situations and renderers.
+	 *
+	 * @memberof PIXI
+	 * @static
+	 * @name DRAW_MODES
+	 * @enum {number}
+	 * @property {number} POINTS
+	 * @property {number} LINES
+	 * @property {number} LINE_LOOP
+	 * @property {number} LINE_STRIP
+	 * @property {number} TRIANGLES
+	 * @property {number} TRIANGLE_STRIP
+	 * @property {number} TRIANGLE_FAN
+	 */
+	var DRAW_MODES = {
+	    POINTS:         0,
+	    LINES:          1,
+	    LINE_LOOP:      2,
+	    LINE_STRIP:     3,
+	    TRIANGLES:      4,
+	    TRIANGLE_STRIP: 5,
+	    TRIANGLE_FAN:   6,
+	};
+
+	/**
+	 * Various GL texture/resources formats.
+	 *
+	 * @memberof PIXI
+	 * @static
+	 * @name FORMATS
+	 * @enum {number}
+	 * @property {number} RGBA=6408
+	 * @property {number} RGB=6407
+	 * @property {number} ALPHA=6406
+	 * @property {number} LUMINANCE=6409
+	 * @property {number} LUMINANCE_ALPHA=6410
+	 * @property {number} DEPTH_COMPONENT=6402
+	 * @property {number} DEPTH_STENCIL=34041
+	 */
+	var FORMATS = {
+	    RGBA:             6408,
+	    RGB:              6407,
+	    ALPHA:            6406,
+	    LUMINANCE:        6409,
+	    LUMINANCE_ALPHA:  6410,
+	    DEPTH_COMPONENT:  6402,
+	    DEPTH_STENCIL:    34041,
+	};
+
+	/**
+	 * Various GL target types.
+	 *
+	 * @memberof PIXI
+	 * @static
+	 * @name TARGETS
+	 * @enum {number}
+	 * @property {number} TEXTURE_2D=3553
+	 * @property {number} TEXTURE_CUBE_MAP=34067
+	 * @property {number} TEXTURE_2D_ARRAY=35866
+	 * @property {number} TEXTURE_CUBE_MAP_POSITIVE_X=34069
+	 * @property {number} TEXTURE_CUBE_MAP_NEGATIVE_X=34070
+	 * @property {number} TEXTURE_CUBE_MAP_POSITIVE_Y=34071
+	 * @property {number} TEXTURE_CUBE_MAP_NEGATIVE_Y=34072
+	 * @property {number} TEXTURE_CUBE_MAP_POSITIVE_Z=34073
+	 * @property {number} TEXTURE_CUBE_MAP_NEGATIVE_Z=34074
+	 */
+	var TARGETS = {
+	    TEXTURE_2D: 3553,
+	    TEXTURE_CUBE_MAP: 34067,
+	    TEXTURE_2D_ARRAY: 35866,
+	    TEXTURE_CUBE_MAP_POSITIVE_X: 34069,
+	    TEXTURE_CUBE_MAP_NEGATIVE_X: 34070,
+	    TEXTURE_CUBE_MAP_POSITIVE_Y: 34071,
+	    TEXTURE_CUBE_MAP_NEGATIVE_Y: 34072,
+	    TEXTURE_CUBE_MAP_POSITIVE_Z: 34073,
+	    TEXTURE_CUBE_MAP_NEGATIVE_Z: 34074,
+	};
+
+	/**
+	 * Various GL data format types.
+	 *
+	 * @memberof PIXI
+	 * @static
+	 * @name TYPES
+	 * @enum {number}
+	 * @property {number} UNSIGNED_BYTE=5121
+	 * @property {number} UNSIGNED_SHORT=5123
+	 * @property {number} UNSIGNED_SHORT_5_6_5=33635
+	 * @property {number} UNSIGNED_SHORT_4_4_4_4=32819
+	 * @property {number} UNSIGNED_SHORT_5_5_5_1=32820
+	 * @property {number} FLOAT=5126
+	 * @property {number} HALF_FLOAT=36193
+	 */
+	var TYPES = {
+	    UNSIGNED_BYTE: 5121,
+	    UNSIGNED_SHORT: 5123,
+	    UNSIGNED_SHORT_5_6_5: 33635,
+	    UNSIGNED_SHORT_4_4_4_4: 32819,
+	    UNSIGNED_SHORT_5_5_5_1: 32820,
+	    FLOAT: 5126,
+	    HALF_FLOAT: 36193,
+	};
+
+	/**
+	 * The scale modes that are supported by pixi.
+	 *
+	 * The {@link PIXI.settings.SCALE_MODE} scale mode affects the default scaling mode of future operations.
+	 * It can be re-assigned to either LINEAR or NEAREST, depending upon suitability.
+	 *
+	 * @memberof PIXI
+	 * @static
+	 * @name SCALE_MODES
+	 * @enum {number}
+	 * @property {number} LINEAR Smooth scaling
+	 * @property {number} NEAREST Pixelating scaling
+	 */
+	var SCALE_MODES = {
+	    LINEAR:     1,
+	    NEAREST:    0,
+	};
+
+	/**
+	 * The wrap modes that are supported by pixi.
+	 *
+	 * The {@link PIXI.settings.WRAP_MODE} wrap mode affects the default wrapping mode of future operations.
+	 * It can be re-assigned to either CLAMP or REPEAT, depending upon suitability.
+	 * If the texture is non power of two then clamp will be used regardless as WebGL can
+	 * only use REPEAT if the texture is po2.
+	 *
+	 * This property only affects WebGL.
+	 *
+	 * @name WRAP_MODES
+	 * @memberof PIXI
+	 * @static
+	 * @enum {number}
+	 * @property {number} CLAMP - The textures uvs are clamped
+	 * @property {number} REPEAT - The texture uvs tile and repeat
+	 * @property {number} MIRRORED_REPEAT - The texture uvs tile and repeat with mirroring
+	 */
+	var WRAP_MODES = {
+	    CLAMP:           33071,
+	    REPEAT:          10497,
+	    MIRRORED_REPEAT: 33648,
+	};
+
+	/**
+	 * Mipmap filtering modes that are supported by pixi.
+	 *
+	 * The {@link PIXI.settings.MIPMAP_TEXTURES} affects default texture filtering.
+	 * Mipmaps are generated for a baseTexture if its `mipmap` field is `ON`,
+	 * or its `POW2` and texture dimensions are powers of 2.
+	 * Due to platform restriction, `ON` option will work like `POW2` for webgl-1.
+	 *
+	 * This property only affects WebGL.
+	 *
+	 * @name MIPMAP_MODES
+	 * @memberof PIXI
+	 * @static
+	 * @enum {number}
+	 * @property {number} OFF - No mipmaps
+	 * @property {number} POW2 - Generate mipmaps if texture dimensions are pow2
+	 * @property {number} ON - Always generate mipmaps
+	 */
+	var MIPMAP_MODES = {
+	    OFF: 0,
+	    POW2: 1,
+	    ON: 2,
+	};
+
+	/**
+	 * The gc modes that are supported by pixi.
+	 *
+	 * The {@link PIXI.settings.GC_MODE} Garbage Collection mode for PixiJS textures is AUTO
+	 * If set to GC_MODE, the renderer will occasionally check textures usage. If they are not
+	 * used for a specified period of time they will be removed from the GPU. They will of course
+	 * be uploaded again when they are required. This is a silent behind the scenes process that
+	 * should ensure that the GPU does not  get filled up.
+	 *
+	 * Handy for mobile devices!
+	 * This property only affects WebGL.
+	 *
+	 * @name GC_MODES
+	 * @enum {number}
+	 * @static
+	 * @memberof PIXI
+	 * @property {number} AUTO - Garbage collection will happen periodically automatically
+	 * @property {number} MANUAL - Garbage collection will need to be called manually
+	 */
+	var GC_MODES = {
+	    AUTO:           0,
+	    MANUAL:         1,
+	};
+
+	/**
+	 * Constants that specify float precision in shaders.
+	 *
+	 * @name PRECISION
+	 * @memberof PIXI
+	 * @static
+	 * @enum {string}
+	 * @constant
+	 * @property {string} LOW='lowp'
+	 * @property {string} MEDIUM='mediump'
+	 * @property {string} HIGH='highp'
+	 */
+	var PRECISION = {
+	    LOW: 'lowp',
+	    MEDIUM: 'mediump',
+	    HIGH: 'highp',
+	};
+
+	/*!
+	 * @pixi/utils - v5.1.3
+	 * Compiled Fri, 20 Sep 2019 17:22:13 UTC
+	 *
+	 * @pixi/utils is licensed under the MIT License.
+	 * http://www.opensource.org/licenses/mit-license
+	 */
+
+	/**
+	 * The prefix that denotes a URL is for a retina asset.
+	 *
+	 * @static
+	 * @name RETINA_PREFIX
+	 * @memberof PIXI.settings
+	 * @type {RegExp}
+	 * @default /@([0-9\.]+)x/
+	 * @example `@2x`
+	 */
+	settings.RETINA_PREFIX = /@([0-9\.]+)x/;
+
+	/**
+	 * Should the `failIfMajorPerformanceCaveat` flag be enabled as a context option used in the `isWebGLSupported` function.
+	 * For most scenarios this should be left as true, as otherwise the user may have a poor experience.
+	 * However, it can be useful to disable under certain scenarios, such as headless unit tests.
+	 *
+	 * @static
+	 * @name FAIL_IF_MAJOR_PERFORMANCE_CAVEAT
+	 * @memberof PIXI.settings
+	 * @type {boolean}
+	 * @default true
+	 */
+	settings.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT = true;
+
+	var saidHello = false;
+	var VERSION = '5.1.4';
+
+	/**
+	 * Skips the hello message of renderers that are created after this is run.
+	 *
+	 * @function skipHello
+	 * @memberof PIXI.utils
+	 */
+	function skipHello()
+	{
+	    saidHello = true;
+	}
+
+	/**
+	 * Logs out the version and renderer information for this running instance of PIXI.
+	 * If you don't want to see this message you can run `PIXI.utils.skipHello()` before
+	 * creating your renderer. Keep in mind that doing that will forever make you a jerk face.
+	 *
+	 * @static
+	 * @function sayHello
+	 * @memberof PIXI.utils
+	 * @param {string} type - The string renderer type to log.
+	 */
+	function sayHello(type)
+	{
+	    if (saidHello)
+	    {
+	        return;
+	    }
+
+	    if (navigator.userAgent.toLowerCase().indexOf('chrome') > -1)
+	    {
+	        var args = [
+	            ("\n %c %c %c PixiJS " + VERSION + " - ✰ " + type + " ✰  %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, args);
+	    }
+	    else if (window.console)
+	    {
+	        window.console.log(("PixiJS " + VERSION + " - " + type + " - http://www.pixijs.com/"));
+	    }
+
+	    saidHello = true;
+	}
+
+	var supported;
+
+	/**
+	 * Helper for checking for WebGL support.
+	 *
+	 * @memberof PIXI.utils
+	 * @function isWebGLSupported
+	 * @return {boolean} Is WebGL supported.
+	 */
+	function isWebGLSupported()
+	{
+	    if (typeof supported === 'undefined')
+	    {
+	        supported = (function supported()
+	        {
+	            var contextOptions = {
+	                stencil: true,
+	                failIfMajorPerformanceCaveat: settings.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT,
+	            };
+
+	            try
+	            {
+	                if (!window.WebGLRenderingContext)
+	                {
+	                    return false;
+	                }
+
+	                var canvas = document.createElement('canvas');
+	                var gl = canvas.getContext('webgl', contextOptions)
+	                    || canvas.getContext('experimental-webgl', contextOptions);
+
+	                var success = !!(gl && gl.getContextAttributes().stencil);
+
+	                if (gl)
+	                {
+	                    var loseContext = gl.getExtension('WEBGL_lose_context');
+
+	                    if (loseContext)
+	                    {
+	                        loseContext.loseContext();
+	                    }
+	                }
+
+	                gl = null;
+
+	                return success;
+	            }
+	            catch (e)
+	            {
+	                return false;
+	            }
+	        })();
+	    }
+
+	    return supported;
+	}
+
+	/**
+	 * Converts a hexadecimal color number to an [R, G, B] array of normalized floats (numbers from 0.0 to 1.0).
+	 *
+	 * @example
+	 * PIXI.utils.hex2rgb(0xffffff); // returns [1, 1, 1]
+	 * @memberof PIXI.utils
+	 * @function hex2rgb
+	 * @param {number} hex - The hexadecimal number to convert
+	 * @param  {number[]} [out=[]] If supplied, this array will be used rather than returning a new one
+	 * @return {number[]} An array representing the [R, G, B] of the color where all values are floats.
+	 */
+	function hex2rgb(hex, out)
+	{
+	    out = out || [];
+
+	    out[0] = ((hex >> 16) & 0xFF) / 255;
+	    out[1] = ((hex >> 8) & 0xFF) / 255;
+	    out[2] = (hex & 0xFF) / 255;
+
+	    return out;
+	}
+
+	/**
+	 * Converts a hexadecimal color number to a string.
+	 *
+	 * @example
+	 * PIXI.utils.hex2string(0xffffff); // returns "#ffffff"
+	 * @memberof PIXI.utils
+	 * @function hex2string
+	 * @param {number} hex - Number in hex (e.g., `0xffffff`)
+	 * @return {string} The string color (e.g., `"#ffffff"`).
+	 */
+	function hex2string(hex)
+	{
+	    hex = hex.toString(16);
+	    hex = '000000'.substr(0, 6 - hex.length) + hex;
+
+	    return ("#" + hex);
+	}
+
+	/**
+	 * Converts a hexadecimal string to a hexadecimal color number.
+	 *
+	 * @example
+	 * PIXI.utils.string2hex("#ffffff"); // returns 0xffffff
+	 * @memberof PIXI.utils
+	 * @function string2hex
+	 * @param {string} The string color (e.g., `"#ffffff"`)
+	 * @return {number} Number in hexadecimal.
+	 */
+	function string2hex(string)
+	{
+	    if (typeof string === 'string' && string[0] === '#')
+	    {
+	        string = string.substr(1);
+	    }
+
+	    return parseInt(string, 16);
+	}
+
+	/**
+	 * Converts a color as an [R, G, B] array of normalized floats to a hexadecimal number.
+	 *
+	 * @example
+	 * PIXI.utils.rgb2hex([1, 1, 1]); // returns 0xffffff
+	 * @memberof PIXI.utils
+	 * @function rgb2hex
+	 * @param {number[]} rgb - Array of numbers where all values are normalized floats from 0.0 to 1.0.
+	 * @return {number} Number in hexadecimal.
+	 */
+	function rgb2hex(rgb)
+	{
+	    return (((rgb[0] * 255) << 16) + ((rgb[1] * 255) << 8) + (rgb[2] * 255 | 0));
+	}
+
+	/**
+	 * Corrects PixiJS blend, takes premultiplied alpha into account
+	 *
+	 * @memberof PIXI.utils
+	 * @function mapPremultipliedBlendModes
+	 * @private
+	 * @param {Array<number[]>} [array] - The array to output into.
+	 * @return {Array<number[]>} Mapped modes.
+	 */
+	function mapPremultipliedBlendModes()
+	{
+	    var pm = [];
+	    var npm = [];
+
+	    for (var i = 0; i < 32; i++)
+	    {
+	        pm[i] = i;
+	        npm[i] = i;
+	    }
+
+	    pm[BLEND_MODES.NORMAL_NPM] = BLEND_MODES.NORMAL;
+	    pm[BLEND_MODES.ADD_NPM] = BLEND_MODES.ADD;
+	    pm[BLEND_MODES.SCREEN_NPM] = BLEND_MODES.SCREEN;
+
+	    npm[BLEND_MODES.NORMAL] = BLEND_MODES.NORMAL_NPM;
+	    npm[BLEND_MODES.ADD] = BLEND_MODES.ADD_NPM;
+	    npm[BLEND_MODES.SCREEN] = BLEND_MODES.SCREEN_NPM;
+
+	    var array = [];
+
+	    array.push(npm);
+	    array.push(pm);
+
+	    return array;
+	}
+
+	/**
+	 * maps premultiply flag and blendMode to adjusted blendMode
+	 * @memberof PIXI.utils
+	 * @const premultiplyBlendMode
+	 * @type {Array<number[]>}
+	 */
+	var premultiplyBlendMode = mapPremultipliedBlendModes();
+
+	/**
+	 * changes blendMode according to texture format
+	 *
+	 * @memberof PIXI.utils
+	 * @function correctBlendMode
+	 * @param {number} blendMode supposed blend mode
+	 * @param {boolean} premultiplied  whether source is premultiplied
+	 * @returns {number} true blend mode for this texture
+	 */
+	function correctBlendMode(blendMode, premultiplied)
+	{
+	    return premultiplyBlendMode[premultiplied ? 1 : 0][blendMode];
+	}
+
+	/**
+	 * combines rgb and alpha to out array
+	 *
+	 * @memberof PIXI.utils
+	 * @function premultiplyRgba
+	 * @param {Float32Array|number[]} rgb input rgb
+	 * @param {number} alpha alpha param
+	 * @param {Float32Array} [out] output
+	 * @param {boolean} [premultiply=true] do premultiply it
+	 * @returns {Float32Array} vec4 rgba
+	 */
+	function premultiplyRgba(rgb, alpha, out, premultiply)
+	{
+	    out = out || new Float32Array(4);
+	    if (premultiply || premultiply === undefined)
+	    {
+	        out[0] = rgb[0] * alpha;
+	        out[1] = rgb[1] * alpha;
+	        out[2] = rgb[2] * alpha;
+	    }
+	    else
+	    {
+	        out[0] = rgb[0];
+	        out[1] = rgb[1];
+	        out[2] = rgb[2];
+	    }
+	    out[3] = alpha;
+
+	    return out;
+	}
+
+	/**
+	 * premultiplies tint
+	 *
+	 * @memberof PIXI.utils
+	 * @function premultiplyTint
+	 * @param {number} tint integer RGB
+	 * @param {number} alpha floating point alpha (0.0-1.0)
+	 * @returns {number} tint multiplied by alpha
+	 */
+	function premultiplyTint(tint, alpha)
+	{
+	    if (alpha === 1.0)
+	    {
+	        return (alpha * 255 << 24) + tint;
+	    }
+	    if (alpha === 0.0)
+	    {
+	        return 0;
+	    }
+	    var R = ((tint >> 16) & 0xFF);
+	    var G = ((tint >> 8) & 0xFF);
+	    var B = (tint & 0xFF);
+
+	    R = ((R * alpha) + 0.5) | 0;
+	    G = ((G * alpha) + 0.5) | 0;
+	    B = ((B * alpha) + 0.5) | 0;
+
+	    return (alpha * 255 << 24) + (R << 16) + (G << 8) + B;
+	}
+
+	/**
+	 * converts integer tint and float alpha to vec4 form, premultiplies by default
+	 *
+	 * @memberof PIXI.utils
+	 * @function premultiplyTintToRgba
+	 * @param {number} tint input tint
+	 * @param {number} alpha alpha param
+	 * @param {Float32Array} [out] output
+	 * @param {boolean} [premultiply=true] do premultiply it
+	 * @returns {Float32Array} vec4 rgba
+	 */
+	function premultiplyTintToRgba(tint, alpha, out, premultiply)
+	{
+	    out = out || new Float32Array(4);
+	    out[0] = ((tint >> 16) & 0xFF) / 255.0;
+	    out[1] = ((tint >> 8) & 0xFF) / 255.0;
+	    out[2] = (tint & 0xFF) / 255.0;
+	    if (premultiply || premultiply === undefined)
+	    {
+	        out[0] *= alpha;
+	        out[1] *= alpha;
+	        out[2] *= alpha;
+	    }
+	    out[3] = alpha;
+
+	    return out;
+	}
+
+	/**
+	 * Generic Mask Stack data structure
+	 *
+	 * @memberof PIXI.utils
+	 * @function createIndicesForQuads
+	 * @param {number} size - Number of quads
+	 * @param {Uint16Array|Uint32Array} [outBuffer] - Buffer for output, length has to be `6 * size`
+	 * @return {Uint16Array|Uint32Array} - Resulting index buffer
+	 */
+	function createIndicesForQuads(size, outBuffer)
+	{
+	    if ( outBuffer === void 0 ) { outBuffer = null; }
+
+	    // the total number of indices in our array, there are 6 points per quad.
+	    var totalIndices = size * 6;
+
+	    outBuffer = outBuffer || new Uint16Array(totalIndices);
+
+	    if (outBuffer.length !== totalIndices)
+	    {
+	        throw new Error(("Out buffer length is incorrect, got " + (outBuffer.length) + " and expected " + totalIndices));
+	    }
+
+	    // fill the indices with the quads to draw
+	    for (var i = 0, j = 0; i < totalIndices; i += 6, j += 4)
+	    {
+	        outBuffer[i + 0] = j + 0;
+	        outBuffer[i + 1] = j + 1;
+	        outBuffer[i + 2] = j + 2;
+	        outBuffer[i + 3] = j + 0;
+	        outBuffer[i + 4] = j + 2;
+	        outBuffer[i + 5] = j + 3;
+	    }
+
+	    return outBuffer;
+	}
+
+	/**
+	 * Remove items from a javascript array without generating garbage
+	 *
+	 * @function removeItems
+	 * @memberof PIXI.utils
+	 * @param {Array<any>} arr Array to remove elements from
+	 * @param {number} startIdx starting index
+	 * @param {number} removeCount how many to remove
+	 */
+	function removeItems(arr, startIdx, removeCount)
+	{
+	    var length = arr.length;
+	    var i;
+
+	    if (startIdx >= length || removeCount === 0)
+	    {
+	        return;
+	    }
+
+	    removeCount = (startIdx + removeCount > length ? length - startIdx : removeCount);
+
+	    var len = length - removeCount;
+
+	    for (i = startIdx; i < len; ++i)
+	    {
+	        arr[i] = arr[i + removeCount];
+	    }
+
+	    arr.length = len;
+	}
+
+	var nextUid = 0;
+
+	/**
+	 * Gets the next unique identifier
+	 *
+	 * @memberof PIXI.utils
+	 * @function uid
+	 * @return {number} The next unique identifier to use.
+	 */
+	function uid()
+	{
+	    return ++nextUid;
+	}
+
+	/**
+	 * Returns sign of number
+	 *
+	 * @memberof PIXI.utils
+	 * @function sign
+	 * @param {number} n - the number to check the sign of
+	 * @returns {number} 0 if `n` is 0, -1 if `n` is negative, 1 if `n` is positive
+	 */
+	function sign$1(n)
+	{
+	    if (n === 0) { return 0; }
+
+	    return n < 0 ? -1 : 1;
+	}
+
+	// Taken from the bit-twiddle package
+
+	/**
+	 * Rounds to next power of two.
+	 *
+	 * @function nextPow2
+	 * @memberof PIXI.utils
+	 * @param {number} v input value
+	 * @return {number}
+	 */
+	function nextPow2(v)
+	{
+	    v += v === 0;
+	    --v;
+	    v |= v >>> 1;
+	    v |= v >>> 2;
+	    v |= v >>> 4;
+	    v |= v >>> 8;
+	    v |= v >>> 16;
+
+	    return v + 1;
+	}
+
+	/**
+	 * Checks if a number is a power of two.
+	 *
+	 * @function isPow2
+	 * @memberof PIXI.utils
+	 * @param {number} v input value
+	 * @return {boolean} `true` if value is power of two
+	 */
+	function isPow2(v)
+	{
+	    return !(v & (v - 1)) && (!!v);
+	}
+
+	/**
+	 * Computes ceil of log base 2
+	 *
+	 * @function log2
+	 * @memberof PIXI.utils
+	 * @param {number} v input value
+	 * @return {number} logarithm base 2
+	 */
+	function log2(v)
+	{
+	    var r = (v > 0xFFFF) << 4;
+
+	    v >>>= r;
+
+	    var shift = (v > 0xFF) << 3;
+
+	    v >>>= shift; r |= shift;
+	    shift = (v > 0xF) << 2;
+	    v >>>= shift; r |= shift;
+	    shift = (v > 0x3) << 1;
+	    v >>>= shift; r |= shift;
+
+	    return r | (v >> 1);
+	}
+
+	/**
+	 * @todo Describe property usage
+	 *
+	 * @static
+	 * @name ProgramCache
+	 * @memberof PIXI.utils
+	 * @type {Object}
+	 */
+	var ProgramCache = {};
+
+	/**
+	 * @todo Describe property usage
+	 *
+	 * @static
+	 * @name TextureCache
+	 * @memberof PIXI.utils
+	 * @type {Object}
+	 */
+	var TextureCache = Object.create(null);
+
+	/**
+	 * @todo Describe property usage
+	 *
+	 * @static
+	 * @name BaseTextureCache
+	 * @memberof PIXI.utils
+	 * @type {Object}
+	 */
+
+	var BaseTextureCache = Object.create(null);
+	/**
+	 * Destroys all texture in the cache
+	 *
+	 * @memberof PIXI.utils
+	 * @function destroyTextureCache
+	 */
+	function destroyTextureCache()
+	{
+	    var key;
+
+	    for (key in TextureCache)
+	    {
+	        TextureCache[key].destroy();
+	    }
+	    for (key in BaseTextureCache)
+	    {
+	        BaseTextureCache[key].destroy();
+	    }
+	}
+
+	/**
+	 * Removes all textures from cache, but does not destroy them
+	 *
+	 * @memberof PIXI.utils
+	 * @function clearTextureCache
+	 */
+	function clearTextureCache()
+	{
+	    var key;
+
+	    for (key in TextureCache)
+	    {
+	        delete TextureCache[key];
+	    }
+	    for (key in BaseTextureCache)
+	    {
+	        delete BaseTextureCache[key];
+	    }
+	}
+
+	/**
+	 * Trim transparent borders from a canvas
+	 *
+	 * @memberof PIXI.utils
+	 * @function trimCanvas
+	 * @param {HTMLCanvasElement} canvas - the canvas to trim
+	 * @returns {object} Trim data
+	 */
+	function trimCanvas(canvas)
+	{
+	    // https://gist.github.com/remy/784508
+
+	    var width = canvas.width;
+	    var height = canvas.height;
+
+	    var context = canvas.getContext('2d');
+	    var imageData = context.getImageData(0, 0, width, height);
+	    var pixels = imageData.data;
+	    var len = pixels.length;
+
+	    var bound = {
+	        top: null,
+	        left: null,
+	        right: null,
+	        bottom: null,
+	    };
+	    var data = null;
+	    var i;
+	    var x;
+	    var y;
+
+	    for (i = 0; i < len; i += 4)
+	    {
+	        if (pixels[i + 3] !== 0)
+	        {
+	            x = (i / 4) % width;
+	            y = ~~((i / 4) / width);
+
+	            if (bound.top === null)
+	            {
+	                bound.top = y;
+	            }
+
+	            if (bound.left === null)
+	            {
+	                bound.left = x;
+	            }
+	            else if (x < bound.left)
+	            {
+	                bound.left = x;
+	            }
+
+	            if (bound.right === null)
+	            {
+	                bound.right = x + 1;
+	            }
+	            else if (bound.right < x)
+	            {
+	                bound.right = x + 1;
+	            }
+
+	            if (bound.bottom === null)
+	            {
+	                bound.bottom = y;
+	            }
+	            else if (bound.bottom < y)
+	            {
+	                bound.bottom = y;
+	            }
+	        }
+	    }
+
+	    if (bound.top !== null)
+	    {
+	        width = bound.right - bound.left;
+	        height = bound.bottom - bound.top + 1;
+	        data = context.getImageData(bound.left, bound.top, width, height);
+	    }
+
+	    return {
+	        height: height,
+	        width: width,
+	        data: data,
+	    };
+	}
+
+	/**
+	 * Creates a Canvas element of the given size to be used as a target for rendering to.
+	 *
+	 * @class
+	 * @memberof PIXI.utils
+	 */
+	var CanvasRenderTarget = function CanvasRenderTarget(width, height, resolution)
+	{
+	    /**
+	     * The Canvas object that belongs to this CanvasRenderTarget.
+	     *
+	     * @member {HTMLCanvasElement}
+	     */
+	    this.canvas = document.createElement('canvas');
+
+	    /**
+	     * A CanvasRenderingContext2D object representing a two-dimensional rendering context.
+	     *
+	     * @member {CanvasRenderingContext2D}
+	     */
+	    this.context = this.canvas.getContext('2d');
+
+	    this.resolution = resolution || settings.RESOLUTION;
+
+	    this.resize(width, height);
+	};
+
+	var prototypeAccessors = { width: { configurable: true },height: { configurable: true } };
+
+	/**
+	 * Clears the canvas that was created by the CanvasRenderTarget class.
+	 *
+	 * @private
+	 */
+	CanvasRenderTarget.prototype.clear = function clear ()
+	{
+	    this.context.setTransform(1, 0, 0, 1, 0, 0);
+	    this.context.clearRect(0, 0, this.canvas.width, this.canvas.height);
+	};
+
+	/**
+	 * Resizes the canvas to the specified width and height.
+	 *
+	 * @param {number} width - the new width of the canvas
+	 * @param {number} height - the new height of the canvas
+	 */
+	CanvasRenderTarget.prototype.resize = function resize (width, height)
+	{
+	    this.canvas.width = width * this.resolution;
+	    this.canvas.height = height * this.resolution;
+	};
+
+	/**
+	 * Destroys this canvas.
+	 *
+	 */
+	CanvasRenderTarget.prototype.destroy = function destroy ()
+	{
+	    this.context = null;
+	    this.canvas = null;
+	};
+
+	/**
+	 * The width of the canvas buffer in pixels.
+	 *
+	 * @member {number}
+	 */
+	prototypeAccessors.width.get = function ()
+	{
+	    return this.canvas.width;
+	};
+
+	prototypeAccessors.width.set = function (val) // eslint-disable-line require-jsdoc
+	{
+	    this.canvas.width = val;
+	};
+
+	/**
+	 * The height of the canvas buffer in pixels.
+	 *
+	 * @member {number}
+	 */
+	prototypeAccessors.height.get = function ()
+	{
+	    return this.canvas.height;
+	};
+
+	prototypeAccessors.height.set = function (val) // eslint-disable-line require-jsdoc
+	{
+	    this.canvas.height = val;
+	};
+
+	Object.defineProperties( CanvasRenderTarget.prototype, prototypeAccessors );
+
+	/**
+	 * Regexp for data URI.
+	 * Based on: {@link https://github.com/ragingwind/data-uri-regex}
+	 *
+	 * @static
+	 * @constant {RegExp|string} DATA_URI
+	 * @memberof PIXI
+	 * @example data:image/png;base64
+	 */
+	var DATA_URI = /^\s*data:(?:([\w-]+)\/([\w+.-]+))?(?:;charset=([\w-]+))?(?:;(base64))?,(.*)/i;
+
+	/**
+	 * Typedef for decomposeDataUri return object.
+	 *
+	 * @memberof PIXI.utils
+	 * @typedef {object} DecomposedDataUri
+	 * @property {string} mediaType Media type, eg. `image`
+	 * @property {string} subType Sub type, eg. `png`
+	 * @property {string} encoding Data encoding, eg. `base64`
+	 * @property {string} data The actual data
+	 */
+
+	/**
+	 * Split a data URI into components. Returns undefined if
+	 * parameter `dataUri` is not a valid data URI.
+	 *
+	 * @memberof PIXI.utils
+	 * @function decomposeDataUri
+	 * @param {string} dataUri - the data URI to check
+	 * @return {PIXI.utils.DecomposedDataUri|undefined} The decomposed data uri or undefined
+	 */
+	function decomposeDataUri(dataUri)
+	{
+	    var dataUriMatch = DATA_URI.exec(dataUri);
+
+	    if (dataUriMatch)
+	    {
+	        return {
+	            mediaType: dataUriMatch[1] ? dataUriMatch[1].toLowerCase() : undefined,
+	            subType: dataUriMatch[2] ? dataUriMatch[2].toLowerCase() : undefined,
+	            charset: dataUriMatch[3] ? dataUriMatch[3].toLowerCase() : undefined,
+	            encoding: dataUriMatch[4] ? dataUriMatch[4].toLowerCase() : undefined,
+	            data: dataUriMatch[5],
+	        };
+	    }
+
+	    return undefined;
+	}
+
+	var tempAnchor;
+
+	/**
+	 * Sets the `crossOrigin` property for this resource based on if the url
+	 * for this resource is cross-origin. If crossOrigin was manually set, this
+	 * function does nothing.
+	 * Nipped from the resource loader!
+	 *
+	 * @ignore
+	 * @param {string} url - The url to test.
+	 * @param {object} [loc=window.location] - The location object to test against.
+	 * @return {string} The crossOrigin value to use (or empty string for none).
+	 */
+	function determineCrossOrigin(url$1, loc)
+	{
+	    if ( loc === void 0 ) { loc = window.location; }
+
+	    // data: and javascript: urls are considered same-origin
+	    if (url$1.indexOf('data:') === 0)
+	    {
+	        return '';
+	    }
+
+	    // default is window.location
+	    loc = loc || window.location;
+
+	    if (!tempAnchor)
+	    {
+	        tempAnchor = document.createElement('a');
+	    }
+
+	    // let the browser determine the full href for the url of this resource and then
+	    // parse with the node url lib, we can't use the properties of the anchor element
+	    // because they don't work in IE9 :(
+	    tempAnchor.href = url$1;
+	    url$1 = url.parse(tempAnchor.href);
+
+	    var samePort = (!url$1.port && loc.port === '') || (url$1.port === loc.port);
+
+	    // if cross origin
+	    if (url$1.hostname !== loc.hostname || !samePort || url$1.protocol !== loc.protocol)
+	    {
+	        return 'anonymous';
+	    }
+
+	    return '';
+	}
+
+	/**
+	 * get the resolution / device pixel ratio of an asset by looking for the prefix
+	 * used by spritesheets and image urls
+	 *
+	 * @memberof PIXI.utils
+	 * @function getResolutionOfUrl
+	 * @param {string} url - the image path
+	 * @param {number} [defaultValue=1] - the defaultValue if no filename prefix is set.
+	 * @return {number} resolution / device pixel ratio of an asset
+	 */
+	function getResolutionOfUrl(url, defaultValue)
+	{
+	    var resolution = settings.RETINA_PREFIX.exec(url);
+
+	    if (resolution)
+	    {
+	        return parseFloat(resolution[1]);
+	    }
+
+	    return defaultValue !== undefined ? defaultValue : 1;
+	}
+
+	// A map of warning messages already fired
+	var warnings = {};
+
+	/**
+	 * Helper for warning developers about deprecated features & settings.
+	 * A stack track for warnings is given; useful for tracking-down where
+	 * deprecated methods/properties/classes are being used within the code.
+	 *
+	 * @memberof PIXI.utils
+	 * @function deprecation
+	 * @param {string} version - The version where the feature became deprecated
+	 * @param {string} message - Message should include what is deprecated, where, and the new solution
+	 * @param {number} [ignoreDepth=3] - The number of steps to ignore at the top of the error stack
+	 *        this is mostly to ignore internal deprecation calls.
+	 */
+	function deprecation(version, message, ignoreDepth)
+	{
+	    if ( ignoreDepth === void 0 ) { ignoreDepth = 3; }
+
+	    // Ignore duplicat
+	    if (warnings[message])
+	    {
+	        return;
+	    }
+
+	    /* eslint-disable no-console */
+	    var stack = new Error().stack;
+
+	    // Handle IE < 10 and Safari < 6
+	    if (typeof stack === 'undefined')
+	    {
+	        console.warn('PixiJS Deprecation Warning: ', (message + "\nDeprecated since v" + version));
+	    }
+	    else
+	    {
+	        // chop off the stack trace which includes PixiJS internal calls
+	        stack = stack.split('\n').splice(ignoreDepth).join('\n');
+
+	        if (console.groupCollapsed)
+	        {
+	            console.groupCollapsed(
+	                '%cPixiJS Deprecation Warning: %c%s',
+	                'color:#614108;background:#fffbe6',
+	                'font-weight:normal;color:#614108;background:#fffbe6',
+	                (message + "\nDeprecated since v" + version)
+	            );
+	            console.warn(stack);
+	            console.groupEnd();
+	        }
+	        else
+	        {
+	            console.warn('PixiJS Deprecation Warning: ', (message + "\nDeprecated since v" + version));
+	            console.warn(stack);
+	        }
+	    }
+	    /* eslint-enable no-console */
+
+	    warnings[message] = true;
+	}
+
+	var utils_es = ({
+		BaseTextureCache: BaseTextureCache,
+		CanvasRenderTarget: CanvasRenderTarget,
+		DATA_URI: DATA_URI,
+		ProgramCache: ProgramCache,
+		TextureCache: TextureCache,
+		clearTextureCache: clearTextureCache,
+		correctBlendMode: correctBlendMode,
+		createIndicesForQuads: createIndicesForQuads,
+		decomposeDataUri: decomposeDataUri,
+		deprecation: deprecation,
+		destroyTextureCache: destroyTextureCache,
+		determineCrossOrigin: determineCrossOrigin,
+		getResolutionOfUrl: getResolutionOfUrl,
+		hex2rgb: hex2rgb,
+		hex2string: hex2string,
+		isPow2: isPow2,
+		isWebGLSupported: isWebGLSupported,
+		log2: log2,
+		nextPow2: nextPow2,
+		premultiplyBlendMode: premultiplyBlendMode,
+		premultiplyRgba: premultiplyRgba,
+		premultiplyTint: premultiplyTint,
+		premultiplyTintToRgba: premultiplyTintToRgba,
+		removeItems: removeItems,
+		rgb2hex: rgb2hex,
+		sayHello: sayHello,
+		sign: sign$1,
+		skipHello: skipHello,
+		string2hex: string2hex,
+		trimCanvas: trimCanvas,
+		uid: uid,
+		isMobile: isMobile_min,
+		EventEmitter: eventemitter3,
+		earcut: earcut_1,
+		url: url
+	});
+
+	/*!
+	 * @pixi/math - v5.1.0
+	 * Compiled Fri, 20 Sep 2019 17:22:13 UTC
+	 *
+	 * @pixi/math is licensed under the MIT License.
+	 * http://www.opensource.org/licenses/mit-license
+	 */
+	/**
+	 * The Point object represents a location in a two-dimensional coordinate system, where x represents
+	 * the horizontal axis and y represents the vertical axis.
+	 *
+	 * @class
+	 * @memberof PIXI
+	 */
+	var Point = function Point(x, y)
+	{
+	    if ( x === void 0 ) { x = 0; }
+	    if ( y === void 0 ) { y = 0; }
+
+	    /**
+	     * @member {number}
+	     * @default 0
+	     */
+	    this.x = x;
+
+	    /**
+	     * @member {number}
+	     * @default 0
+	     */
+	    this.y = y;
+	};
+
+	/**
+	 * Creates a clone of this point
+	 *
+	 * @return {PIXI.Point} a copy of the point
+	 */
+	Point.prototype.clone = function clone ()
+	{
+	    return new Point(this.x, this.y);
+	};
+
+	/**
+	 * Copies x and y from the given point
+	 *
+	 * @param {PIXI.IPoint} p - The point to copy from
+	 * @returns {PIXI.IPoint} Returns itself.
+	 */
+	Point.prototype.copyFrom = function copyFrom (p)
+	{
+	    this.set(p.x, p.y);
+
+	    return this;
+	};
+
+	/**
+	 * Copies x and y into the given point
+	 *
+	 * @param {PIXI.IPoint} p - The point to copy.
+	 * @returns {PIXI.IPoint} Given point with values updated
+	 */
+	Point.prototype.copyTo = function copyTo (p)
+	{
+	    p.set(this.x, this.y);
+
+	    return p;
+	};
+
+	/**
+	 * Returns true if the given point is equal to this point
+	 *
+	 * @param {PIXI.IPoint} p - The point to check
+	 * @returns {boolean} Whether the given point equal to this point
+	 */
+	Point.prototype.equals = function equals (p)
+	{
+	    return (p.x === this.x) && (p.y === this.y);
+	};
+
+	/**
+	 * Sets the point to a new x and y position.
+	 * If y is omitted, both x and y will be set to x.
+	 *
+	 * @param {number} [x=0] - position of the point on the x axis
+	 * @param {number} [y=0] - position of the point on the y axis
+	 */
+	Point.prototype.set = function set (x, y)
+	{
+	    this.x = x || 0;
+	    this.y = y || ((y !== 0) ? this.x : 0);
+	};
+
+	/**
+	 * The Point object represents a location in a two-dimensional coordinate system, where x represents
+	 * the horizontal axis and y represents the vertical axis.
+	 *
+	 * An ObservablePoint is a point that triggers a callback when the point's position is changed.
+	 *
+	 * @class
+	 * @memberof PIXI
+	 */
+	var ObservablePoint = function ObservablePoint(cb, scope, x, y)
+	{
+	    if ( x === void 0 ) { x = 0; }
+	    if ( y === void 0 ) { y = 0; }
+
+	    this._x = x;
+	    this._y = y;
+
+	    this.cb = cb;
+	    this.scope = scope;
+	};
+
+	var prototypeAccessors$1 = { x: { configurable: true },y: { configurable: true } };
+
+	/**
+	 * Creates a clone of this point.
+	 * The callback and scope params can be overidden otherwise they will default
+	 * to the clone object's values.
+	 *
+	 * @override
+	 * @param {Function} [cb=null] - callback when changed
+	 * @param {object} [scope=null] - owner of callback
+	 * @return {PIXI.ObservablePoint} a copy of the point
+	 */
+	ObservablePoint.prototype.clone = function clone (cb, scope)
+	{
+	        if ( cb === void 0 ) { cb = null; }
+	        if ( scope === void 0 ) { scope = null; }
+
+	    var _cb = cb || this.cb;
+	    var _scope = scope || this.scope;
+
+	    return new ObservablePoint(_cb, _scope, this._x, this._y);
+	};
+
+	/**
+	 * Sets the point to a new x and y position.
+	 * If y is omitted, both x and y will be set to x.
+	 *
+	 * @param {number} [x=0] - position of the point on the x axis
+	 * @param {number} [y=0] - position of the point on the y axis
+	 */
+	ObservablePoint.prototype.set = function set (x, y)
+	{
+	    var _x = x || 0;
+	    var _y = y || ((y !== 0) ? _x : 0);
+
+	    if (this._x !== _x || this._y !== _y)
+	    {
+	        this._x = _x;
+	        this._y = _y;
+	        this.cb.call(this.scope);
+	    }
+	};
+
+	/**
+	 * Copies x and y from the given point
+	 *
+	 * @param {PIXI.IPoint} p - The point to copy from.
+	 * @returns {PIXI.IPoint} Returns itself.
+	 */
+	ObservablePoint.prototype.copyFrom = function copyFrom (p)
+	{
+	    if (this._x !== p.x || this._y !== p.y)
+	    {
+	        this._x = p.x;
+	        this._y = p.y;
+	        this.cb.call(this.scope);
+	    }
+
+	    return this;
+	};
+
+	/**
+	 * Copies x and y into the given point
+	 *
+	 * @param {PIXI.IPoint} p - The point to copy.
+	 * @returns {PIXI.IPoint} Given point with values updated
+	 */
+	ObservablePoint.prototype.copyTo = function copyTo (p)
+	{
+	    p.set(this._x, this._y);
+
+	    return p;
+	};
+
+	/**
+	 * Returns true if the given point is equal to this point
+	 *
+	 * @param {PIXI.IPoint} p - The point to check
+	 * @returns {boolean} Whether the given point equal to this point
+	 */
+	ObservablePoint.prototype.equals = function equals (p)
+	{
+	    return (p.x === this._x) && (p.y === this._y);
+	};
+
+	/**
+	 * The position of the displayObject on the x axis relative to the local coordinates of the parent.
+	 *
+	 * @member {number}
+	 */
+	prototypeAccessors$1.x.get = function ()
+	{
+	    return this._x;
+	};
+
+	prototypeAccessors$1.x.set = function (value) // eslint-disable-line require-jsdoc
+	{
+	    if (this._x !== value)
+	    {
+	        this._x = value;
+	        this.cb.call(this.scope);
+	    }
+	};
+
+	/**
+	 * The position of the displayObject on the x axis relative to the local coordinates of the parent.
+	 *
+	 * @member {number}
+	 */
+	prototypeAccessors$1.y.get = function ()
+	{
+	    return this._y;
+	};
+
+	prototypeAccessors$1.y.set = function (value) // eslint-disable-line require-jsdoc
+	{
+	    if (this._y !== value)
+	    {
+	        this._y = value;
+	        this.cb.call(this.scope);
+	    }
+	};
+
+	Object.defineProperties( ObservablePoint.prototype, prototypeAccessors$1 );
+
+	/**
+	 * A number, or a string containing a number.
+	 * @memberof PIXI
+	 * @typedef {(PIXI.Point|PIXI.ObservablePoint)} IPoint
+	 */
+
+	/**
+	 * Two Pi.
+	 *
+	 * @static
+	 * @constant {number} PI_2
+	 * @memberof PIXI
+	 */
+	var PI_2 = Math.PI * 2;
+
+	/**
+	 * Conversion factor for converting radians to degrees.
+	 *
+	 * @static
+	 * @constant {number} RAD_TO_DEG
+	 * @memberof PIXI
+	 */
+	var RAD_TO_DEG = 180 / Math.PI;
+
+	/**
+	 * Conversion factor for converting degrees to radians.
+	 *
+	 * @static
+	 * @constant {number} DEG_TO_RAD
+	 * @memberof PIXI
+	 */
+	var DEG_TO_RAD = Math.PI / 180;
+
+	/**
+	 * Constants that identify shapes, mainly to prevent `instanceof` calls.
+	 *
+	 * @static
+	 * @constant
+	 * @name SHAPES
+	 * @memberof PIXI
+	 * @type {object}
+	 * @property {number} POLY Polygon
+	 * @property {number} RECT Rectangle
+	 * @property {number} CIRC Circle
+	 * @property {number} ELIP Ellipse
+	 * @property {number} RREC Rounded Rectangle
+	 */
+	var SHAPES = {
+	    POLY: 0,
+	    RECT: 1,
+	    CIRC: 2,
+	    ELIP: 3,
+	    RREC: 4,
+	};
+
+	/**
+	 * The PixiJS Matrix as a class makes it a lot faster.
+	 *
+	 * Here is a representation of it:
+	 * ```js
+	 * | a | c | tx|
+	 * | b | d | ty|
+	 * | 0 | 0 | 1 |
+	 * ```
+	 * @class
+	 * @memberof PIXI
+	 */
+	var Matrix = function Matrix(a, b, c, d, tx, ty)
+	{
+	    if ( a === void 0 ) { a = 1; }
+	    if ( b === void 0 ) { b = 0; }
+	    if ( c === void 0 ) { c = 0; }
+	    if ( d === void 0 ) { d = 1; }
+	    if ( tx === void 0 ) { tx = 0; }
+	    if ( ty === void 0 ) { ty = 0; }
+
+	    /**
+	     * @member {number}
+	     * @default 1
+	     */
+	    this.a = a;
+
+	    /**
+	     * @member {number}
+	     * @default 0
+	     */
+	    this.b = b;
+
+	    /**
+	     * @member {number}
+	     * @default 0
+	     */
+	    this.c = c;
+
+	    /**
+	     * @member {number}
+	     * @default 1
+	     */
+	    this.d = d;
+
+	    /**
+	     * @member {number}
+	     * @default 0
+	     */
+	    this.tx = tx;
+
+	    /**
+	     * @member {number}
+	     * @default 0
+	     */
+	    this.ty = ty;
+
+	    this.array = null;
+	};
+
+	var staticAccessors = { IDENTITY: { configurable: true },TEMP_MATRIX: { configurable: true } };
+
+	/**
+	 * Creates a Matrix object based on the given array. The Element to Matrix mapping order is as follows:
+	 *
+	 * a = array[0]
+	 * b = array[1]
+	 * c = array[3]
+	 * d = array[4]
+	 * tx = array[2]
+	 * ty = array[5]
+	 *
+	 * @param {number[]} array - The array that the matrix will be populated from.
+	 */
+	Matrix.prototype.fromArray = function fromArray (array)
+	{
+	    this.a = array[0];
+	    this.b = array[1];
+	    this.c = array[3];
+	    this.d = array[4];
+	    this.tx = array[2];
+	    this.ty = array[5];
+	};
+
+	/**
+	 * sets the matrix properties
+	 *
+	 * @param {number} a - Matrix component
+	 * @param {number} b - Matrix component
+	 * @param {number} c - Matrix component
+	 * @param {number} d - Matrix component
+	 * @param {number} tx - Matrix component
+	 * @param {number} ty - Matrix component
+	 *
+	 * @return {PIXI.Matrix} This matrix. Good for chaining method calls.
+	 */
+	Matrix.prototype.set = function set (a, b, c, d, tx, ty)
+	{
+	    this.a = a;
+	    this.b = b;
+	    this.c = c;
+	    this.d = d;
+	    this.tx = tx;
+	    this.ty = ty;
+
+	    return this;
+	};
+
+	/**
+	 * Creates an array from the current Matrix object.
+	 *
+	 * @param {boolean} transpose - Whether we need to transpose the matrix or not
+	 * @param {Float32Array} [out=new Float32Array(9)] - If provided the array will be assigned to out
+	 * @return {number[]} the newly created array which contains the matrix
+	 */
+	Matrix.prototype.toArray = function toArray (transpose, out)
+	{
+	    if (!this.array)
+	    {
+	        this.array = new Float32Array(9);
+	    }
+
+	    var array = out || this.array;
+
+	    if (transpose)
+	    {
+	        array[0] = this.a;
+	        array[1] = this.b;
+	        array[2] = 0;
+	        array[3] = this.c;
+	        array[4] = this.d;
+	        array[5] = 0;
+	        array[6] = this.tx;
+	        array[7] = this.ty;
+	        array[8] = 1;
+	    }
+	    else
+	    {
+	        array[0] = this.a;
+	        array[1] = this.c;
+	        array[2] = this.tx;
+	        array[3] = this.b;
+	        array[4] = this.d;
+	        array[5] = this.ty;
+	        array[6] = 0;
+	        array[7] = 0;
+	        array[8] = 1;
+	    }
+
+	    return array;
+	};
+
+	/**
+	 * Get a new position with the current transformation applied.
+	 * Can be used to go from a child's coordinate space to the world coordinate space. (e.g. rendering)
+	 *
+	 * @param {PIXI.Point} pos - The origin
+	 * @param {PIXI.Point} [newPos] - The point that the new position is assigned to (allowed to be same as input)
+	 * @return {PIXI.Point} The new point, transformed through this matrix
+	 */
+	Matrix.prototype.apply = function apply (pos, newPos)
+	{
+	    newPos = newPos || new Point();
+
+	    var x = pos.x;
+	    var y = pos.y;
+
+	    newPos.x = (this.a * x) + (this.c * y) + this.tx;
+	    newPos.y = (this.b * x) + (this.d * y) + this.ty;
+
+	    return newPos;
+	};
+
+	/**
+	 * Get a new position with the inverse of the current transformation applied.
+	 * Can be used to go from the world coordinate space to a child's coordinate space. (e.g. input)
+	 *
+	 * @param {PIXI.Point} pos - The origin
+	 * @param {PIXI.Point} [newPos] - The point that the new position is assigned to (allowed to be same as input)
+	 * @return {PIXI.Point} The new point, inverse-transformed through this matrix
+	 */
+	Matrix.prototype.applyInverse = function applyInverse (pos, newPos)
+	{
+	    newPos = newPos || new Point();
+
+	    var id = 1 / ((this.a * this.d) + (this.c * -this.b));
+
+	    var x = pos.x;
+	    var y = pos.y;
+
+	    newPos.x = (this.d * id * x) + (-this.c * id * y) + (((this.ty * this.c) - (this.tx * this.d)) * id);
+	    newPos.y = (this.a * id * y) + (-this.b * id * x) + (((-this.ty * this.a) + (this.tx * this.b)) * id);
+
+	    return newPos;
+	};
+
+	/**
+	 * Translates the matrix on the x and y.
+	 *
+	 * @param {number} x How much to translate x by
+	 * @param {number} y How much to translate y by
+	 * @return {PIXI.Matrix} This matrix. Good for chaining method calls.
+	 */
+	Matrix.prototype.translate = function translate (x, y)
+	{
+	    this.tx += x;
+	    this.ty += y;
+
+	    return this;
+	};
+
+	/**
+	 * Applies a scale transformation to the matrix.
+	 *
+	 * @param {number} x The amount to scale horizontally
+	 * @param {number} y The amount to scale vertically
+	 * @return {PIXI.Matrix} This matrix. Good for chaining method calls.
+	 */
+	Matrix.prototype.scale = function scale (x, y)
+	{
+	    this.a *= x;
+	    this.d *= y;
+	    this.c *= x;
+	    this.b *= y;
+	    this.tx *= x;
+	    this.ty *= y;
+
+	    return this;
+	};
+
+	/**
+	 * Applies a rotation transformation to the matrix.
+	 *
+	 * @param {number} angle - The angle in radians.
+	 * @return {PIXI.Matrix} This matrix. Good for chaining method calls.
+	 */
+	Matrix.prototype.rotate = function rotate (angle)
+	{
+	    var cos = Math.cos(angle);
+	    var sin = Math.sin(angle);
+
+	    var a1 = this.a;
+	    var c1 = this.c;
+	    var tx1 = this.tx;
+
+	    this.a = (a1 * cos) - (this.b * sin);
+	    this.b = (a1 * sin) + (this.b * cos);
+	    this.c = (c1 * cos) - (this.d * sin);
+	    this.d = (c1 * sin) + (this.d * cos);
+	    this.tx = (tx1 * cos) - (this.ty * sin);
+	    this.ty = (tx1 * sin) + (this.ty * cos);
+
+	    return this;
+	};
+
+	/**
+	 * Appends the given Matrix to this Matrix.
+	 *
+	 * @param {PIXI.Matrix} matrix - The matrix to append.
+	 * @return {PIXI.Matrix} This matrix. Good for chaining method calls.
+	 */
+	Matrix.prototype.append = function append (matrix)
+	{
+	    var a1 = this.a;
+	    var b1 = this.b;
+	    var c1 = this.c;
+	    var d1 = this.d;
+
+	    this.a = (matrix.a * a1) + (matrix.b * c1);
+	    this.b = (matrix.a * b1) + (matrix.b * d1);
+	    this.c = (matrix.c * a1) + (matrix.d * c1);
+	    this.d = (matrix.c * b1) + (matrix.d * d1);
+
+	    this.tx = (matrix.tx * a1) + (matrix.ty * c1) + this.tx;
+	    this.ty = (matrix.tx * b1) + (matrix.ty * d1) + this.ty;
+
+	    return this;
+	};
+
+	/**
+	 * Sets the matrix based on all the available properties
+	 *
+	 * @param {number} x - Position on the x axis
+	 * @param {number} y - Position on the y axis
+	 * @param {number} pivotX - Pivot on the x axis
+	 * @param {number} pivotY - Pivot on the y axis
+	 * @param {number} scaleX - Scale on the x axis
+	 * @param {number} scaleY - Scale on the y axis
+	 * @param {number} rotation - Rotation in radians
+	 * @param {number} skewX - Skew on the x axis
+	 * @param {number} skewY - Skew on the y axis
+	 * @return {PIXI.Matrix} This matrix. Good for chaining method calls.
+	 */
+	Matrix.prototype.setTransform = function setTransform (x, y, pivotX, pivotY, scaleX, scaleY, rotation, skewX, skewY)
+	{
+	    this.a = Math.cos(rotation + skewY) * scaleX;
+	    this.b = Math.sin(rotation + skewY) * scaleX;
+	    this.c = -Math.sin(rotation - skewX) * scaleY;
+	    this.d = Math.cos(rotation - skewX) * scaleY;
+
+	    this.tx = x - ((pivotX * this.a) + (pivotY * this.c));
+	    this.ty = y - ((pivotX * this.b) + (pivotY * this.d));
+
+	    return this;
+	};
+
+	/**
+	 * Prepends the given Matrix to this Matrix.
+	 *
+	 * @param {PIXI.Matrix} matrix - The matrix to prepend
+	 * @return {PIXI.Matrix} This matrix. Good for chaining method calls.
+	 */
+	Matrix.prototype.prepend = function prepend (matrix)
+	{
+	    var tx1 = this.tx;
+
+	    if (matrix.a !== 1 || matrix.b !== 0 || matrix.c !== 0 || matrix.d !== 1)
+	    {
+	        var a1 = this.a;
+	        var c1 = this.c;
+
+	        this.a = (a1 * matrix.a) + (this.b * matrix.c);
+	        this.b = (a1 * matrix.b) + (this.b * matrix.d);
+	        this.c = (c1 * matrix.a) + (this.d * matrix.c);
+	        this.d = (c1 * matrix.b) + (this.d * matrix.d);
+	    }
+
+	    this.tx = (tx1 * matrix.a) + (this.ty * matrix.c) + matrix.tx;
+	    this.ty = (tx1 * matrix.b) + (this.ty * matrix.d) + matrix.ty;
+
+	    return this;
+	};
+
+	/**
+	 * Decomposes the matrix (x, y, scaleX, scaleY, and rotation) and sets the properties on to a transform.
+	 *
+	 * @param {PIXI.Transform} transform - The transform to apply the properties to.
+	 * @return {PIXI.Transform} The transform with the newly applied properties
+	 */
+	Matrix.prototype.decompose = function decompose (transform)
+	{
+	    // sort out rotation / skew..
+	    var a = this.a;
+	    var b = this.b;
+	    var c = this.c;
+	    var d = this.d;
+
+	    var skewX = -Math.atan2(-c, d);
+	    var skewY = Math.atan2(b, a);
+
+	    var delta = Math.abs(skewX + skewY);
+
+	    if (delta < 0.00001 || Math.abs(PI_2 - delta) < 0.00001)
+	    {
+	        transform.rotation = skewY;
+	        transform.skew.x = transform.skew.y = 0;
+	    }
+	    else
+	    {
+	        transform.rotation = 0;
+	        transform.skew.x = skewX;
+	        transform.skew.y = skewY;
+	    }
+
+	    // next set scale
+	    transform.scale.x = Math.sqrt((a * a) + (b * b));
+	    transform.scale.y = Math.sqrt((c * c) + (d * d));
+
+	    // next set position
+	    transform.position.x = this.tx;
+	    transform.position.y = this.ty;
+
+	    return transform;
+	};
+
+	/**
+	 * Inverts this matrix
+	 *
+	 * @return {PIXI.Matrix} This matrix. Good for chaining method calls.
+	 */
+	Matrix.prototype.invert = function invert ()
+	{
+	    var a1 = this.a;
+	    var b1 = this.b;
+	    var c1 = this.c;
+	    var d1 = this.d;
+	    var tx1 = this.tx;
+	    var n = (a1 * d1) - (b1 * c1);
+
+	    this.a = d1 / n;
+	    this.b = -b1 / n;
+	    this.c = -c1 / n;
+	    this.d = a1 / n;
+	    this.tx = ((c1 * this.ty) - (d1 * tx1)) / n;
+	    this.ty = -((a1 * this.ty) - (b1 * tx1)) / n;
+
+	    return this;
+	};
+
+	/**
+	 * Resets this Matrix to an identity (default) matrix.
+	 *
+	 * @return {PIXI.Matrix} This matrix. Good for chaining method calls.
+	 */
+	Matrix.prototype.identity = function identity ()
+	{
+	    this.a = 1;
+	    this.b = 0;
+	    this.c = 0;
+	    this.d = 1;
+	    this.tx = 0;
+	    this.ty = 0;
+
+	    return this;
+	};
+
+	/**
+	 * Creates a new Matrix object with the same values as this one.
+	 *
+	 * @return {PIXI.Matrix} A copy of this matrix. Good for chaining method calls.
+	 */
+	Matrix.prototype.clone = function clone ()
+	{
+	    var matrix = new Matrix();
+
+	    matrix.a = this.a;
+	    matrix.b = this.b;
+	    matrix.c = this.c;
+	    matrix.d = this.d;
+	    matrix.tx = this.tx;
+	    matrix.ty = this.ty;
+
+	    return matrix;
+	};
+
+	/**
+	 * Changes the values of the given matrix to be the same as the ones in this matrix
+	 *
+	 * @param {PIXI.Matrix} matrix - The matrix to copy to.
+	 * @return {PIXI.Matrix} The matrix given in parameter with its values updated.
+	 */
+	Matrix.prototype.copyTo = function copyTo (matrix)
+	{
+	    matrix.a = this.a;
+	    matrix.b = this.b;
+	    matrix.c = this.c;
+	    matrix.d = this.d;
+	    matrix.tx = this.tx;
+	    matrix.ty = this.ty;
+
+	    return matrix;
+	};
+
+	/**
+	 * Changes the values of the matrix to be the same as the ones in given matrix
+	 *
+	 * @param {PIXI.Matrix} matrix - The matrix to copy from.
+	 * @return {PIXI.Matrix} this
+	 */
+	Matrix.prototype.copyFrom = function copyFrom (matrix)
+	{
+	    this.a = matrix.a;
+	    this.b = matrix.b;
+	    this.c = matrix.c;
+	    this.d = matrix.d;
+	    this.tx = matrix.tx;
+	    this.ty = matrix.ty;
+
+	    return this;
+	};
+
+	/**
+	 * A default (identity) matrix
+	 *
+	 * @static
+	 * @const
+	 * @member {PIXI.Matrix}
+	 */
+	staticAccessors.IDENTITY.get = function ()
+	{
+	    return new Matrix();
+	};
+
+	/**
+	 * A temp matrix
+	 *
+	 * @static
+	 * @const
+	 * @member {PIXI.Matrix}
+	 */
+	staticAccessors.TEMP_MATRIX.get = function ()
+	{
+	    return new Matrix();
+	};
+
+	Object.defineProperties( Matrix, staticAccessors );
+
+	// Your friendly neighbour https://en.wikipedia.org/wiki/Dihedral_group
+
+	/*
+	 * Transform matrix for operation n is:
+	 * | ux | vx |
+	 * | uy | vy |
+	 */
+
+	var ux = [1, 1, 0, -1, -1, -1, 0, 1, 1, 1, 0, -1, -1, -1, 0, 1];
+	var uy = [0, 1, 1, 1, 0, -1, -1, -1, 0, 1, 1, 1, 0, -1, -1, -1];
+	var vx = [0, -1, -1, -1, 0, 1, 1, 1, 0, 1, 1, 1, 0, -1, -1, -1];
+	var vy = [1, 1, 0, -1, -1, -1, 0, 1, -1, -1, 0, 1, 1, 1, 0, -1];
+
+	/**
+	 * [Cayley Table]{@link https://en.wikipedia.org/wiki/Cayley_table}
+	 * for the composition of each rotation in the dihederal group D8.
+	 *
+	 * @type number[][]
+	 * @private
+	 */
+	var rotationCayley = [];
+
+	/**
+	 * Matrices for each `GD8Symmetry` rotation.
+	 *
+	 * @type Matrix[]
+	 * @private
+	 */
+	var rotationMatrices = [];
+
+	/*
+	 * Alias for {@code Math.sign}.
+	 */
+	var signum = Math.sign;
+
+	/*
+	 * Initializes `rotationCayley` and `rotationMatrices`. It is called
+	 * only once below.
+	 */
+	function init()
+	{
+	    for (var i = 0; i < 16; i++)
+	    {
+	        var row = [];
+
+	        rotationCayley.push(row);
+
+	        for (var j = 0; j < 16; j++)
+	        {
+	            /* Multiplies rotation matrices i and j. */
+	            var _ux = signum((ux[i] * ux[j]) + (vx[i] * uy[j]));
+	            var _uy = signum((uy[i] * ux[j]) + (vy[i] * uy[j]));
+	            var _vx = signum((ux[i] * vx[j]) + (vx[i] * vy[j]));
+	            var _vy = signum((uy[i] * vx[j]) + (vy[i] * vy[j]));
+
+	            /* Finds rotation matrix matching the product and pushes it. */
+	            for (var k = 0; k < 16; k++)
+	            {
+	                if (ux[k] === _ux && uy[k] === _uy
+	                      && vx[k] === _vx && vy[k] === _vy)
+	                {
+	                    row.push(k);
+	                    break;
+	                }
+	            }
+	        }
+	    }
+
+	    for (var i$1 = 0; i$1 < 16; i$1++)
+	    {
+	        var mat = new Matrix();
+
+	        mat.set(ux[i$1], uy[i$1], vx[i$1], vy[i$1], 0, 0);
+	        rotationMatrices.push(mat);
+	    }
+	}
+
+	init();
+
+	/**
+	 * @memberof PIXI
+	 * @typedef {number} GD8Symmetry
+	 * @see PIXI.GroupD8
+	 */
+
+	/**
+	 * Implements the dihedral group D8, which is similar to
+	 * [group D4]{@link http://mathworld.wolfram.com/DihedralGroupD4.html};
+	 * D8 is the same but with diagonals, and it is used for texture
+	 * rotations.
+	 *
+	 * The directions the U- and V- axes after rotation
+	 * of an angle of `a: GD8Constant` are the vectors `(uX(a), uY(a))`
+	 * and `(vX(a), vY(a))`. These aren't necessarily unit vectors.
+	 *
+	 * **Origin:**<br>
+	 *  This is the small part of gameofbombs.com portal system. It works.
+	 *
+	 * @see PIXI.GroupD8.E
+	 * @see PIXI.GroupD8.SE
+	 * @see PIXI.GroupD8.S
+	 * @see PIXI.GroupD8.SW
+	 * @see PIXI.GroupD8.W
+	 * @see PIXI.GroupD8.NW
+	 * @see PIXI.GroupD8.N
+	 * @see PIXI.GroupD8.NE
+	 * @author Ivan @ivanpopelyshev
+	 * @class
+	 * @memberof PIXI
+	 */
+	var GroupD8 = {
+	    /**
+	     * | Rotation | Direction |
+	     * |----------|-----------|
+	     * | 0°       | East      |
+	     *
+	     * @constant {PIXI.GD8Symmetry}
+	     */
+	    E: 0,
+
+	    /**
+	     * | Rotation | Direction |
+	     * |----------|-----------|
+	     * | 45°↻     | Southeast |
+	     *
+	     * @constant {PIXI.GD8Symmetry}
+	     */
+	    SE: 1,
+
+	    /**
+	     * | Rotation | Direction |
+	     * |----------|-----------|
+	     * | 90°↻     | South     |
+	     *
+	     * @constant {PIXI.GD8Symmetry}
+	     */
+	    S: 2,
+
+	    /**
+	     * | Rotation | Direction |
+	     * |----------|-----------|
+	     * | 135°↻    | Southwest |
+	     *
+	     * @constant {PIXI.GD8Symmetry}
+	     */
+	    SW: 3,
+
+	    /**
+	     * | Rotation | Direction |
+	     * |----------|-----------|
+	     * | 180°     | West      |
+	     *
+	     * @constant {PIXI.GD8Symmetry}
+	     */
+	    W: 4,
+
+	    /**
+	     * | Rotation    | Direction    |
+	     * |-------------|--------------|
+	     * | -135°/225°↻ | Northwest    |
+	     *
+	     * @constant {PIXI.GD8Symmetry}
+	     */
+	    NW: 5,
+
+	    /**
+	     * | Rotation    | Direction    |
+	     * |-------------|--------------|
+	     * | -90°/270°↻  | North        |
+	     *
+	     * @constant {PIXI.GD8Symmetry}
+	     */
+	    N: 6,
+
+	    /**
+	     * | Rotation    | Direction    |
+	     * |-------------|--------------|
+	     * | -45°/315°↻  | Northeast    |
+	     *
+	     * @constant {PIXI.GD8Symmetry}
+	     */
+	    NE: 7,
+
+	    /**
+	     * Reflection about Y-axis.
+	     *
+	     * @constant {PIXI.GD8Symmetry}
+	     */
+	    MIRROR_VERTICAL: 8,
+
+	    /**
+	     * Reflection about the main diagonal.
+	     *
+	     * @constant {PIXI.GD8Symmetry}
+	     */
+	    MAIN_DIAGONAL: 10,
+
+	    /**
+	     * Reflection about X-axis.
+	     *
+	     * @constant {PIXI.GD8Symmetry}
+	     */
+	    MIRROR_HORIZONTAL: 12,
+
+	    /**
+	     * Reflection about reverse diagonal.
+	     *
+	     * @constant {PIXI.GD8Symmetry}
+	     */
+	    REVERSE_DIAGONAL: 14,
+
+	    /**
+	     * @memberof PIXI.GroupD8
+	     * @param {PIXI.GD8Symmetry} ind - sprite rotation angle.
+	     * @return {PIXI.GD8Symmetry} The X-component of the U-axis
+	     *    after rotating the axes.
+	     */
+	    uX: function (ind) { return ux[ind]; },
+
+	    /**
+	     * @memberof PIXI.GroupD8
+	     * @param {PIXI.GD8Symmetry} ind - sprite rotation angle.
+	     * @return {PIXI.GD8Symmetry} The Y-component of the U-axis
+	     *    after rotating the axes.
+	     */
+	    uY: function (ind) { return uy[ind]; },
+
+	    /**
+	     * @memberof PIXI.GroupD8
+	     * @param {PIXI.GD8Symmetry} ind - sprite rotation angle.
+	     * @return {PIXI.GD8Symmetry} The X-component of the V-axis
+	     *    after rotating the axes.
+	     */
+	    vX: function (ind) { return vx[ind]; },
+
+	    /**
+	     * @memberof PIXI.GroupD8
+	     * @param {PIXI.GD8Symmetry} ind - sprite rotation angle.
+	     * @return {PIXI.GD8Symmetry} The Y-component of the V-axis
+	     *    after rotating the axes.
+	     */
+	    vY: function (ind) { return vy[ind]; },
+
+	    /**
+	     * @memberof PIXI.GroupD8
+	     * @param {PIXI.GD8Symmetry} rotation - symmetry whose opposite
+	     *   is needed. Only rotations have opposite symmetries while
+	     *   reflections don't.
+	     * @return {PIXI.GD8Symmetry} The opposite symmetry of `rotation`
+	     */
+	    inv: function (rotation) {
+	        if (rotation & 8)// true only if between 8 & 15 (reflections)
+	        {
+	            return rotation & 15;// or rotation % 16
+	        }
+
+	        return (-rotation) & 7;// or (8 - rotation) % 8
+	    },
+
+	    /**
+	     * Composes the two D8 operations.
+	     *
+	     * Taking `^` as reflection:
+	     *
+	     * |       | E=0 | S=2 | W=4 | N=6 | E^=8 | S^=10 | W^=12 | N^=14 |
+	     * |-------|-----|-----|-----|-----|------|-------|-------|-------|
+	     * | E=0   | E   | S   | W   | N   | E^   | S^    | W^    | N^    |
+	     * | S=2   | S   | W   | N   | E   | S^   | W^    | N^    | E^    |
+	     * | W=4   | W   | N   | E   | S   | W^   | N^    | E^    | S^    |
+	     * | N=6   | N   | E   | S   | W   | N^   | E^    | S^    | W^    |
+	     * | E^=8  | E^  | N^  | W^  | S^  | E    | N     | W     | S     |
+	     * | S^=10 | S^  | E^  | N^  | W^  | S    | E     | N     | W     |
+	     * | W^=12 | W^  | S^  | E^  | N^  | W    | S     | E     | N     |
+	     * | N^=14 | N^  | W^  | S^  | E^  | N    | W     | S     | E     |
+	     *
+	     * [This is a Cayley table]{@link https://en.wikipedia.org/wiki/Cayley_table}
+	     * @memberof PIXI.GroupD8
+	     * @param {PIXI.GD8Symmetry} rotationSecond - Second operation, which
+	     *   is the row in the above cayley table.
+	     * @param {PIXI.GD8Symmetry} rotationFirst - First operation, which
+	     *   is the column in the above cayley table.
+	     * @return {PIXI.GD8Symmetry} Composed operation
+	     */
+	    add: function (rotationSecond, rotationFirst) { return (
+	        rotationCayley[rotationSecond][rotationFirst]
+	    ); },
+
+	    /**
+	     * Reverse of `add`.
+	     *
+	     * @memberof PIXI.GroupD8
+	     * @param {PIXI.GD8Symmetry} rotationSecond - Second operation
+	     * @param {PIXI.GD8Symmetry} rotationFirst - First operation
+	     * @return {PIXI.GD8Symmetry} Result
+	     */
+	    sub: function (rotationSecond, rotationFirst) { return (
+	        rotationCayley[rotationSecond][GroupD8.inv(rotationFirst)]
+	    ); },
+
+	    /**
+	     * Adds 180 degrees to rotation, which is a commutative
+	     * operation.
+	     *
+	     * @memberof PIXI.GroupD8
+	     * @param {number} rotation - The number to rotate.
+	     * @returns {number} Rotated number
+	     */
+	    rotate180: function (rotation) { return rotation ^ 4; },
+
+	    /**
+	     * Checks if the rotation angle is vertical, i.e. south
+	     * or north. It doesn't work for reflections.
+	     *
+	     * @memberof PIXI.GroupD8
+	     * @param {PIXI.GD8Symmetry} rotation - The number to check.
+	     * @returns {boolean} Whether or not the direction is vertical
+	     */
+	    isVertical: function (rotation) { return (rotation & 3) === 2; }, // rotation % 4 === 2
+
+	    /**
+	     * Approximates the vector `V(dx,dy)` into one of the
+	     * eight directions provided by `GroupD8`.
+	     *
+	     * @memberof PIXI.GroupD8
+	     * @param {number} dx - X-component of the vector
+	     * @param {number} dy - Y-component of the vector
+	     * @return {PIXI.GD8Symmetry} Approximation of the vector into
+	     *  one of the eight symmetries.
+	     */
+	    byDirection: function (dx, dy) {
+	        if (Math.abs(dx) * 2 <= Math.abs(dy))
+	        {
+	            if (dy >= 0)
+	            {
+	                return GroupD8.S;
+	            }
+
+	            return GroupD8.N;
+	        }
+	        else if (Math.abs(dy) * 2 <= Math.abs(dx))
+	        {
+	            if (dx > 0)
+	            {
+	                return GroupD8.E;
+	            }
+
+	            return GroupD8.W;
+	        }
+	        else if (dy > 0)
+	        {
+	            if (dx > 0)
+	            {
+	                return GroupD8.SE;
+	            }
+
+	            return GroupD8.SW;
+	        }
+	        else if (dx > 0)
+	        {
+	            return GroupD8.NE;
+	        }
+
+	        return GroupD8.NW;
+	    },
+
+	    /**
+	     * Helps sprite to compensate texture packer rotation.
+	     *
+	     * @memberof PIXI.GroupD8
+	     * @param {PIXI.Matrix} matrix - sprite world matrix
+	     * @param {PIXI.GD8Symmetry} rotation - The rotation factor to use.
+	     * @param {number} tx - sprite anchoring
+	     * @param {number} ty - sprite anchoring
+	     */
+	    matrixAppendRotationInv: function (matrix, rotation, tx, ty) {
+	        if ( tx === void 0 ) { tx = 0; }
+	        if ( ty === void 0 ) { ty = 0; }
+
+	        // Packer used "rotation", we use "inv(rotation)"
+	        var mat = rotationMatrices[GroupD8.inv(rotation)];
+
+	        mat.tx = tx;
+	        mat.ty = ty;
+	        matrix.append(mat);
+	    },
+	};
+
+	/**
+	 * Transform that takes care about its versions
+	 *
+	 * @class
+	 * @memberof PIXI
+	 */
+	var Transform = function Transform()
+	{
+	    /**
+	     * The world transformation matrix.
+	     *
+	     * @member {PIXI.Matrix}
+	     */
+	    this.worldTransform = new Matrix();
+
+	    /**
+	     * The local transformation matrix.
+	     *
+	     * @member {PIXI.Matrix}
+	     */
+	    this.localTransform = new Matrix();
+
+	    /**
+	     * The coordinate of the object relative to the local coordinates of the parent.
+	     *
+	     * @member {PIXI.ObservablePoint}
+	     */
+	    this.position = new ObservablePoint(this.onChange, this, 0, 0);
+
+	    /**
+	     * The scale factor of the object.
+	     *
+	     * @member {PIXI.ObservablePoint}
+	     */
+	    this.scale = new ObservablePoint(this.onChange, this, 1, 1);
+
+	    /**
+	     * The pivot point of the displayObject that it rotates around.
+	     *
+	     * @member {PIXI.ObservablePoint}
+	     */
+	    this.pivot = new ObservablePoint(this.onChange, this, 0, 0);
+
+	    /**
+	     * The skew amount, on the x and y axis.
+	     *
+	     * @member {PIXI.ObservablePoint}
+	     */
+	    this.skew = new ObservablePoint(this.updateSkew, this, 0, 0);
+
+	    /**
+	     * The rotation amount.
+	     *
+	     * @protected
+	     * @member {number}
+	     */
+	    this._rotation = 0;
+
+	    /**
+	     * The X-coordinate value of the normalized local X axis,
+	     * the first column of the local transformation matrix without a scale.
+	     *
+	     * @protected
+	     * @member {number}
+	     */
+	    this._cx = 1;
+
+	    /**
+	     * The Y-coordinate value of the normalized local X axis,
+	     * the first column of the local transformation matrix without a scale.
+	     *
+	     * @protected
+	     * @member {number}
+	     */
+	    this._sx = 0;
+
+	    /**
+	     * The X-coordinate value of the normalized local Y axis,
+	     * the second column of the local transformation matrix without a scale.
+	     *
+	     * @protected
+	     * @member {number}
+	     */
+	    this._cy = 0;
+
+	    /**
+	     * The Y-coordinate value of the normalized local Y axis,
+	     * the second column of the local transformation matrix without a scale.
+	     *
+	     * @protected
+	     * @member {number}
+	     */
+	    this._sy = 1;
+
+	    /**
+	     * The locally unique ID of the local transform.
+	     *
+	     * @protected
+	     * @member {number}
+	     */
+	    this._localID = 0;
+
+	    /**
+	     * The locally unique ID of the local transform
+	     * used to calculate the current local transformation matrix.
+	     *
+	     * @protected
+	     * @member {number}
+	     */
+	    this._currentLocalID = 0;
+
+	    /**
+	     * The locally unique ID of the world transform.
+	     *
+	     * @protected
+	     * @member {number}
+	     */
+	    this._worldID = 0;
+
+	    /**
+	     * The locally unique ID of the parent's world transform
+	     * used to calculate the current world transformation matrix.
+	     *
+	     * @protected
+	     * @member {number}
+	     */
+	    this._parentID = 0;
+	};
+
+	var prototypeAccessors$1$1 = { rotation: { configurable: true } };
+
+	/**
+	 * Called when a value changes.
+	 *
+	 * @protected
+	 */
+	Transform.prototype.onChange = function onChange ()
+	{
+	    this._localID++;
+	};
+
+	/**
+	 * Called when the skew or the rotation changes.
+	 *
+	 * @protected
+	 */
+	Transform.prototype.updateSkew = function updateSkew ()
+	{
+	    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); // cos, added PI/2
+	    this._sy = Math.cos(this._rotation - this.skew._x); // sin, added PI/2
+
+	    this._localID++;
+	};
+
+	/**
+	 * Updates the local transformation matrix.
+	 */
+	Transform.prototype.updateLocalTransform = function updateLocalTransform ()
+	{
+	    var lt = this.localTransform;
+
+	    if (this._localID !== this._currentLocalID)
+	    {
+	        // get the matrix values of the displayobject based on its transform properties..
+	        lt.a = this._cx * this.scale._x;
+	        lt.b = this._sx * this.scale._x;
+	        lt.c = this._cy * this.scale._y;
+	        lt.d = this._sy * this.scale._y;
+
+	        lt.tx = this.position._x - ((this.pivot._x * lt.a) + (this.pivot._y * lt.c));
+	        lt.ty = this.position._y - ((this.pivot._x * lt.b) + (this.pivot._y * lt.d));
+	        this._currentLocalID = this._localID;
+
+	        // force an update..
+	        this._parentID = -1;
+	    }
+	};
+
+	/**
+	 * Updates the local and the world transformation matrices.
+	 *
+	 * @param {PIXI.Transform} parentTransform - The parent transform
+	 */
+	Transform.prototype.updateTransform = function updateTransform (parentTransform)
+	{
+	    var lt = this.localTransform;
+
+	    if (this._localID !== this._currentLocalID)
+	    {
+	        // get the matrix values of the displayobject based on its transform properties..
+	        lt.a = this._cx * this.scale._x;
+	        lt.b = this._sx * this.scale._x;
+	        lt.c = this._cy * this.scale._y;
+	        lt.d = this._sy * this.scale._y;
+
+	        lt.tx = this.position._x - ((this.pivot._x * lt.a) + (this.pivot._y * lt.c));
+	        lt.ty = this.position._y - ((this.pivot._x * lt.b) + (this.pivot._y * lt.d));
+	        this._currentLocalID = this._localID;
+
+	        // force an update..
+	        this._parentID = -1;
+	    }
+
+	    if (this._parentID !== parentTransform._worldID)
+	    {
+	        // concat the parent matrix with the objects transform.
+	        var pt = parentTransform.worldTransform;
+	        var wt = this.worldTransform;
+
+	        wt.a = (lt.a * pt.a) + (lt.b * pt.c);
+	        wt.b = (lt.a * pt.b) + (lt.b * pt.d);
+	        wt.c = (lt.c * pt.a) + (lt.d * pt.c);
+	        wt.d = (lt.c * pt.b) + (lt.d * pt.d);
+	        wt.tx = (lt.tx * pt.a) + (lt.ty * pt.c) + pt.tx;
+	        wt.ty = (lt.tx * pt.b) + (lt.ty * pt.d) + pt.ty;
+
+	        this._parentID = parentTransform._worldID;
+
+	        // update the id of the transform..
+	        this._worldID++;
+	    }
+	};
+
+	/**
+	 * Decomposes a matrix and sets the transforms properties based on it.
+	 *
+	 * @param {PIXI.Matrix} matrix - The matrix to decompose
+	 */
+	Transform.prototype.setFromMatrix = function setFromMatrix (matrix)
+	{
+	    matrix.decompose(this);
+	    this._localID++;
+	};
+
+	/**
+	 * The rotation of the object in radians.
+	 *
+	 * @member {number}
+	 */
+	prototypeAccessors$1$1.rotation.get = function ()
+	{
+	    return this._rotation;
+	};
+
+	prototypeAccessors$1$1.rotation.set = function (value) // eslint-disable-line require-jsdoc
+	{
+	    if (this._rotation !== value)
+	    {
+	        this._rotation = value;
+	        this.updateSkew();
+	    }
+	};
+
+	Object.defineProperties( Transform.prototype, prototypeAccessors$1$1 );
+
+	/**
+	 * A default (identity) transform
+	 *
+	 * @static
+	 * @constant
+	 * @member {PIXI.Transform}
+	 */
+	Transform.IDENTITY = new Transform();
+
+	/**
+	 * Size object, contains width and height
+	 *
+	 * @memberof PIXI
+	 * @typedef {object} ISize
+	 * @property {number} width - Width component
+	 * @property {number} height - Height component
+	 */
+
+	/**
+	 * Rectangle object is an area defined by its position, as indicated by its top-left corner
+	 * point (x, y) and by its width and its height.
+	 *
+	 * @class
+	 * @memberof PIXI
+	 */
+	var Rectangle = function Rectangle(x, y, width, height)
+	{
+	    if ( x === void 0 ) { x = 0; }
+	    if ( y === void 0 ) { y = 0; }
+	    if ( width === void 0 ) { width = 0; }
+	    if ( height === void 0 ) { height = 0; }
+
+	    /**
+	     * @member {number}
+	     * @default 0
+	     */
+	    this.x = Number(x);
+
+	    /**
+	     * @member {number}
+	     * @default 0
+	     */
+	    this.y = Number(y);
+
+	    /**
+	     * @member {number}
+	     * @default 0
+	     */
+	    this.width = Number(width);
+
+	    /**
+	     * @member {number}
+	     * @default 0
+	     */
+	    this.height = Number(height);
+
+	    /**
+	     * The type of the object, mainly used to avoid `instanceof` checks
+	     *
+	     * @member {number}
+	     * @readOnly
+	     * @default PIXI.SHAPES.RECT
+	     * @see PIXI.SHAPES
+	     */
+	    this.type = SHAPES.RECT;
+	};
+
+	var prototypeAccessors$2 = { left: { configurable: true },right: { configurable: true },top: { configurable: true },bottom: { configurable: true } };
+	var staticAccessors$1 = { EMPTY: { configurable: true } };
+
+	/**
+	 * returns the left edge of the rectangle
+	 *
+	 * @member {number}
+	 */
+	prototypeAccessors$2.left.get = function ()
+	{
+	    return this.x;
+	};
+
+	/**
+	 * returns the right edge of the rectangle
+	 *
+	 * @member {number}
+	 */
+	prototypeAccessors$2.right.get = function ()
+	{
+	    return this.x + this.width;
+	};
+
+	/**
+	 * returns the top edge of the rectangle
+	 *
+	 * @member {number}
+	 */
+	prototypeAccessors$2.top.get = function ()
+	{
+	    return this.y;
+	};
+
+	/**
+	 * returns the bottom edge of the rectangle
+	 *
+	 * @member {number}
+	 */
+	prototypeAccessors$2.bottom.get = function ()
+	{
+	    return this.y + this.height;
+	};
+
+	/**
+	 * A constant empty rectangle.
+	 *
+	 * @static
+	 * @constant
+	 * @member {PIXI.Rectangle}
+	 */
+	staticAccessors$1.EMPTY.get = function ()
+	{
+	    return new Rectangle(0, 0, 0, 0);
+	};
+
+	/**
+	 * Creates a clone of this Rectangle
+	 *
+	 * @return {PIXI.Rectangle} a copy of the rectangle
+	 */
+	Rectangle.prototype.clone = function clone ()
+	{
+	    return new Rectangle(this.x, this.y, this.width, this.height);
+	};
+
+	/**
+	 * Copies another rectangle to this one.
+	 *
+	 * @param {PIXI.Rectangle} rectangle - The rectangle to copy from.
+	 * @return {PIXI.Rectangle} Returns itself.
+	 */
+	Rectangle.prototype.copyFrom = function copyFrom (rectangle)
+	{
+	    this.x = rectangle.x;
+	    this.y = rectangle.y;
+	    this.width = rectangle.width;
+	    this.height = rectangle.height;
+
+	    return this;
+	};
+
+	/**
+	 * Copies this rectangle to another one.
+	 *
+	 * @param {PIXI.Rectangle} rectangle - The rectangle to copy to.
+	 * @return {PIXI.Rectangle} Returns given parameter.
+	 */
+	Rectangle.prototype.copyTo = function copyTo (rectangle)
+	{
+	    rectangle.x = this.x;
+	    rectangle.y = this.y;
+	    rectangle.width = this.width;
+	    rectangle.height = this.height;
+
+	    return rectangle;
+	};
+
+	/**
+	 * Checks whether the x and y coordinates given are contained within this Rectangle
+	 *
+	 * @param {number} x - The X coordinate of the point to test
+	 * @param {number} y - The Y coordinate of the point to test
+	 * @return {boolean} Whether the x/y coordinates are within this Rectangle
+	 */
+	Rectangle.prototype.contains = function contains (x, y)
+	{
+	    if (this.width <= 0 || this.height <= 0)
+	    {
+	        return false;
+	    }
+
+	    if (x >= this.x && x < this.x + this.width)
+	    {
+	        if (y >= this.y && y < this.y + this.height)
+	        {
+	            return true;
+	        }
+	    }
+
+	    return false;
+	};
+
+	/**
+	 * Pads the rectangle making it grow in all directions.
+	 *
+	 * @param {number} paddingX - The horizontal padding amount.
+	 * @param {number} paddingY - The vertical padding amount.
+	 */
+	Rectangle.prototype.pad = function pad (paddingX, paddingY)
+	{
+	    paddingX = paddingX || 0;
+	    paddingY = paddingY || ((paddingY !== 0) ? paddingX : 0);
+
+	    this.x -= paddingX;
+	    this.y -= paddingY;
+
+	    this.width += paddingX * 2;
+	    this.height += paddingY * 2;
+	};
+
+	/**
+	 * Fits this rectangle around the passed one.
+	 *
+	 * @param {PIXI.Rectangle} rectangle - The rectangle to fit.
+	 */
+	Rectangle.prototype.fit = function fit (rectangle)
+	{
+	    var x1 = Math.max(this.x, rectangle.x);
+	    var x2 = Math.min(this.x + this.width, rectangle.x + rectangle.width);
+	    var y1 = Math.max(this.y, rectangle.y);
+	    var y2 = Math.min(this.y + this.height, rectangle.y + rectangle.height);
+
+	    this.x = x1;
+	    this.width = Math.max(x2 - x1, 0);
+	    this.y = y1;
+	    this.height = Math.max(y2 - y1, 0);
+	};
+
+	/**
+	 * Enlarges rectangle that way its corners lie on grid
+	 *
+	 * @param {number} [resolution=1] resolution
+	 * @param {number} [eps=0.001] precision
+	 */
+	Rectangle.prototype.ceil = function ceil (resolution, eps)
+	{
+	        if ( resolution === void 0 ) { resolution = 1; }
+	        if ( eps === void 0 ) { eps = 0.001; }
+
+	    var x2 = Math.ceil((this.x + this.width - eps) * resolution) / resolution;
+	    var y2 = Math.ceil((this.y + this.height - eps) * resolution) / resolution;
+
+	    this.x = Math.floor((this.x + eps) * resolution) / resolution;
+	    this.y = Math.floor((this.y + eps) * resolution) / resolution;
+
+	    this.width = x2 - this.x;
+	    this.height = y2 - this.y;
+	};
+
+	/**
+	 * Enlarges this rectangle to include the passed rectangle.
+	 *
+	 * @param {PIXI.Rectangle} rectangle - The rectangle to include.
+	 */
+	Rectangle.prototype.enlarge = function enlarge (rectangle)
+	{
+	    var x1 = Math.min(this.x, rectangle.x);
+	    var x2 = Math.max(this.x + this.width, rectangle.x + rectangle.width);
+	    var y1 = Math.min(this.y, rectangle.y);
+	    var y2 = Math.max(this.y + this.height, rectangle.y + rectangle.height);
+
+	    this.x = x1;
+	    this.width = x2 - x1;
+	    this.y = y1;
+	    this.height = y2 - y1;
+	};
+
+	Object.defineProperties( Rectangle.prototype, prototypeAccessors$2 );
+	Object.defineProperties( Rectangle, staticAccessors$1 );
+
+	/**
+	 * The Circle object is used to help draw graphics and can also be used to specify a hit area for displayObjects.
+	 *
+	 * @class
+	 * @memberof PIXI
+	 */
+	var Circle = function Circle(x, y, radius)
+	{
+	    if ( x === void 0 ) { x = 0; }
+	    if ( y === void 0 ) { y = 0; }
+	    if ( radius === void 0 ) { radius = 0; }
+
+	    /**
+	     * @member {number}
+	     * @default 0
+	     */
+	    this.x = x;
+
+	    /**
+	     * @member {number}
+	     * @default 0
+	     */
+	    this.y = y;
+
+	    /**
+	     * @member {number}
+	     * @default 0
+	     */
+	    this.radius = radius;
+
+	    /**
+	     * The type of the object, mainly used to avoid `instanceof` checks
+	     *
+	     * @member {number}
+	     * @readOnly
+	     * @default PIXI.SHAPES.CIRC
+	     * @see PIXI.SHAPES
+	     */
+	    this.type = SHAPES.CIRC;
+	};
+
+	/**
+	 * Creates a clone of this Circle instance
+	 *
+	 * @return {PIXI.Circle} a copy of the Circle
+	 */
+	Circle.prototype.clone = function clone ()
+	{
+	    return new Circle(this.x, this.y, this.radius);
+	};
+
+	/**
+	 * Checks whether the x and y coordinates given are contained within this circle
+	 *
+	 * @param {number} x - The X coordinate of the point to test
+	 * @param {number} y - The Y coordinate of the point to test
+	 * @return {boolean} Whether the x/y coordinates are within this Circle
+	 */
+	Circle.prototype.contains = function contains (x, y)
+	{
+	    if (this.radius <= 0)
+	    {
+	        return false;
+	    }
+
+	    var r2 = this.radius * this.radius;
+	    var dx = (this.x - x);
+	    var dy = (this.y - y);
+
+	    dx *= dx;
+	    dy *= dy;
+
+	    return (dx + dy <= r2);
+	};
+
+	/**
+	* Returns the framing rectangle of the circle as a Rectangle object
+	*
+	* @return {PIXI.Rectangle} the framing rectangle
+	*/
+	Circle.prototype.getBounds = function getBounds ()
+	{
+	    return new Rectangle(this.x - this.radius, this.y - this.radius, this.radius * 2, this.radius * 2);
+	};
+
+	/**
+	 * The Ellipse object is used to help draw graphics and can also be used to specify a hit area for displayObjects.
+	 *
+	 * @class
+	 * @memberof PIXI
+	 */
+	var Ellipse = function Ellipse(x, y, halfWidth, halfHeight)
+	{
+	    if ( x === void 0 ) { x = 0; }
+	    if ( y === void 0 ) { y = 0; }
+	    if ( halfWidth === void 0 ) { halfWidth = 0; }
+	    if ( halfHeight === void 0 ) { halfHeight = 0; }
+
+	    /**
+	     * @member {number}
+	     * @default 0
+	     */
+	    this.x = x;
+
+	    /**
+	     * @member {number}
+	     * @default 0
+	     */
+	    this.y = y;
+
+	    /**
+	     * @member {number}
+	     * @default 0
+	     */
+	    this.width = halfWidth;
+
+	    /**
+	     * @member {number}
+	     * @default 0
+	     */
+	    this.height = halfHeight;
+
+	    /**
+	     * The type of the object, mainly used to avoid `instanceof` checks
+	     *
+	     * @member {number}
+	     * @readOnly
+	     * @default PIXI.SHAPES.ELIP
+	     * @see PIXI.SHAPES
+	     */
+	    this.type = SHAPES.ELIP;
+	};
+
+	/**
+	 * Creates a clone of this Ellipse instance
+	 *
+	 * @return {PIXI.Ellipse} a copy of the ellipse
+	 */
+	Ellipse.prototype.clone = function clone ()
+	{
+	    return new Ellipse(this.x, this.y, this.width, this.height);
+	};
+
+	/**
+	 * Checks whether the x and y coordinates given are contained within this ellipse
+	 *
+	 * @param {number} x - The X coordinate of the point to test
+	 * @param {number} y - The Y coordinate of the point to test
+	 * @return {boolean} Whether the x/y coords are within this ellipse
+	 */
+	Ellipse.prototype.contains = function contains (x, y)
+	{
+	    if (this.width <= 0 || this.height <= 0)
+	    {
+	        return false;
+	    }
+
+	    // normalize the coords to an ellipse with center 0,0
+	    var normx = ((x - this.x) / this.width);
+	    var normy = ((y - this.y) / this.height);
+
+	    normx *= normx;
+	    normy *= normy;
+
+	    return (normx + normy <= 1);
+	};
+
+	/**
+	 * Returns the framing rectangle of the ellipse as a Rectangle object
+	 *
+	 * @return {PIXI.Rectangle} the framing rectangle
+	 */
+	Ellipse.prototype.getBounds = function getBounds ()
+	{
+	    return new Rectangle(this.x - this.width, this.y - this.height, this.width, this.height);
+	};
+
+	/**
+	 * A class to define a shape via user defined co-orinates.
+	 *
+	 * @class
+	 * @memberof PIXI
+	 */
+	var Polygon = function Polygon()
+	{
+	    var arguments$1 = arguments;
+
+	    var points = [], len = arguments.length;
+	    while ( len-- ) { points[ len ] = arguments$1[ len ]; }
+
+	    if (Array.isArray(points[0]))
+	    {
+	        points = points[0];
+	    }
+
+	    // if this is an array of points, convert it to a flat array of numbers
+	    if (points[0] instanceof Point)
+	    {
+	        var p = [];
+
+	        for (var i = 0, il = points.length; i < il; i++)
+	        {
+	            p.push(points[i].x, points[i].y);
+	        }
+
+	        points = p;
+	    }
+
+	    /**
+	     * An array of the points of this polygon
+	     *
+	     * @member {number[]}
+	     */
+	    this.points = points;
+
+	    /**
+	     * The type of the object, mainly used to avoid `instanceof` checks
+	     *
+	     * @member {number}
+	     * @readOnly
+	     * @default PIXI.SHAPES.POLY
+	     * @see PIXI.SHAPES
+	     */
+	    this.type = SHAPES.POLY;
+
+	    /**
+	     * `false` after moveTo, `true` after `closePath`. In all other cases it is `true`.
+	     * @member {boolean}
+	     * @default true
+	     */
+	    this.closeStroke = true;
+	};
+
+	/**
+	 * Creates a clone of this polygon
+	 *
+	 * @return {PIXI.Polygon} a copy of the polygon
+	 */
+	Polygon.prototype.clone = function clone ()
+	{
+	    var polygon = new Polygon(this.points.slice());
+
+	    polygon.closeStroke = this.closeStroke;
+
+	    return polygon;
+	};
+
+	/**
+	 * Checks whether the x and y coordinates passed to this function are contained within this polygon
+	 *
+	 * @param {number} x - The X coordinate of the point to test
+	 * @param {number} y - The Y coordinate of the point to test
+	 * @return {boolean} Whether the x/y coordinates are within this polygon
+	 */
+	Polygon.prototype.contains = function contains (x, y)
+	{
+	    var inside = false;
+
+	    // use some raycasting to test hits
+	    // https://github.com/substack/point-in-polygon/blob/master/index.js
+	    var length = this.points.length / 2;
+
+	    for (var i = 0, j = length - 1; i < length; j = i++)
+	    {
+	        var xi = this.points[i * 2];
+	        var yi = this.points[(i * 2) + 1];
+	        var xj = this.points[j * 2];
+	        var yj = this.points[(j * 2) + 1];
+	        var intersect = ((yi > y) !== (yj > y)) && (x < ((xj - xi) * ((y - yi) / (yj - yi))) + xi);
+
+	        if (intersect)
+	        {
+	            inside = !inside;
+	        }
+	    }
+
+	    return inside;
+	};
+
+	/**
+	 * The Rounded Rectangle object is an area that has nice rounded corners, as indicated by its
+	 * top-left corner point (x, y) and by its width and its height and its radius.
+	 *
+	 * @class
+	 * @memberof PIXI
+	 */
+	var RoundedRectangle = function RoundedRectangle(x, y, width, height, radius)
+	{
+	    if ( x === void 0 ) { x = 0; }
+	    if ( y === void 0 ) { y = 0; }
+	    if ( width === void 0 ) { width = 0; }
+	    if ( height === void 0 ) { height = 0; }
+	    if ( radius === void 0 ) { radius = 20; }
+
+	    /**
+	     * @member {number}
+	     * @default 0
+	     */
+	    this.x = x;
+
+	    /**
+	     * @member {number}
+	     * @default 0
+	     */
+	    this.y = y;
+
+	    /**
+	     * @member {number}
+	     * @default 0
+	     */
+	    this.width = width;
+
+	    /**
+	     * @member {number}
+	     * @default 0
+	     */
+	    this.height = height;
+
+	    /**
+	     * @member {number}
+	     * @default 20
+	     */
+	    this.radius = radius;
+
+	    /**
+	     * The type of the object, mainly used to avoid `instanceof` checks
+	     *
+	     * @member {number}
+	     * @readonly
+	     * @default PIXI.SHAPES.RREC
+	     * @see PIXI.SHAPES
+	     */
+	    this.type = SHAPES.RREC;
+	};
+
+	/**
+	 * Creates a clone of this Rounded Rectangle
+	 *
+	 * @return {PIXI.RoundedRectangle} a copy of the rounded rectangle
+	 */
+	RoundedRectangle.prototype.clone = function clone ()
+	{
+	    return new RoundedRectangle(this.x, this.y, this.width, this.height, this.radius);
+	};
+
+	/**
+	 * Checks whether the x and y coordinates given are contained within this Rounded Rectangle
+	 *
+	 * @param {number} x - The X coordinate of the point to test
+	 * @param {number} y - The Y coordinate of the point to test
+	 * @return {boolean} Whether the x/y coordinates are within this Rounded Rectangle
+	 */
+	RoundedRectangle.prototype.contains = function contains (x, y)
+	{
+	    if (this.width <= 0 || this.height <= 0)
+	    {
+	        return false;
+	    }
+	    if (x >= this.x && x <= this.x + this.width)
+	    {
+	        if (y >= this.y && y <= this.y + this.height)
+	        {
+	            if ((y >= this.y + this.radius && y <= this.y + this.height - this.radius)
+	            || (x >= this.x + this.radius && x <= this.x + this.width - this.radius))
+	            {
+	                return true;
+	            }
+	            var dx = x - (this.x + this.radius);
+	            var dy = y - (this.y + this.radius);
+	            var radius2 = this.radius * this.radius;
+
+	            if ((dx * dx) + (dy * dy) <= radius2)
+	            {
+	                return true;
+	            }
+	            dx = x - (this.x + this.width - this.radius);
+	            if ((dx * dx) + (dy * dy) <= radius2)
+	            {
+	                return true;
+	            }
+	            dy = y - (this.y + this.height - this.radius);
+	            if ((dx * dx) + (dy * dy) <= radius2)
+	            {
+	                return true;
+	            }
+	            dx = x - (this.x + this.radius);
+	            if ((dx * dx) + (dy * dy) <= radius2)
+	            {
+	                return true;
+	            }
+	        }
+	    }
+
+	    return false;
+	};
+
+	/*!
+	 * @pixi/display - v5.1.3
+	 * Compiled Fri, 20 Sep 2019 17:22:13 UTC
+	 *
+	 * @pixi/display is licensed under the MIT License.
+	 * http://www.opensource.org/licenses/mit-license
+	 */
+
+	/**
+	 * Sets the default value for the container property 'sortableChildren'.
+	 * If set to true, the container will sort its children by zIndex value
+	 * when updateTransform() is called, or manually if sortChildren() is called.
+	 *
+	 * This actually changes the order of elements in the array, so should be treated
+	 * as a basic solution that is not performant compared to other solutions,
+	 * such as @link https://github.com/pixijs/pixi-display
+	 *
+	 * Also be aware of that this may not work nicely with the addChildAt() function,
+	 * as the zIndex sorting may cause the child to automatically sorted to another position.
+	 *
+	 * @static
+	 * @constant
+	 * @name SORTABLE_CHILDREN
+	 * @memberof PIXI.settings
+	 * @type {boolean}
+	 * @default false
+	 */
+	settings.SORTABLE_CHILDREN = false;
+
+	/**
+	 * 'Builder' pattern for bounds rectangles.
+	 *
+	 * This could be called an Axis-Aligned Bounding Box.
+	 * It is not an actual shape. It is a mutable thing; no 'EMPTY' or those kind of problems.
+	 *
+	 * @class
+	 * @memberof PIXI
+	 */
+	var Bounds = function Bounds()
+	{
+	    /**
+	     * @member {number}
+	     * @default 0
+	     */
+	    this.minX = Infinity;
+
+	    /**
+	     * @member {number}
+	     * @default 0
+	     */
+	    this.minY = Infinity;
+
+	    /**
+	     * @member {number}
+	     * @default 0
+	     */
+	    this.maxX = -Infinity;
+
+	    /**
+	     * @member {number}
+	     * @default 0
+	     */
+	    this.maxY = -Infinity;
+
+	    this.rect = null;
+	};
+
+	/**
+	 * Checks if bounds are empty.
+	 *
+	 * @return {boolean} True if empty.
+	 */
+	Bounds.prototype.isEmpty = function isEmpty ()
+	{
+	    return this.minX > this.maxX || this.minY > this.maxY;
+	};
+
+	/**
+	 * Clears the bounds and resets.
+	 *
+	 */
+	Bounds.prototype.clear = function clear ()
+	{
+	    this.updateID++;
+
+	    this.minX = Infinity;
+	    this.minY = Infinity;
+	    this.maxX = -Infinity;
+	    this.maxY = -Infinity;
+	};
+
+	/**
+	 * Can return Rectangle.EMPTY constant, either construct new rectangle, either use your rectangle
+	 * It is not guaranteed that it will return tempRect
+	 *
+	 * @param {PIXI.Rectangle} rect - temporary object will be used if AABB is not empty
+	 * @returns {PIXI.Rectangle} A rectangle of the bounds
+	 */
+	Bounds.prototype.getRectangle = function getRectangle (rect)
+	{
+	    if (this.minX > this.maxX || this.minY > this.maxY)
+	    {
+	        return Rectangle.EMPTY;
+	    }
+
+	    rect = rect || new Rectangle(0, 0, 1, 1);
+
+	    rect.x = this.minX;
+	    rect.y = this.minY;
+	    rect.width = this.maxX - this.minX;
+	    rect.height = this.maxY - this.minY;
+
+	    return rect;
+	};
+
+	/**
+	 * This function should be inlined when its possible.
+	 *
+	 * @param {PIXI.Point} point - The point to add.
+	 */
+	Bounds.prototype.addPoint = function addPoint (point)
+	{
+	    this.minX = Math.min(this.minX, point.x);
+	    this.maxX = Math.max(this.maxX, point.x);
+	    this.minY = Math.min(this.minY, point.y);
+	    this.maxY = Math.max(this.maxY, point.y);
+	};
+
+	/**
+	 * Adds a quad, not transformed
+	 *
+	 * @param {Float32Array} vertices - The verts to add.
+	 */
+	Bounds.prototype.addQuad = function addQuad (vertices)
+	{
+	    var minX = this.minX;
+	    var minY = this.minY;
+	    var maxX = this.maxX;
+	    var maxY = this.maxY;
+
+	    var x = vertices[0];
+	    var y = vertices[1];
+
+	    minX = x < minX ? x : minX;
+	    minY = y < minY ? y : minY;
+	    maxX = x > maxX ? x : maxX;
+	    maxY = y > maxY ? y : maxY;
+
+	    x = vertices[2];
+	    y = vertices[3];
+	    minX = x < minX ? x : minX;
+	    minY = y < minY ? y : minY;
+	    maxX = x > maxX ? x : maxX;
+	    maxY = y > maxY ? y : maxY;
+
+	    x = vertices[4];
+	    y = vertices[5];
+	    minX = x < minX ? x : minX;
+	    minY = y < minY ? y : minY;
+	    maxX = x > maxX ? x : maxX;
+	    maxY = y > maxY ? y : maxY;
+
+	    x = vertices[6];
+	    y = vertices[7];
+	    minX = x < minX ? x : minX;
+	    minY = y < minY ? y : minY;
+	    maxX = x > maxX ? x : maxX;
+	    maxY = y > maxY ? y : maxY;
+
+	    this.minX = minX;
+	    this.minY = minY;
+	    this.maxX = maxX;
+	    this.maxY = maxY;
+	};
+
+	/**
+	 * Adds sprite frame, transformed.
+	 *
+	 * @param {PIXI.Transform} transform - TODO
+	 * @param {number} x0 - TODO
+	 * @param {number} y0 - TODO
+	 * @param {number} x1 - TODO
+	 * @param {number} y1 - TODO
+	 */
+	Bounds.prototype.addFrame = function addFrame (transform, x0, y0, x1, y1)
+	{
+	    var matrix = transform.worldTransform;
+	    var a = matrix.a;
+	    var b = matrix.b;
+	    var c = matrix.c;
+	    var d = matrix.d;
+	    var tx = matrix.tx;
+	    var ty = matrix.ty;
+
+	    var minX = this.minX;
+	    var minY = this.minY;
+	    var maxX = this.maxX;
+	    var maxY = this.maxY;
+
+	    var x = (a * x0) + (c * y0) + tx;
+	    var y = (b * x0) + (d * y0) + ty;
+
+	    minX = x < minX ? x : minX;
+	    minY = y < minY ? y : minY;
+	    maxX = x > maxX ? x : maxX;
+	    maxY = y > maxY ? y : maxY;
+
+	    x = (a * x1) + (c * y0) + tx;
+	    y = (b * x1) + (d * y0) + ty;
+	    minX = x < minX ? x : minX;
+	    minY = y < minY ? y : minY;
+	    maxX = x > maxX ? x : maxX;
+	    maxY = y > maxY ? y : maxY;
+
+	    x = (a * x0) + (c * y1) + tx;
+	    y = (b * x0) + (d * y1) + ty;
+	    minX = x < minX ? x : minX;
+	    minY = y < minY ? y : minY;
+	    maxX = x > maxX ? x : maxX;
+	    maxY = y > maxY ? y : maxY;
+
+	    x = (a * x1) + (c * y1) + tx;
+	    y = (b * x1) + (d * y1) + ty;
+	    minX = x < minX ? x : minX;
+	    minY = y < minY ? y : minY;
+	    maxX = x > maxX ? x : maxX;
+	    maxY = y > maxY ? y : maxY;
+
+	    this.minX = minX;
+	    this.minY = minY;
+	    this.maxX = maxX;
+	    this.maxY = maxY;
+	};
+
+	/**
+	 * Adds screen vertices from array
+	 *
+	 * @param {Float32Array} vertexData - calculated vertices
+	 * @param {number} beginOffset - begin offset
+	 * @param {number} endOffset - end offset, excluded
+	 */
+	Bounds.prototype.addVertexData = function addVertexData (vertexData, beginOffset, endOffset)
+	{
+	    var minX = this.minX;
+	    var minY = this.minY;
+	    var maxX = this.maxX;
+	    var maxY = this.maxY;
+
+	    for (var i = beginOffset; i < endOffset; i += 2)
+	    {
+	        var x = vertexData[i];
+	        var y = vertexData[i + 1];
+
+	        minX = x < minX ? x : minX;
+	        minY = y < minY ? y : minY;
+	        maxX = x > maxX ? x : maxX;
+	        maxY = y > maxY ? y : maxY;
+	    }
+
+	    this.minX = minX;
+	    this.minY = minY;
+	    this.maxX = maxX;
+	    this.maxY = maxY;
+	};
+
+	/**
+	 * Add an array of mesh vertices
+	 *
+	 * @param {PIXI.Transform} transform - mesh transform
+	 * @param {Float32Array} vertices - mesh coordinates in array
+	 * @param {number} beginOffset - begin offset
+	 * @param {number} endOffset - end offset, excluded
+	 */
+	Bounds.prototype.addVertices = function addVertices (transform, vertices, beginOffset, endOffset)
+	{
+	    var matrix = transform.worldTransform;
+	    var a = matrix.a;
+	    var b = matrix.b;
+	    var c = matrix.c;
+	    var d = matrix.d;
+	    var tx = matrix.tx;
+	    var ty = matrix.ty;
+
+	    var minX = this.minX;
+	    var minY = this.minY;
+	    var maxX = this.maxX;
+	    var maxY = this.maxY;
+
+	    for (var i = beginOffset; i < endOffset; i += 2)
+	    {
+	        var rawX = vertices[i];
+	        var rawY = vertices[i + 1];
+	        var x = (a * rawX) + (c * rawY) + tx;
+	        var y = (d * rawY) + (b * rawX) + ty;
+
+	        minX = x < minX ? x : minX;
+	        minY = y < minY ? y : minY;
+	        maxX = x > maxX ? x : maxX;
+	        maxY = y > maxY ? y : maxY;
+	    }
+
+	    this.minX = minX;
+	    this.minY = minY;
+	    this.maxX = maxX;
+	    this.maxY = maxY;
+	};
+
+	/**
+	 * Adds other Bounds
+	 *
+	 * @param {PIXI.Bounds} bounds - TODO
+	 */
+	Bounds.prototype.addBounds = function addBounds (bounds)
+	{
+	    var minX = this.minX;
+	    var minY = this.minY;
+	    var maxX = this.maxX;
+	    var maxY = this.maxY;
+
+	    this.minX = bounds.minX < minX ? bounds.minX : minX;
+	    this.minY = bounds.minY < minY ? bounds.minY : minY;
+	    this.maxX = bounds.maxX > maxX ? bounds.maxX : maxX;
+	    this.maxY = bounds.maxY > maxY ? bounds.maxY : maxY;
+	};
+
+	/**
+	 * Adds other Bounds, masked with Bounds
+	 *
+	 * @param {PIXI.Bounds} bounds - TODO
+	 * @param {PIXI.Bounds} mask - TODO
+	 */
+	Bounds.prototype.addBoundsMask = function addBoundsMask (bounds, mask)
+	{
+	    var _minX = bounds.minX > mask.minX ? bounds.minX : mask.minX;
+	    var _minY = bounds.minY > mask.minY ? bounds.minY : mask.minY;
+	    var _maxX = bounds.maxX < mask.maxX ? bounds.maxX : mask.maxX;
+	    var _maxY = bounds.maxY < mask.maxY ? bounds.maxY : mask.maxY;
+
+	    if (_minX <= _maxX && _minY <= _maxY)
+	    {
+	        var minX = this.minX;
+	        var minY = this.minY;
+	        var maxX = this.maxX;
+	        var maxY = this.maxY;
+
+	        this.minX = _minX < minX ? _minX : minX;
+	        this.minY = _minY < minY ? _minY : minY;
+	        this.maxX = _maxX > maxX ? _maxX : maxX;
+	        this.maxY = _maxY > maxY ? _maxY : maxY;
+	    }
+	};
+
+	/**
+	 * Adds other Bounds, masked with Rectangle
+	 *
+	 * @param {PIXI.Bounds} bounds - TODO
+	 * @param {PIXI.Rectangle} area - TODO
+	 */
+	Bounds.prototype.addBoundsArea = function addBoundsArea (bounds, area)
+	{
+	    var _minX = bounds.minX > area.x ? bounds.minX : area.x;
+	    var _minY = bounds.minY > area.y ? bounds.minY : area.y;
+	    var _maxX = bounds.maxX < area.x + area.width ? bounds.maxX : (area.x + area.width);
+	    var _maxY = bounds.maxY < area.y + area.height ? bounds.maxY : (area.y + area.height);
+
+	    if (_minX <= _maxX && _minY <= _maxY)
+	    {
+	        var minX = this.minX;
+	        var minY = this.minY;
+	        var maxX = this.maxX;
+	        var maxY = this.maxY;
+
+	        this.minX = _minX < minX ? _minX : minX;
+	        this.minY = _minY < minY ? _minY : minY;
+	        this.maxX = _maxX > maxX ? _maxX : maxX;
+	        this.maxY = _maxY > maxY ? _maxY : maxY;
+	    }
+	};
+
+	// _tempDisplayObjectParent = new DisplayObject();
+
+	/**
+	 * The base class for all objects that are rendered on the screen.
+	 *
+	 * This is an abstract class and should not be used on its own; rather it should be extended.
+	 *
+	 * @class
+	 * @extends PIXI.utils.EventEmitter
+	 * @memberof PIXI
+	 */
+	var DisplayObject = /*@__PURE__*/(function (EventEmitter) {
+	    function DisplayObject()
+	    {
+	        EventEmitter.call(this);
+
+	        this.tempDisplayObjectParent = null;
+
+	        // TODO: need to create Transform from factory
+	        /**
+	         * World transform and local transform of this object.
+	         * This will become read-only later, please do not assign anything there unless you know what are you doing.
+	         *
+	         * @member {PIXI.Transform}
+	         */
+	        this.transform = new Transform();
+
+	        /**
+	         * The opacity of the object.
+	         *
+	         * @member {number}
+	         */
+	        this.alpha = 1;
+
+	        /**
+	         * The visibility of the object. If false the object will not be drawn, and
+	         * the updateTransform function will not be called.
+	         *
+	         * Only affects recursive calls from parent. You can ask for bounds or call updateTransform manually.
+	         *
+	         * @member {boolean}
+	         */
+	        this.visible = true;
+
+	        /**
+	         * Can this object be rendered, if false the object will not be drawn but the updateTransform
+	         * methods will still be called.
+	         *
+	         * Only affects recursive calls from parent. You can ask for bounds manually.
+	         *
+	         * @member {boolean}
+	         */
+	        this.renderable = true;
+
+	        /**
+	         * The display object container that contains this display object.
+	         *
+	         * @member {PIXI.Container}
+	         * @readonly
+	         */
+	        this.parent = null;
+
+	        /**
+	         * The multiplied alpha of the displayObject.
+	         *
+	         * @member {number}
+	         * @readonly
+	         */
+	        this.worldAlpha = 1;
+
+	        /**
+	         * Which index in the children array the display component was before the previous zIndex sort.
+	         * Used by containers to help sort objects with the same zIndex, by using previous array index as the decider.
+	         *
+	         * @member {number}
+	         * @protected
+	         */
+	        this._lastSortedIndex = 0;
+
+	        /**
+	         * The zIndex of the displayObject.
+	         * A higher value will mean it will be rendered on top of other displayObjects within the same container.
+	         *
+	         * @member {number}
+	         * @protected
+	         */
+	        this._zIndex = 0;
+
+	        /**
+	         * The area the filter is applied to. This is used as more of an optimization
+	         * rather than figuring out the dimensions of the displayObject each frame you can set this rectangle.
+	         *
+	         * Also works as an interaction mask.
+	         *
+	         * @member {?PIXI.Rectangle}
+	         */
+	        this.filterArea = null;
+
+	        /**
+	         * Sets the filters for the displayObject.
+	         * * IMPORTANT: This is a WebGL only feature and will be ignored by the canvas renderer.
+	         * To remove filters simply set this property to `'null'`.
+	         *
+	         * @member {?PIXI.Filter[]}
+	         */
+	        this.filters = null;
+	        this._enabledFilters = null;
+
+	        /**
+	         * The bounds object, this is used to calculate and store the bounds of the displayObject.
+	         *
+	         * @member {PIXI.Bounds}
+	         * @protected
+	         */
+	        this._bounds = new Bounds();
+	        this._boundsID = 0;
+	        this._lastBoundsID = -1;
+	        this._boundsRect = null;
+	        this._localBoundsRect = null;
+
+	        /**
+	         * The original, cached mask of the object.
+	         *
+	         * @member {PIXI.Graphics|PIXI.Sprite|null}
+	         * @protected
+	         */
+	        this._mask = null;
+
+	        /**
+	         * Fired when this DisplayObject is added to a Container.
+	         *
+	         * @event PIXI.DisplayObject#added
+	         * @param {PIXI.Container} container - The container added to.
+	         */
+
+	        /**
+	         * Fired when this DisplayObject is removed from a Container.
+	         *
+	         * @event PIXI.DisplayObject#removed
+	         * @param {PIXI.Container} container - The container removed from.
+	         */
+
+	        /**
+	         * If the object has been destroyed via destroy(). If true, it should not be used.
+	         *
+	         * @member {boolean}
+	         * @protected
+	         */
+	        this._destroyed = false;
+
+	        /**
+	         * used to fast check if a sprite is.. a sprite!
+	         * @member {boolean}
+	         */
+	        this.isSprite = false;
+	    }
+
+	    if ( EventEmitter ) { DisplayObject.__proto__ = EventEmitter; }
+	    DisplayObject.prototype = Object.create( EventEmitter && EventEmitter.prototype );
+	    DisplayObject.prototype.constructor = DisplayObject;
+
+	    var prototypeAccessors = { _tempDisplayObjectParent: { configurable: true },x: { configurable: true },y: { configurable: true },worldTransform: { configurable: true },localTransform: { configurable: true },position: { configurable: true },scale: { configurable: true },pivot: { configurable: true },skew: { configurable: true },rotation: { configurable: true },angle: { configurable: true },zIndex: { configurable: true },worldVisible: { configurable: true },mask: { configurable: true } };
+
+	    /**
+	     * @protected
+	     * @member {PIXI.DisplayObject}
+	     */
+	    DisplayObject.mixin = function mixin (source)
+	    {
+	        // in ES8/ES2017, this would be really easy:
+	        // Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
+
+	        // get all the enumerable property keys
+	        var keys = Object.keys(source);
+
+	        // loop through properties
+	        for (var i = 0; i < keys.length; ++i)
+	        {
+	            var propertyName = keys[i];
+
+	            // Set the property using the property descriptor - this works for accessors and normal value properties
+	            Object.defineProperty(
+	                DisplayObject.prototype,
+	                propertyName,
+	                Object.getOwnPropertyDescriptor(source, propertyName)
+	            );
+	        }
+	    };
+
+	    prototypeAccessors._tempDisplayObjectParent.get = function ()
+	    {
+	        if (this.tempDisplayObjectParent === null)
+	        {
+	            this.tempDisplayObjectParent = new DisplayObject();
+	        }
+
+	        return this.tempDisplayObjectParent;
+	    };
+
+	    /**
+	     * Updates the object transform for rendering.
+	     *
+	     * TODO - Optimization pass!
+	     */
+	    DisplayObject.prototype.updateTransform = function updateTransform ()
+	    {
+	        this.transform.updateTransform(this.parent.transform);
+	        // multiply the alphas..
+	        this.worldAlpha = this.alpha * this.parent.worldAlpha;
+
+	        this._bounds.updateID++;
+	    };
+
+	    /**
+	     * Recursively updates transform of all objects from the root to this one
+	     * internal function for toLocal()
+	     */
+	    DisplayObject.prototype._recursivePostUpdateTransform = function _recursivePostUpdateTransform ()
+	    {
+	        if (this.parent)
+	        {
+	            this.parent._recursivePostUpdateTransform();
+	            this.transform.updateTransform(this.parent.transform);
+	        }
+	        else
+	        {
+	            this.transform.updateTransform(this._tempDisplayObjectParent.transform);
+	        }
+	    };
+
+	    /**
+	     * Retrieves the bounds of the displayObject as a rectangle object.
+	     *
+	     * @param {boolean} [skipUpdate] - Setting to `true` will stop the transforms of the scene graph from
+	     *  being updated. This means the calculation returned MAY be out of date BUT will give you a
+	     *  nice performance boost.
+	     * @param {PIXI.Rectangle} [rect] - Optional rectangle to store the result of the bounds calculation.
+	     * @return {PIXI.Rectangle} The rectangular bounding area.
+	     */
+	    DisplayObject.prototype.getBounds = function getBounds (skipUpdate, rect)
+	    {
+	        if (!skipUpdate)
+	        {
+	            if (!this.parent)
+	            {
+	                this.parent = this._tempDisplayObjectParent;
+	                this.updateTransform();
+	                this.parent = null;
+	            }
+	            else
+	            {
+	                this._recursivePostUpdateTransform();
+	                this.updateTransform();
+	            }
+	        }
+
+	        if (this._boundsID !== this._lastBoundsID)
+	        {
+	            this.calculateBounds();
+	            this._lastBoundsID = this._boundsID;
+	        }
+
+	        if (!rect)
+	        {
+	            if (!this._boundsRect)
+	            {
+	                this._boundsRect = new Rectangle();
+	            }
+
+	            rect = this._boundsRect;
+	        }
+
+	        return this._bounds.getRectangle(rect);
+	    };
+
+	    /**
+	     * Retrieves the local bounds of the displayObject as a rectangle object.
+	     *
+	     * @param {PIXI.Rectangle} [rect] - Optional rectangle to store the result of the bounds calculation.
+	     * @return {PIXI.Rectangle} The rectangular bounding area.
+	     */
+	    DisplayObject.prototype.getLocalBounds = function getLocalBounds (rect)
+	    {
+	        var transformRef = this.transform;
+	        var parentRef = this.parent;
+
+	        this.parent = null;
+	        this.transform = this._tempDisplayObjectParent.transform;
+
+	        if (!rect)
+	        {
+	            if (!this._localBoundsRect)
+	            {
+	                this._localBoundsRect = new Rectangle();
+	            }
+
+	            rect = this._localBoundsRect;
+	        }
+
+	        var bounds = this.getBounds(false, rect);
+
+	        this.parent = parentRef;
+	        this.transform = transformRef;
+
+	        return bounds;
+	    };
+
+	    /**
+	     * Calculates the global position of the display object.
+	     *
+	     * @param {PIXI.IPoint} position - The world origin to calculate from.
+	     * @param {PIXI.IPoint} [point] - A Point object in which to store the value, optional
+	     *  (otherwise will create a new Point).
+	     * @param {boolean} [skipUpdate=false] - Should we skip the update transform.
+	     * @return {PIXI.IPoint} A point object representing the position of this object.
+	     */
+	    DisplayObject.prototype.toGlobal = function toGlobal (position, point, skipUpdate)
+	    {
+	        if ( skipUpdate === void 0 ) { skipUpdate = false; }
+
+	        if (!skipUpdate)
+	        {
+	            this._recursivePostUpdateTransform();
+
+	            // this parent check is for just in case the item is a root object.
+	            // If it is we need to give it a temporary parent so that displayObjectUpdateTransform works correctly
+	            // this is mainly to avoid a parent check in the main loop. Every little helps for performance :)
+	            if (!this.parent)
+	            {
+	                this.parent = this._tempDisplayObjectParent;
+	                this.displayObjectUpdateTransform();
+	                this.parent = null;
+	            }
+	            else
+	            {
+	                this.displayObjectUpdateTransform();
+	            }
+	        }
+
+	        // don't need to update the lot
+	        return this.worldTransform.apply(position, point);
+	    };
+
+	    /**
+	     * Calculates the local position of the display object relative to another point.
+	     *
+	     * @param {PIXI.IPoint} position - The world origin to calculate from.
+	     * @param {PIXI.DisplayObject} [from] - The DisplayObject to calculate the global position from.
+	     * @param {PIXI.IPoint} [point] - A Point object in which to store the value, optional
+	     *  (otherwise will create a new Point).
+	     * @param {boolean} [skipUpdate=false] - Should we skip the update transform
+	     * @return {PIXI.IPoint} A point object representing the position of this object
+	     */
+	    DisplayObject.prototype.toLocal = function toLocal (position, from, point, skipUpdate)
+	    {
+	        if (from)
+	        {
+	            position = from.toGlobal(position, point, skipUpdate);
+	        }
+
+	        if (!skipUpdate)
+	        {
+	            this._recursivePostUpdateTransform();
+
+	            // this parent check is for just in case the item is a root object.
+	            // If it is we need to give it a temporary parent so that displayObjectUpdateTransform works correctly
+	            // this is mainly to avoid a parent check in the main loop. Every little helps for performance :)
+	            if (!this.parent)
+	            {
+	                this.parent = this._tempDisplayObjectParent;
+	                this.displayObjectUpdateTransform();
+	                this.parent = null;
+	            }
+	            else
+	            {
+	                this.displayObjectUpdateTransform();
+	            }
+	        }
+
+	        // simply apply the matrix..
+	        return this.worldTransform.applyInverse(position, point);
+	    };
+
+	    /**
+	     * Renders the object using the WebGL renderer.
+	     *
+	     * @param {PIXI.Renderer} renderer - The renderer.
+	     */
+	    DisplayObject.prototype.render = function render (renderer) // eslint-disable-line no-unused-vars
+	    {
+	        // OVERWRITE;
+	    };
+
+	    /**
+	     * Set the parent Container of this DisplayObject.
+	     *
+	     * @param {PIXI.Container} container - The Container to add this DisplayObject to.
+	     * @return {PIXI.Container} The Container that this DisplayObject was added to.
+	     */
+	    DisplayObject.prototype.setParent = function setParent (container)
+	    {
+	        if (!container || !container.addChild)
+	        {
+	            throw new Error('setParent: Argument must be a Container');
+	        }
+
+	        container.addChild(this);
+
+	        return container;
+	    };
+
+	    /**
+	     * Convenience function to set the position, scale, skew and pivot at once.
+	     *
+	     * @param {number} [x=0] - The X position
+	     * @param {number} [y=0] - The Y position
+	     * @param {number} [scaleX=1] - The X scale value
+	     * @param {number} [scaleY=1] - The Y scale value
+	     * @param {number} [rotation=0] - The rotation
+	     * @param {number} [skewX=0] - The X skew value
+	     * @param {number} [skewY=0] - The Y skew value
+	     * @param {number} [pivotX=0] - The X pivot value
+	     * @param {number} [pivotY=0] - The Y pivot value
+	     * @return {PIXI.DisplayObject} The DisplayObject instance
+	     */
+	    DisplayObject.prototype.setTransform = function setTransform (x, y, scaleX, scaleY, rotation, skewX, skewY, pivotX, pivotY)
+	    {
+	        if ( x === void 0 ) { x = 0; }
+	        if ( y === void 0 ) { y = 0; }
+	        if ( scaleX === void 0 ) { scaleX = 1; }
+	        if ( scaleY === void 0 ) { scaleY = 1; }
+	        if ( rotation === void 0 ) { rotation = 0; }
+	        if ( skewX === void 0 ) { skewX = 0; }
+	        if ( skewY === void 0 ) { skewY = 0; }
+	        if ( pivotX === void 0 ) { pivotX = 0; }
+	        if ( pivotY === void 0 ) { pivotY = 0; }
+
+	        this.position.x = x;
+	        this.position.y = y;
+	        this.scale.x = !scaleX ? 1 : scaleX;
+	        this.scale.y = !scaleY ? 1 : scaleY;
+	        this.rotation = rotation;
+	        this.skew.x = skewX;
+	        this.skew.y = skewY;
+	        this.pivot.x = pivotX;
+	        this.pivot.y = pivotY;
+
+	        return this;
+	    };
+
+	    /**
+	     * Base destroy method for generic display objects. This will automatically
+	     * remove the display object from its parent Container as well as remove
+	     * all current event listeners and internal references. Do not use a DisplayObject
+	     * after calling `destroy()`.
+	     *
+	     */
+	    DisplayObject.prototype.destroy = function destroy ()
+	    {
+	        this.removeAllListeners();
+	        if (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 = false;
+	        this.interactiveChildren = false;
+
+	        this._destroyed = true;
+	    };
+
+	    /**
+	     * The position of the displayObject on the x axis relative to the local coordinates of the parent.
+	     * An alias to position.x
+	     *
+	     * @member {number}
+	     */
+	    prototypeAccessors.x.get = function ()
+	    {
+	        return this.position.x;
+	    };
+
+	    prototypeAccessors.x.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        this.transform.position.x = value;
+	    };
+
+	    /**
+	     * The position of the displayObject on the y axis relative to the local coordinates of the parent.
+	     * An alias to position.y
+	     *
+	     * @member {number}
+	     */
+	    prototypeAccessors.y.get = function ()
+	    {
+	        return this.position.y;
+	    };
+
+	    prototypeAccessors.y.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        this.transform.position.y = value;
+	    };
+
+	    /**
+	     * Current transform of the object based on world (parent) factors.
+	     *
+	     * @member {PIXI.Matrix}
+	     * @readonly
+	     */
+	    prototypeAccessors.worldTransform.get = function ()
+	    {
+	        return this.transform.worldTransform;
+	    };
+
+	    /**
+	     * Current transform of the object based on local factors: position, scale, other stuff.
+	     *
+	     * @member {PIXI.Matrix}
+	     * @readonly
+	     */
+	    prototypeAccessors.localTransform.get = function ()
+	    {
+	        return this.transform.localTransform;
+	    };
+
+	    /**
+	     * The coordinate of the object relative to the local coordinates of the parent.
+	     * Assignment by value since pixi-v4.
+	     *
+	     * @member {PIXI.IPoint}
+	     */
+	    prototypeAccessors.position.get = function ()
+	    {
+	        return this.transform.position;
+	    };
+
+	    prototypeAccessors.position.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        this.transform.position.copyFrom(value);
+	    };
+
+	    /**
+	     * The scale factor of the object.
+	     * Assignment by value since pixi-v4.
+	     *
+	     * @member {PIXI.IPoint}
+	     */
+	    prototypeAccessors.scale.get = function ()
+	    {
+	        return this.transform.scale;
+	    };
+
+	    prototypeAccessors.scale.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        this.transform.scale.copyFrom(value);
+	    };
+
+	    /**
+	     * The pivot point of the displayObject that it rotates around.
+	     * Assignment by value since pixi-v4.
+	     *
+	     * @member {PIXI.IPoint}
+	     */
+	    prototypeAccessors.pivot.get = function ()
+	    {
+	        return this.transform.pivot;
+	    };
+
+	    prototypeAccessors.pivot.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        this.transform.pivot.copyFrom(value);
+	    };
+
+	    /**
+	     * The skew factor for the object in radians.
+	     * Assignment by value since pixi-v4.
+	     *
+	     * @member {PIXI.ObservablePoint}
+	     */
+	    prototypeAccessors.skew.get = function ()
+	    {
+	        return this.transform.skew;
+	    };
+
+	    prototypeAccessors.skew.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        this.transform.skew.copyFrom(value);
+	    };
+
+	    /**
+	     * The rotation of the object in radians.
+	     * 'rotation' and 'angle' have the same effect on a display object; rotation is in radians, angle is in degrees.
+	     *
+	     * @member {number}
+	     */
+	    prototypeAccessors.rotation.get = function ()
+	    {
+	        return this.transform.rotation;
+	    };
+
+	    prototypeAccessors.rotation.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        this.transform.rotation = value;
+	    };
+
+	    /**
+	     * The angle of the object in degrees.
+	     * 'rotation' and 'angle' have the same effect on a display object; rotation is in radians, angle is in degrees.
+	     *
+	     * @member {number}
+	     */
+	    prototypeAccessors.angle.get = function ()
+	    {
+	        return this.transform.rotation * RAD_TO_DEG;
+	    };
+
+	    prototypeAccessors.angle.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        this.transform.rotation = value * DEG_TO_RAD;
+	    };
+
+	    /**
+	     * The zIndex of the displayObject.
+	     * If a container has the sortableChildren property set to true, children will be automatically
+	     * sorted by zIndex value; a higher value will mean it will be moved towards the end of the array,
+	     * and thus rendered on top of other displayObjects within the same container.
+	     *
+	     * @member {number}
+	     */
+	    prototypeAccessors.zIndex.get = function ()
+	    {
+	        return this._zIndex;
+	    };
+
+	    prototypeAccessors.zIndex.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        this._zIndex = value;
+	        if (this.parent)
+	        {
+	            this.parent.sortDirty = true;
+	        }
+	    };
+
+	    /**
+	     * Indicates if the object is globally visible.
+	     *
+	     * @member {boolean}
+	     * @readonly
+	     */
+	    prototypeAccessors.worldVisible.get = function ()
+	    {
+	        var item = this;
+
+	        do
+	        {
+	            if (!item.visible)
+	            {
+	                return false;
+	            }
+
+	            item = item.parent;
+	        } while (item);
+
+	        return true;
+	    };
+
+	    /**
+	     * Sets a mask for the displayObject. A mask is an object that limits the visibility of an
+	     * object to the shape of the mask applied to it. In PixiJS a regular mask must be a
+	     * {@link PIXI.Graphics} or a {@link PIXI.Sprite} object. This allows for much faster masking in canvas as it
+	     * utilities shape clipping. To remove a mask, set this property to `null`.
+	     *
+	     * For sprite mask both alpha and red channel are used. Black mask is the same as transparent mask.
+	     * @example
+	     * const graphics = new PIXI.Graphics();
+	     * graphics.beginFill(0xFF3300);
+	     * graphics.drawRect(50, 250, 100, 100);
+	     * graphics.endFill();
+	     *
+	     * const sprite = new PIXI.Sprite(texture);
+	     * sprite.mask = graphics;
+	     * @todo At the moment, PIXI.CanvasRenderer doesn't support PIXI.Sprite as mask.
+	     *
+	     * @member {PIXI.Graphics|PIXI.Sprite|null}
+	     */
+	    prototypeAccessors.mask.get = function ()
+	    {
+	        return this._mask;
+	    };
+
+	    prototypeAccessors.mask.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        if (this._mask)
+	        {
+	            this._mask.renderable = true;
+	            this._mask.isMask = false;
+	        }
+
+	        this._mask = value;
+
+	        if (this._mask)
+	        {
+	            this._mask.renderable = false;
+	            this._mask.isMask = true;
+	        }
+	    };
+
+	    Object.defineProperties( DisplayObject.prototype, prototypeAccessors );
+
+	    return DisplayObject;
+	}(eventemitter3));
+
+	/**
+	 * DisplayObject default updateTransform, does not update children of container.
+	 * Will crash if there's no parent element.
+	 *
+	 * @memberof PIXI.DisplayObject#
+	 * @function displayObjectUpdateTransform
+	 */
+	DisplayObject.prototype.displayObjectUpdateTransform = DisplayObject.prototype.updateTransform;
+
+	function sortChildren(a, b)
+	{
+	    if (a.zIndex === b.zIndex)
+	    {
+	        return a._lastSortedIndex - b._lastSortedIndex;
+	    }
+
+	    return a.zIndex - b.zIndex;
+	}
+
+	/**
+	 * A Container represents a collection of display objects.
+	 *
+	 * It is the base class of all display objects that act as a container for other objects (like Sprites).
+	 *
+	 *```js
+	 * let container = new PIXI.Container();
+	 * container.addChild(sprite);
+	 * ```
+	 *
+	 * @class
+	 * @extends PIXI.DisplayObject
+	 * @memberof PIXI
+	 */
+	var Container = /*@__PURE__*/(function (DisplayObject) {
+	    function Container()
+	    {
+	        DisplayObject.call(this);
+
+	        /**
+	         * The array of children of this container.
+	         *
+	         * @member {PIXI.DisplayObject[]}
+	         * @readonly
+	         */
+	        this.children = [];
+
+	        /**
+	         * If set to true, the container will sort its children by zIndex value
+	         * when updateTransform() is called, or manually if sortChildren() is called.
+	         *
+	         * This actually changes the order of elements in the array, so should be treated
+	         * as a basic solution that is not performant compared to other solutions,
+	         * such as @link https://github.com/pixijs/pixi-display
+	         *
+	         * Also be aware of that this may not work nicely with the addChildAt() function,
+	         * as the zIndex sorting may cause the child to automatically sorted to another position.
+	         *
+	         * @see PIXI.settings.SORTABLE_CHILDREN
+	         *
+	         * @member {boolean}
+	         */
+	        this.sortableChildren = settings.SORTABLE_CHILDREN;
+
+	        /**
+	         * Should children be sorted by zIndex at the next updateTransform call.
+	         * Will get automatically set to true if a new child is added, or if a child's zIndex changes.
+	         *
+	         * @member {boolean}
+	         */
+	        this.sortDirty = false;
+
+	        /**
+	         * Fired when a DisplayObject is added to this Container.
+	         *
+	         * @event PIXI.Container#childAdded
+	         * @param {PIXI.DisplayObject} child - The child added to the Container.
+	         * @param {PIXI.Container} container - The container that added the child.
+	         * @param {number} index - The children's index of the added child.
+	         */
+
+	        /**
+	         * Fired when a DisplayObject is removed from this Container.
+	         *
+	         * @event PIXI.DisplayObject#removedFrom
+	         * @param {PIXI.DisplayObject} child - The child removed from the Container.
+	         * @param {PIXI.Container} container - The container that removed removed the child.
+	         * @param {number} index - The former children's index of the removed child
+	         */
+	    }
+
+	    if ( DisplayObject ) { Container.__proto__ = DisplayObject; }
+	    Container.prototype = Object.create( DisplayObject && DisplayObject.prototype );
+	    Container.prototype.constructor = Container;
+
+	    var prototypeAccessors = { width: { configurable: true },height: { configurable: true } };
+
+	    /**
+	     * Overridable method that can be used by Container subclasses whenever the children array is modified
+	     *
+	     * @protected
+	     */
+	    Container.prototype.onChildrenChange = function onChildrenChange ()
+	    {
+	        /* empty */
+	    };
+
+	    /**
+	     * Adds one or more children to the container.
+	     *
+	     * Multiple items can be added like so: `myContainer.addChild(thingOne, thingTwo, thingThree)`
+	     *
+	     * @param {...PIXI.DisplayObject} child - The DisplayObject(s) to add to the container
+	     * @return {PIXI.DisplayObject} The first child that was added.
+	     */
+	    Container.prototype.addChild = function addChild (child)
+	    {
+	        var arguments$1 = arguments;
+
+	        var argumentsLength = arguments.length;
+
+	        // if there is only one argument we can bypass looping through the them
+	        if (argumentsLength > 1)
+	        {
+	            // loop through the arguments property and add all children
+	            // use it the right way (.length and [i]) so that this function can still be optimized by JS runtimes
+	            for (var i = 0; i < argumentsLength; i++)
+	            {
+	                this.addChild(arguments$1[i]);
+	            }
+	        }
+	        else
+	        {
+	            // if the child has a parent then lets remove it as PixiJS objects can only exist in one place
+	            if (child.parent)
+	            {
+	                child.parent.removeChild(child);
+	            }
+
+	            child.parent = this;
+	            this.sortDirty = true;
+
+	            // ensure child transform will be recalculated
+	            child.transform._parentID = -1;
+
+	            this.children.push(child);
+
+	            // ensure bounds will be recalculated
+	            this._boundsID++;
+
+	            // TODO - lets either do all callbacks or all events.. not both!
+	            this.onChildrenChange(this.children.length - 1);
+	            this.emit('childAdded', child, this, this.children.length - 1);
+	            child.emit('added', this);
+	        }
+
+	        return child;
+	    };
+
+	    /**
+	     * Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown
+	     *
+	     * @param {PIXI.DisplayObject} child - The child to add
+	     * @param {number} index - The index to place the child in
+	     * @return {PIXI.DisplayObject} The child that was added.
+	     */
+	    Container.prototype.addChildAt = function addChildAt (child, index)
+	    {
+	        if (index < 0 || index > this.children.length)
+	        {
+	            throw new Error((child + "addChildAt: The index " + index + " supplied is out of bounds " + (this.children.length)));
+	        }
+
+	        if (child.parent)
+	        {
+	            child.parent.removeChild(child);
+	        }
+
+	        child.parent = this;
+	        this.sortDirty = true;
+
+	        // ensure child transform will be recalculated
+	        child.transform._parentID = -1;
+
+	        this.children.splice(index, 0, child);
+
+	        // ensure bounds will be recalculated
+	        this._boundsID++;
+
+	        // TODO - lets either do all callbacks or all events.. not both!
+	        this.onChildrenChange(index);
+	        child.emit('added', this);
+	        this.emit('childAdded', child, this, index);
+
+	        return child;
+	    };
+
+	    /**
+	     * Swaps the position of 2 Display Objects within this container.
+	     *
+	     * @param {PIXI.DisplayObject} child - First display object to swap
+	     * @param {PIXI.DisplayObject} child2 - Second display object to swap
+	     */
+	    Container.prototype.swapChildren = function swapChildren (child, child2)
+	    {
+	        if (child === child2)
+	        {
+	            return;
+	        }
+
+	        var index1 = this.getChildIndex(child);
+	        var index2 = this.getChildIndex(child2);
+
+	        this.children[index1] = child2;
+	        this.children[index2] = child;
+	        this.onChildrenChange(index1 < index2 ? index1 : index2);
+	    };
+
+	    /**
+	     * Returns the index position of a child DisplayObject instance
+	     *
+	     * @param {PIXI.DisplayObject} child - The DisplayObject instance to identify
+	     * @return {number} The index position of the child display object to identify
+	     */
+	    Container.prototype.getChildIndex = function getChildIndex (child)
+	    {
+	        var index = this.children.indexOf(child);
+
+	        if (index === -1)
+	        {
+	            throw new Error('The supplied DisplayObject must be a child of the caller');
+	        }
+
+	        return index;
+	    };
+
+	    /**
+	     * Changes the position of an existing child in the display object container
+	     *
+	     * @param {PIXI.DisplayObject} child - The child DisplayObject instance for which you want to change the index number
+	     * @param {number} index - The resulting index number for the child display object
+	     */
+	    Container.prototype.setChildIndex = function setChildIndex (child, index)
+	    {
+	        if (index < 0 || index >= this.children.length)
+	        {
+	            throw new Error(("The index " + index + " supplied is out of bounds " + (this.children.length)));
+	        }
+
+	        var currentIndex = this.getChildIndex(child);
+
+	        removeItems(this.children, currentIndex, 1); // remove from old position
+	        this.children.splice(index, 0, child); // add at new position
+
+	        this.onChildrenChange(index);
+	    };
+
+	    /**
+	     * Returns the child at the specified index
+	     *
+	     * @param {number} index - The index to get the child at
+	     * @return {PIXI.DisplayObject} The child at the given index, if any.
+	     */
+	    Container.prototype.getChildAt = function getChildAt (index)
+	    {
+	        if (index < 0 || index >= this.children.length)
+	        {
+	            throw new Error(("getChildAt: Index (" + index + ") does not exist."));
+	        }
+
+	        return this.children[index];
+	    };
+
+	    /**
+	     * Removes one or more children from the container.
+	     *
+	     * @param {...PIXI.DisplayObject} child - The DisplayObject(s) to remove
+	     * @return {PIXI.DisplayObject} The first child that was removed.
+	     */
+	    Container.prototype.removeChild = function removeChild (child)
+	    {
+	        var arguments$1 = arguments;
+
+	        var argumentsLength = arguments.length;
+
+	        // if there is only one argument we can bypass looping through the them
+	        if (argumentsLength > 1)
+	        {
+	            // loop through the arguments property and add all children
+	            // use it the right way (.length and [i]) so that this function can still be optimized by JS runtimes
+	            for (var i = 0; i < argumentsLength; i++)
+	            {
+	                this.removeChild(arguments$1[i]);
+	            }
+	        }
+	        else
+	        {
+	            var index = this.children.indexOf(child);
+
+	            if (index === -1) { return null; }
+
+	            child.parent = null;
+	            // ensure child transform will be recalculated
+	            child.transform._parentID = -1;
+	            removeItems(this.children, index, 1);
+
+	            // ensure bounds will be recalculated
+	            this._boundsID++;
+
+	            // TODO - lets either do all callbacks or all events.. not both!
+	            this.onChildrenChange(index);
+	            child.emit('removed', this);
+	            this.emit('childRemoved', child, this, index);
+	        }
+
+	        return child;
+	    };
+
+	    /**
+	     * Removes a child from the specified index position.
+	     *
+	     * @param {number} index - The index to get the child from
+	     * @return {PIXI.DisplayObject} The child that was removed.
+	     */
+	    Container.prototype.removeChildAt = function removeChildAt (index)
+	    {
+	        var child = this.getChildAt(index);
+
+	        // ensure child transform will be recalculated..
+	        child.parent = null;
+	        child.transform._parentID = -1;
+	        removeItems(this.children, index, 1);
+
+	        // ensure bounds will be recalculated
+	        this._boundsID++;
+
+	        // TODO - lets either do all callbacks or all events.. not both!
+	        this.onChildrenChange(index);
+	        child.emit('removed', this);
+	        this.emit('childRemoved', child, this, index);
+
+	        return child;
+	    };
+
+	    /**
+	     * Removes all children from this container that are within the begin and end indexes.
+	     *
+	     * @param {number} [beginIndex=0] - The beginning position.
+	     * @param {number} [endIndex=this.children.length] - The ending position. Default value is size of the container.
+	     * @returns {PIXI.DisplayObject[]} List of removed children
+	     */
+	    Container.prototype.removeChildren = function removeChildren (beginIndex, endIndex)
+	    {
+	        if ( beginIndex === void 0 ) { beginIndex = 0; }
+
+	        var begin = beginIndex;
+	        var end = typeof endIndex === 'number' ? endIndex : this.children.length;
+	        var range = end - begin;
+	        var removed;
+
+	        if (range > 0 && range <= end)
+	        {
+	            removed = this.children.splice(begin, range);
+
+	            for (var i = 0; i < removed.length; ++i)
+	            {
+	                removed[i].parent = null;
+	                if (removed[i].transform)
+	                {
+	                    removed[i].transform._parentID = -1;
+	                }
+	            }
+
+	            this._boundsID++;
+
+	            this.onChildrenChange(beginIndex);
+
+	            for (var i$1 = 0; i$1 < removed.length; ++i$1)
+	            {
+	                removed[i$1].emit('removed', this);
+	                this.emit('childRemoved', removed[i$1], this, i$1);
+	            }
+
+	            return removed;
+	        }
+	        else if (range === 0 && this.children.length === 0)
+	        {
+	            return [];
+	        }
+
+	        throw new RangeError('removeChildren: numeric values are outside the acceptable range.');
+	    };
+
+	    /**
+	     * Sorts children by zIndex. Previous order is mantained for 2 children with the same zIndex.
+	     */
+	    Container.prototype.sortChildren = function sortChildren$1 ()
+	    {
+	        var sortRequired = false;
+
+	        for (var i = 0, j = this.children.length; i < j; ++i)
+	        {
+	            var child = this.children[i];
+
+	            child._lastSortedIndex = i;
+
+	            if (!sortRequired && child.zIndex !== 0)
+	            {
+	                sortRequired = true;
+	            }
+	        }
+
+	        if (sortRequired && this.children.length > 1)
+	        {
+	            this.children.sort(sortChildren);
+	        }
+
+	        this.sortDirty = false;
+	    };
+
+	    /**
+	     * Updates the transform on all children of this container for rendering
+	     */
+	    Container.prototype.updateTransform = function updateTransform ()
+	    {
+	        if (this.sortableChildren && this.sortDirty)
+	        {
+	            this.sortChildren();
+	        }
+
+	        this._boundsID++;
+
+	        this.transform.updateTransform(this.parent.transform);
+
+	        // TODO: check render flags, how to process stuff here
+	        this.worldAlpha = this.alpha * this.parent.worldAlpha;
+
+	        for (var i = 0, j = this.children.length; i < j; ++i)
+	        {
+	            var child = this.children[i];
+
+	            if (child.visible)
+	            {
+	                child.updateTransform();
+	            }
+	        }
+	    };
+
+	    /**
+	     * Recalculates the bounds of the container.
+	     *
+	     */
+	    Container.prototype.calculateBounds = function calculateBounds ()
+	    {
+	        this._bounds.clear();
+
+	        this._calculateBounds();
+
+	        for (var i = 0; i < this.children.length; i++)
+	        {
+	            var child = this.children[i];
+
+	            if (!child.visible || !child.renderable)
+	            {
+	                continue;
+	            }
+
+	            child.calculateBounds();
+
+	            // TODO: filter+mask, need to mask both somehow
+	            if (child._mask)
+	            {
+	                child._mask.calculateBounds();
+	                this._bounds.addBoundsMask(child._bounds, child._mask._bounds);
+	            }
+	            else if (child.filterArea)
+	            {
+	                this._bounds.addBoundsArea(child._bounds, child.filterArea);
+	            }
+	            else
+	            {
+	                this._bounds.addBounds(child._bounds);
+	            }
+	        }
+
+	        this._lastBoundsID = this._boundsID;
+	    };
+
+	    /**
+	     * Recalculates the bounds of the object. Override this to
+	     * calculate the bounds of the specific object (not including children).
+	     *
+	     * @protected
+	     */
+	    Container.prototype._calculateBounds = function _calculateBounds ()
+	    {
+	        // FILL IN//
+	    };
+
+	    /**
+	     * Renders the object using the WebGL renderer
+	     *
+	     * @param {PIXI.Renderer} renderer - The renderer
+	     */
+	    Container.prototype.render = function render (renderer)
+	    {
+	        // if the object is not visible or the alpha is 0 then no need to render this element
+	        if (!this.visible || this.worldAlpha <= 0 || !this.renderable)
+	        {
+	            return;
+	        }
+
+	        // do a quick check to see if this element has a mask or a filter.
+	        if (this._mask || (this.filters && this.filters.length))
+	        {
+	            this.renderAdvanced(renderer);
+	        }
+	        else
+	        {
+	            this._render(renderer);
+
+	            // simple render children!
+	            for (var i = 0, j = this.children.length; i < j; ++i)
+	            {
+	                this.children[i].render(renderer);
+	            }
+	        }
+	    };
+
+	    /**
+	     * Render the object using the WebGL renderer and advanced features.
+	     *
+	     * @protected
+	     * @param {PIXI.Renderer} renderer - The renderer
+	     */
+	    Container.prototype.renderAdvanced = function renderAdvanced (renderer)
+	    {
+	        renderer.batch.flush();
+
+	        var filters = this.filters;
+	        var mask = this._mask;
+
+	        // push filter first as we need to ensure the stencil buffer is correct for any masking
+	        if (filters)
+	        {
+	            if (!this._enabledFilters)
+	            {
+	                this._enabledFilters = [];
+	            }
+
+	            this._enabledFilters.length = 0;
+
+	            for (var i = 0; i < filters.length; i++)
+	            {
+	                if (filters[i].enabled)
+	                {
+	                    this._enabledFilters.push(filters[i]);
+	                }
+	            }
+
+	            if (this._enabledFilters.length)
+	            {
+	                renderer.filter.push(this, this._enabledFilters);
+	            }
+	        }
+
+	        if (mask)
+	        {
+	            renderer.mask.push(this, this._mask);
+	        }
+
+	        // add this object to the batch, only rendered if it has a texture.
+	        this._render(renderer);
+
+	        // now loop through the children and make sure they get rendered
+	        for (var i$1 = 0, j = this.children.length; i$1 < j; i$1++)
+	        {
+	            this.children[i$1].render(renderer);
+	        }
+
+	        renderer.batch.flush();
+
+	        if (mask)
+	        {
+	            renderer.mask.pop(this, this._mask);
+	        }
+
+	        if (filters && this._enabledFilters && this._enabledFilters.length)
+	        {
+	            renderer.filter.pop();
+	        }
+	    };
+
+	    /**
+	     * To be overridden by the subclasses.
+	     *
+	     * @protected
+	     * @param {PIXI.Renderer} renderer - The renderer
+	     */
+	    Container.prototype._render = function _render (renderer) // eslint-disable-line no-unused-vars
+	    {
+	        // this is where content itself gets rendered...
+	    };
+
+	    /**
+	     * Removes all internal references and listeners as well as removes children from the display list.
+	     * Do not use a Container after calling `destroy`.
+	     *
+	     * @param {object|boolean} [options] - Options parameter. A boolean will act as if all options
+	     *  have been set to that value
+	     * @param {boolean} [options.children=false] - if set to true, all the children will have their destroy
+	     *  method called as well. 'options' will be passed on to those calls.
+	     * @param {boolean} [options.texture=false] - Only used for child Sprites if options.children is set to true
+	     *  Should it destroy the texture of the child sprite
+	     * @param {boolean} [options.baseTexture=false] - Only used for child Sprites if options.children is set to true
+	     *  Should it destroy the base texture of the child sprite
+	     */
+	    Container.prototype.destroy = function destroy (options)
+	    {
+	        DisplayObject.prototype.destroy.call(this);
+
+	        this.sortDirty = false;
+
+	        var destroyChildren = typeof options === 'boolean' ? options : options && options.children;
+
+	        var oldChildren = this.removeChildren(0, this.children.length);
+
+	        if (destroyChildren)
+	        {
+	            for (var i = 0; i < oldChildren.length; ++i)
+	            {
+	                oldChildren[i].destroy(options);
+	            }
+	        }
+	    };
+
+	    /**
+	     * The width of the Container, setting this will actually modify the scale to achieve the value set
+	     *
+	     * @member {number}
+	     */
+	    prototypeAccessors.width.get = function ()
+	    {
+	        return this.scale.x * this.getLocalBounds().width;
+	    };
+
+	    prototypeAccessors.width.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        var width = this.getLocalBounds().width;
+
+	        if (width !== 0)
+	        {
+	            this.scale.x = value / width;
+	        }
+	        else
+	        {
+	            this.scale.x = 1;
+	        }
+
+	        this._width = value;
+	    };
+
+	    /**
+	     * The height of the Container, setting this will actually modify the scale to achieve the value set
+	     *
+	     * @member {number}
+	     */
+	    prototypeAccessors.height.get = function ()
+	    {
+	        return this.scale.y * this.getLocalBounds().height;
+	    };
+
+	    prototypeAccessors.height.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        var height = this.getLocalBounds().height;
+
+	        if (height !== 0)
+	        {
+	            this.scale.y = value / height;
+	        }
+	        else
+	        {
+	            this.scale.y = 1;
+	        }
+
+	        this._height = value;
+	    };
+
+	    Object.defineProperties( Container.prototype, prototypeAccessors );
+
+	    return Container;
+	}(DisplayObject));
+
+	// performance increase to avoid using call.. (10x faster)
+	Container.prototype.containerUpdateTransform = Container.prototype.updateTransform;
+
+	/*!
+	 * @pixi/accessibility - v5.1.4
+	 * Compiled Fri, 20 Sep 2019 17:22:13 UTC
+	 *
+	 * @pixi/accessibility is licensed under the MIT License.
+	 * http://www.opensource.org/licenses/mit-license
+	 */
+
+	/**
+	 * Default property values of accessible objects
+	 * used by {@link PIXI.accessibility.AccessibilityManager}.
+	 *
+	 * @private
+	 * @function accessibleTarget
+	 * @memberof PIXI.accessibility
+	 * @type {Object}
+	 * @example
+	 *      function MyObject() {}
+	 *
+	 *      Object.assign(
+	 *          MyObject.prototype,
+	 *          PIXI.accessibility.accessibleTarget
+	 *      );
+	 */
+	var accessibleTarget = {
+	    /**
+	     *  Flag for if the object is accessible. If true AccessibilityManager will overlay a
+	     *   shadow div with attributes set
+	     *
+	     * @member {boolean}
+	     * @memberof PIXI.DisplayObject#
+	     */
+	    accessible: false,
+
+	    /**
+	     * Sets the title attribute of the shadow div
+	     * If accessibleTitle AND accessibleHint has not been this will default to 'displayObject [tabIndex]'
+	     *
+	     * @member {?string}
+	     * @memberof PIXI.DisplayObject#
+	     */
+	    accessibleTitle: null,
+
+	    /**
+	     * Sets the aria-label attribute of the shadow div
+	     *
+	     * @member {string}
+	     * @memberof PIXI.DisplayObject#
+	     */
+	    accessibleHint: null,
+
+	    /**
+	     * @member {number}
+	     * @memberof PIXI.DisplayObject#
+	     * @private
+	     * @todo Needs docs.
+	     */
+	    tabIndex: 0,
+
+	    /**
+	     * @member {boolean}
+	     * @memberof PIXI.DisplayObject#
+	     * @todo Needs docs.
+	     */
+	    _accessibleActive: false,
+
+	    /**
+	     * @member {boolean}
+	     * @memberof PIXI.DisplayObject#
+	     * @todo Needs docs.
+	     */
+	    _accessibleDiv: false,
+	};
+
+	// add some extra variables to the container..
+	DisplayObject.mixin(accessibleTarget);
+
+	var KEY_CODE_TAB = 9;
+
+	var DIV_TOUCH_SIZE = 100;
+	var DIV_TOUCH_POS_X = 0;
+	var DIV_TOUCH_POS_Y = 0;
+	var DIV_TOUCH_ZINDEX = 2;
+
+	var DIV_HOOK_SIZE = 1;
+	var DIV_HOOK_POS_X = -1000;
+	var DIV_HOOK_POS_Y = -1000;
+	var DIV_HOOK_ZINDEX = 2;
+
+	/**
+	 * The Accessibility manager recreates the ability to tab and have content read by screen readers.
+	 * This is very important as it can possibly help people with disabilities access PixiJS content.
+	 *
+	 * A DisplayObject can be made accessible just like it can be made interactive. This manager will map the
+	 * events as if the mouse was being used, minimizing the effort required to implement.
+	 *
+	 * An instance of this class is automatically created by default, and can be found at `renderer.plugins.accessibility`
+	 *
+	 * @class
+	 * @memberof PIXI.accessibility
+	 */
+	var AccessibilityManager = function AccessibilityManager(renderer)
+	{
+	    /**
+	     * @type {?HTMLElement}
+	     * @private
+	     */
+	    this._hookDiv = null;
+	    if (isMobile_min.tablet || isMobile_min.phone)
+	    {
+	        this.createTouchHook();
+	    }
+
+	    // first we create a div that will sit over the PixiJS element. This is where the div overlays will go.
+	    var div = document.createElement('div');
+
+	    div.style.width = DIV_TOUCH_SIZE + "px";
+	    div.style.height = DIV_TOUCH_SIZE + "px";
+	    div.style.position = 'absolute';
+	    div.style.top = DIV_TOUCH_POS_X + "px";
+	    div.style.left = DIV_TOUCH_POS_Y + "px";
+	    div.style.zIndex = DIV_TOUCH_ZINDEX;
+
+	    /**
+	     * This is the dom element that will sit over the PixiJS element. This is where the div overlays will go.
+	     *
+	     * @type {HTMLElement}
+	     * @private
+	     */
+	    this.div = div;
+
+	    /**
+	     * A simple pool for storing divs.
+	     *
+	     * @type {*}
+	     * @private
+	     */
+	    this.pool = [];
+
+	    /**
+	     * This is a tick used to check if an object is no longer being rendered.
+	     *
+	     * @type {Number}
+	     * @private
+	     */
+	    this.renderId = 0;
+
+	    /**
+	     * Setting this to true will visually show the divs.
+	     *
+	     * @type {boolean}
+	     */
+	    this.debug = false;
+
+	    /**
+	     * The renderer this accessibility manager works for.
+	     *
+	     * @member {PIXI.AbstractRenderer}
+	     */
+	    this.renderer = renderer;
+
+	    /**
+	     * The array of currently active accessible items.
+	     *
+	     * @member {Array<*>}
+	     * @private
+	     */
+	    this.children = [];
+
+	    /**
+	     * pre-bind the functions
+	     *
+	     * @type {Function}
+	     * @private
+	     */
+	    this._onKeyDown = this._onKeyDown.bind(this);
+
+	    /**
+	     * pre-bind the functions
+	     *
+	     * @type {Function}
+	     * @private
+	     */
+	    this._onMouseMove = this._onMouseMove.bind(this);
+
+	    /**
+	     * A flag
+	     * @type {boolean}
+	     * @readonly
+	     */
+	    this.isActive = false;
+
+	    /**
+	     * A flag
+	     * @type {boolean}
+	     * @readonly
+	     */
+	    this.isMobileAccessibility = false;
+
+	    // let listen for tab.. once pressed we can fire up and show the accessibility layer
+	    window.addEventListener('keydown', this._onKeyDown, false);
+	};
+
+	/**
+	 * Creates the touch hooks.
+	 *
+	 * @private
+	 */
+	AccessibilityManager.prototype.createTouchHook = function createTouchHook ()
+	{
+	        var this$1 = this;
+
+	    var hookDiv = document.createElement('button');
+
+	    hookDiv.style.width = DIV_HOOK_SIZE + "px";
+	    hookDiv.style.height = DIV_HOOK_SIZE + "px";
+	    hookDiv.style.position = 'absolute';
+	    hookDiv.style.top = DIV_HOOK_POS_X + "px";
+	    hookDiv.style.left = DIV_HOOK_POS_Y + "px";
+	    hookDiv.style.zIndex = DIV_HOOK_ZINDEX;
+	    hookDiv.style.backgroundColor = '#FF0000';
+	    hookDiv.title = 'HOOK DIV';
+
+	    hookDiv.addEventListener('focus', function () {
+	        this$1.isMobileAccessibility = true;
+	        this$1.activate();
+	        this$1.destroyTouchHook();
+	    });
+
+	    document.body.appendChild(hookDiv);
+	    this._hookDiv = hookDiv;
+	};
+
+	/**
+	 * Destroys the touch hooks.
+	 *
+	 * @private
+	 */
+	AccessibilityManager.prototype.destroyTouchHook = function destroyTouchHook ()
+	{
+	    if (!this._hookDiv)
+	    {
+	        return;
+	    }
+	    document.body.removeChild(this._hookDiv);
+	    this._hookDiv = null;
+	};
+
+	/**
+	 * Activating will cause the Accessibility layer to be shown.
+	 * This is called when a user presses the tab key.
+	 *
+	 * @private
+	 */
+	AccessibilityManager.prototype.activate = function activate ()
+	{
+	    if (this.isActive)
+	    {
+	        return;
+	    }
+
+	    this.isActive = true;
+
+	    window.document.addEventListener('mousemove', this._onMouseMove, true);
+	    window.removeEventListener('keydown', this._onKeyDown, false);
+
+	    this.renderer.on('postrender', this.update, this);
+
+	    if (this.renderer.view.parentNode)
+	    {
+	        this.renderer.view.parentNode.appendChild(this.div);
+	    }
+	};
+
+	/**
+	 * Deactivating will cause the Accessibility layer to be hidden.
+	 * This is called when a user moves the mouse.
+	 *
+	 * @private
+	 */
+	AccessibilityManager.prototype.deactivate = function deactivate ()
+	{
+	    if (!this.isActive || this.isMobileAccessibility)
+	    {
+	        return;
+	    }
+
+	    this.isActive = false;
+
+	    window.document.removeEventListener('mousemove', this._onMouseMove, true);
+	    window.addEventListener('keydown', this._onKeyDown, false);
+
+	    this.renderer.off('postrender', this.update);
+
+	    if (this.div.parentNode)
+	    {
+	        this.div.parentNode.removeChild(this.div);
+	    }
+	};
+
+	/**
+	 * This recursive function will run through the scene graph and add any new accessible objects to the DOM layer.
+	 *
+	 * @private
+	 * @param {PIXI.Container} displayObject - The DisplayObject to check.
+	 */
+	AccessibilityManager.prototype.updateAccessibleObjects = function updateAccessibleObjects (displayObject)
+	{
+	    if (!displayObject.visible)
+	    {
+	        return;
+	    }
+
+	    if (displayObject.accessible && displayObject.interactive)
+	    {
+	        if (!displayObject._accessibleActive)
+	        {
+	            this.addChild(displayObject);
+	        }
+
+	        displayObject.renderId = this.renderId;
+	    }
+
+	    var children = displayObject.children;
+
+	    for (var i = 0; i < children.length; i++)
+	    {
+	        this.updateAccessibleObjects(children[i]);
+	    }
+	};
+
+	/**
+	 * Before each render this function will ensure that all divs are mapped correctly to their DisplayObjects.
+	 *
+	 * @private
+	 */
+	AccessibilityManager.prototype.update = function update ()
+	{
+	    if (!this.renderer.renderingToScreen)
+	    {
+	        return;
+	    }
+
+	    // update children...
+	    this.updateAccessibleObjects(this.renderer._lastObjectRendered);
+
+	    var rect = this.renderer.view.getBoundingClientRect();
+	    var sx = rect.width / this.renderer.width;
+	    var sy = rect.height / this.renderer.height;
+
+	    var div = this.div;
+
+	    div.style.left = (rect.left) + "px";
+	    div.style.top = (rect.top) + "px";
+	    div.style.width = (this.renderer.width) + "px";
+	    div.style.height = (this.renderer.height) + "px";
+
+	    for (var i = 0; i < this.children.length; i++)
+	    {
+	        var child = this.children[i];
+
+	        if (child.renderId !== this.renderId)
+	        {
+	            child._accessibleActive = false;
+
+	            removeItems(this.children, i, 1);
+	            this.div.removeChild(child._accessibleDiv);
+	            this.pool.push(child._accessibleDiv);
+	            child._accessibleDiv = null;
+
+	            i--;
+
+	            if (this.children.length === 0)
+	            {
+	                this.deactivate();
+	            }
+	        }
+	        else
+	        {
+	            // map div to display..
+	            div = child._accessibleDiv;
+	            var hitArea = child.hitArea;
+	            var wt = child.worldTransform;
+
+	            if (child.hitArea)
+	            {
+	                div.style.left = ((wt.tx + (hitArea.x * wt.a)) * sx) + "px";
+	                div.style.top = ((wt.ty + (hitArea.y * wt.d)) * sy) + "px";
+
+	                div.style.width = (hitArea.width * wt.a * sx) + "px";
+	                div.style.height = (hitArea.height * wt.d * sy) + "px";
+	            }
+	            else
+	            {
+	                hitArea = child.getBounds();
+
+	                this.capHitArea(hitArea);
+
+	                div.style.left = (hitArea.x * sx) + "px";
+	                div.style.top = (hitArea.y * sy) + "px";
+
+	                div.style.width = (hitArea.width * sx) + "px";
+	                div.style.height = (hitArea.height * sy) + "px";
+
+	                // update button titles and hints if they exist and they've changed
+	                if (div.title !== child.accessibleTitle && child.accessibleTitle !== null)
+	                {
+	                    div.title = child.accessibleTitle;
+	                }
+	                if (div.getAttribute('aria-label') !== child.accessibleHint
+	                    && child.accessibleHint !== null)
+	                {
+	                    div.setAttribute('aria-label', child.accessibleHint);
+	                }
+	            }
+	        }
+	    }
+
+	    // increment the render id..
+	    this.renderId++;
+	};
+
+	/**
+	 * Adjust the hit area based on the bounds of a display object
+	 *
+	 * @param {PIXI.Rectangle} hitArea - Bounds of the child
+	 */
+	AccessibilityManager.prototype.capHitArea = function capHitArea (hitArea)
+	{
+	    if (hitArea.x < 0)
+	    {
+	        hitArea.width += hitArea.x;
+	        hitArea.x = 0;
+	    }
+
+	    if (hitArea.y < 0)
+	    {
+	        hitArea.height += hitArea.y;
+	        hitArea.y = 0;
+	    }
+
+	    if (hitArea.x + hitArea.width > this.renderer.width)
+	    {
+	        hitArea.width = this.renderer.width - hitArea.x;
+	    }
+
+	    if (hitArea.y + hitArea.height > this.renderer.height)
+	    {
+	        hitArea.height = this.renderer.height - hitArea.y;
+	    }
+	};
+
+	/**
+	 * Adds a DisplayObject to the accessibility manager
+	 *
+	 * @private
+	 * @param {PIXI.DisplayObject} displayObject - The child to make accessible.
+	 */
+	AccessibilityManager.prototype.addChild = function addChild (displayObject)
+	{
+	    //this.activate();
+
+	    var div = this.pool.pop();
+
+	    if (!div)
+	    {
+	        div = document.createElement('button');
+
+	        div.style.width = DIV_TOUCH_SIZE + "px";
+	        div.style.height = DIV_TOUCH_SIZE + "px";
+	        div.style.backgroundColor = this.debug ? 'rgba(255,0,0,0.5)' : 'transparent';
+	        div.style.position = 'absolute';
+	        div.style.zIndex = DIV_TOUCH_ZINDEX;
+	        div.style.borderStyle = 'none';
+
+	        // ARIA attributes ensure that button title and hint updates are announced properly
+	        if (navigator.userAgent.toLowerCase().indexOf('chrome') > -1)
+	        {
+	            // Chrome doesn't need aria-live to work as intended; in fact it just gets more confused.
+	            div.setAttribute('aria-live', 'off');
+	        }
+	        else
+	        {
+	            div.setAttribute('aria-live', 'polite');
+	        }
+
+	        if (navigator.userAgent.match(/rv:.*Gecko\//))
+	        {
+	            // FireFox needs this to announce only the new button name
+	            div.setAttribute('aria-relevant', 'additions');
+	        }
+	        else
+	        {
+	            // required by IE, other browsers don't much care
+	            div.setAttribute('aria-relevant', 'text');
+	        }
+
+	        div.addEventListener('click', this._onClick.bind(this));
+	        div.addEventListener('focus', this._onFocus.bind(this));
+	        div.addEventListener('focusout', this._onFocusOut.bind(this));
+	    }
+
+	    if (displayObject.accessibleTitle && displayObject.accessibleTitle !== null)
+	    {
+	        div.title = displayObject.accessibleTitle;
+	    }
+	    else if (!displayObject.accessibleHint
+	             || displayObject.accessibleHint === null)
+	    {
+	        div.title = "displayObject " + (displayObject.tabIndex);
+	    }
+
+	    if (displayObject.accessibleHint
+	        && displayObject.accessibleHint !== null)
+	    {
+	        div.setAttribute('aria-label', displayObject.accessibleHint);
+	    }
+
+	    //
+
+	    displayObject._accessibleActive = true;
+	    displayObject._accessibleDiv = div;
+	    div.displayObject = displayObject;
+
+	    this.children.push(displayObject);
+	    this.div.appendChild(displayObject._accessibleDiv);
+	    displayObject._accessibleDiv.tabIndex = displayObject.tabIndex;
+	};
+
+	/**
+	 * Maps the div button press to pixi's InteractionManager (click)
+	 *
+	 * @private
+	 * @param {MouseEvent} e - The click event.
+	 */
+	AccessibilityManager.prototype._onClick = function _onClick (e)
+	{
+	    var interactionManager = this.renderer.plugins.interaction;
+
+	    interactionManager.dispatchEvent(e.target.displayObject, 'click', interactionManager.eventData);
+	    interactionManager.dispatchEvent(e.target.displayObject, 'pointertap', interactionManager.eventData);
+	    interactionManager.dispatchEvent(e.target.displayObject, 'tap', interactionManager.eventData);
+	};
+
+	/**
+	 * Maps the div focus events to pixi's InteractionManager (mouseover)
+	 *
+	 * @private
+	 * @param {FocusEvent} e - The focus event.
+	 */
+	AccessibilityManager.prototype._onFocus = function _onFocus (e)
+	{
+	    if (!e.target.getAttribute('aria-live', 'off'))
+	    {
+	        e.target.setAttribute('aria-live', 'assertive');
+	    }
+	    var interactionManager = this.renderer.plugins.interaction;
+
+	    interactionManager.dispatchEvent(e.target.displayObject, 'mouseover', interactionManager.eventData);
+	};
+
+	/**
+	 * Maps the div focus events to pixi's InteractionManager (mouseout)
+	 *
+	 * @private
+	 * @param {FocusEvent} e - The focusout event.
+	 */
+	AccessibilityManager.prototype._onFocusOut = function _onFocusOut (e)
+	{
+	    if (!e.target.getAttribute('aria-live', 'off'))
+	    {
+	        e.target.setAttribute('aria-live', 'polite');
+	    }
+	    var interactionManager = this.renderer.plugins.interaction;
+
+	    interactionManager.dispatchEvent(e.target.displayObject, 'mouseout', interactionManager.eventData);
+	};
+
+	/**
+	 * Is called when a key is pressed
+	 *
+	 * @private
+	 * @param {KeyboardEvent} e - The keydown event.
+	 */
+	AccessibilityManager.prototype._onKeyDown = function _onKeyDown (e)
+	{
+	    if (e.keyCode !== KEY_CODE_TAB)
+	    {
+	        return;
+	    }
+
+	    this.activate();
+	};
+
+	/**
+	 * Is called when the mouse moves across the renderer element
+	 *
+	 * @private
+	 * @param {MouseEvent} e - The mouse event.
+	 */
+	AccessibilityManager.prototype._onMouseMove = function _onMouseMove (e)
+	{
+	    if (e.movementX === 0 && e.movementY === 0)
+	    {
+	        return;
+	    }
+
+	    this.deactivate();
+	};
+
+	/**
+	 * Destroys the accessibility manager
+	 *
+	 */
+	AccessibilityManager.prototype.destroy = function destroy ()
+	{
+	    this.destroyTouchHook();
+	    this.div = null;
+
+	    for (var i = 0; i < this.children.length; i++)
+	    {
+	        this.children[i].div = null;
+	    }
+
+	    window.document.removeEventListener('mousemove', this._onMouseMove, true);
+	    window.removeEventListener('keydown', this._onKeyDown);
+
+	    this.pool = null;
+	    this.children = null;
+	    this.renderer = null;
+	};
+
+	var accessibility_es = ({
+		AccessibilityManager: AccessibilityManager,
+		accessibleTarget: accessibleTarget
+	});
+
+	/*!
+	 * @pixi/runner - v5.1.1
+	 * Compiled Fri, 20 Sep 2019 17:22:13 UTC
+	 *
+	 * @pixi/runner is licensed under the MIT License.
+	 * http://www.opensource.org/licenses/mit-license
+	 */
+	/**
+	 * A Runner is a highly performant and simple alternative to signals. Best used in situations
+	 * where events are dispatched to many objects at high frequency (say every frame!)
+	 *
+	 *
+	 * like a signal..
+	 * ```
+	 * const myObject = {
+	 *     loaded: new PIXI.Runner('loaded')
+	 * }
+	 *
+	 * const listener = {
+	 *     loaded: function(){
+	 *         // thin
+	 *     }
+	 * }
+	 *
+	 * myObject.update.add(listener);
+	 *
+	 * myObject.loaded.emit();
+	 * ```
+	 *
+	 * Or for handling calling the same function on many items
+	 * ```
+	 * const myGame = {
+	 *     update: new PIXI.Runner('update')
+	 * }
+	 *
+	 * const gameObject = {
+	 *     update: function(time){
+	 *         // update my gamey state
+	 *     }
+	 * }
+	 *
+	 * myGame.update.add(gameObject1);
+	 *
+	 * myGame.update.emit(time);
+	 * ```
+	 * @class
+	 * @memberof PIXI
+	 */
+	var Runner = function Runner(name)
+	{
+	    this.items = [];
+	    this._name = name;
+	    this._aliasCount = 0;
+	};
+
+	var prototypeAccessors$3 = { empty: { configurable: true },name: { configurable: true } };
+
+	/**
+	 * Dispatch/Broadcast Runner to all listeners added to the queue.
+	 * @param {...any} params - optional parameters to pass to each listener
+	 */
+	Runner.prototype.emit = function emit (a0, a1, a2, a3, a4, a5, a6, a7)
+	{
+	    if (arguments.length > 8)
+	    {
+	        throw new Error('max arguments reached');
+	    }
+
+	    var ref = this;
+	        var name = ref.name;
+	        var items = ref.items;
+
+	    this._aliasCount++;
+
+	    for (var i = 0, len = items.length; i < len; i++)
+	    {
+	        items[i][name](a0, a1, a2, a3, a4, a5, a6, a7);
+	    }
+
+	    if (items === this.items)
+	    {
+	        this._aliasCount--;
+	    }
+
+	    return this;
+	};
+
+	Runner.prototype.ensureNonAliasedItems = function ensureNonAliasedItems ()
+	{
+	    if (this._aliasCount > 0 && this.items.length > 1)
+	    {
+	        this._aliasCount = 0;
+	        this.items = this.items.slice(0);
+	    }
+	};
+
+	/**
+	 * Add a listener to the Runner
+	 *
+	 * Runners do not need to have scope or functions passed to them.
+	 * All that is required is to pass the listening object and ensure that it has contains a function that has the same name
+	 * as the name provided to the Runner when it was created.
+	 *
+	 * Eg A listener passed to this Runner will require a 'complete' function.
+	 *
+	 * ```
+	 * const complete = new PIXI.Runner('complete');
+	 * ```
+	 *
+	 * The scope used will be the object itself.
+	 *
+	 * @param {any} item - The object that will be listening.
+	 */
+	Runner.prototype.add = function add (item)
+	{
+	    if (item[this._name])
+	    {
+	        this.ensureNonAliasedItems();
+	        this.remove(item);
+	        this.items.push(item);
+	    }
+
+	    return this;
+	};
+
+	/**
+	 * Remove a single listener from the dispatch queue.
+	 * @param {any} item - The listenr that you would like to remove.
+	 */
+	Runner.prototype.remove = function remove (item)
+	{
+	    var index = this.items.indexOf(item);
+
+	    if (index !== -1)
+	    {
+	        this.ensureNonAliasedItems();
+	        this.items.splice(index, 1);
+	    }
+
+	    return this;
+	};
+
+	/**
+	 * Check to see if the listener is already in the Runner
+	 * @param {any} item - The listener that you would like to check.
+	 */
+	Runner.prototype.contains = function contains (item)
+	{
+	    return this.items.indexOf(item) !== -1;
+	};
+
+	/**
+	 * Remove all listeners from the Runner
+	 */
+	Runner.prototype.removeAll = function removeAll ()
+	{
+	    this.ensureNonAliasedItems();
+	    this.items.length = 0;
+
+	    return this;
+	};
+
+	/**
+	 * Remove all references, don't use after this.
+	 */
+	Runner.prototype.destroy = function destroy ()
+	{
+	    this.removeAll();
+	    this.items = null;
+	    this._name = null;
+	};
+
+	/**
+	 * `true` if there are no this Runner contains no listeners
+	 *
+	 * @member {boolean}
+	 * @readonly
+	 */
+	prototypeAccessors$3.empty.get = function ()
+	{
+	    return this.items.length === 0;
+	};
+
+	/**
+	 * The name of the runner.
+	 *
+	 * @member {string}
+	 * @readonly
+	 */
+	prototypeAccessors$3.name.get = function ()
+	{
+	    return this._name;
+	};
+
+	Object.defineProperties( Runner.prototype, prototypeAccessors$3 );
+
+	/**
+	 * Alias for `emit`
+	 * @memberof PIXI.Runner#
+	 * @method dispatch
+	 * @see PIXI.Runner#emit
+	 */
+	Runner.prototype.dispatch = Runner.prototype.emit;
+
+	/**
+	 * Alias for `emit`
+	 * @memberof PIXI.Runner#
+	 * @method run
+	 * @see PIXI.Runner#emit
+	 */
+	Runner.prototype.run = Runner.prototype.emit;
+
+	/*!
+	 * @pixi/ticker - v5.1.3
+	 * Compiled Fri, 20 Sep 2019 17:22:13 UTC
+	 *
+	 * @pixi/ticker is licensed under the MIT License.
+	 * http://www.opensource.org/licenses/mit-license
+	 */
+
+	/**
+	 * Target frames per millisecond.
+	 *
+	 * @static
+	 * @name TARGET_FPMS
+	 * @memberof PIXI.settings
+	 * @type {number}
+	 * @default 0.06
+	 */
+	settings.TARGET_FPMS = 0.06;
+
+	/**
+	 * Represents the update priorities used by internal PIXI classes when registered with
+	 * the {@link PIXI.Ticker} object. Higher priority items are updated first and lower
+	 * priority items, such as render, should go later.
+	 *
+	 * @static
+	 * @constant
+	 * @name UPDATE_PRIORITY
+	 * @memberof PIXI
+	 * @type {object}
+	 * @property {number} INTERACTION=50 Highest priority, used for {@link PIXI.interaction.InteractionManager}
+	 * @property {number} HIGH=25 High priority updating, {@link PIXI.VideoBaseTexture} and {@link PIXI.AnimatedSprite}
+	 * @property {number} NORMAL=0 Default priority for ticker events, see {@link PIXI.Ticker#add}.
+	 * @property {number} LOW=-25 Low priority used for {@link PIXI.Application} rendering.
+	 * @property {number} UTILITY=-50 Lowest priority used for {@link PIXI.prepare.BasePrepare} utility.
+	 */
+	var UPDATE_PRIORITY = {
+	    INTERACTION: 50,
+	    HIGH: 25,
+	    NORMAL: 0,
+	    LOW: -25,
+	    UTILITY: -50,
+	};
+
+	/**
+	 * Internal class for handling the priority sorting of ticker handlers.
+	 *
+	 * @private
+	 * @class
+	 * @memberof PIXI
+	 */
+	var TickerListener = function TickerListener(fn, context, priority, once)
+	{
+	    if ( context === void 0 ) { context = null; }
+	    if ( priority === void 0 ) { priority = 0; }
+	    if ( once === void 0 ) { once = false; }
+
+	    /**
+	     * The handler function to execute.
+	     * @private
+	     * @member {Function}
+	     */
+	    this.fn = fn;
+
+	    /**
+	     * The calling to execute.
+	     * @private
+	     * @member {*}
+	     */
+	    this.context = context;
+
+	    /**
+	     * The current priority.
+	     * @private
+	     * @member {number}
+	     */
+	    this.priority = priority;
+
+	    /**
+	     * If this should only execute once.
+	     * @private
+	     * @member {boolean}
+	     */
+	    this.once = once;
+
+	    /**
+	     * The next item in chain.
+	     * @private
+	     * @member {TickerListener}
+	     */
+	    this.next = null;
+
+	    /**
+	     * The previous item in chain.
+	     * @private
+	     * @member {TickerListener}
+	     */
+	    this.previous = null;
+
+	    /**
+	     * `true` if this listener has been destroyed already.
+	     * @member {boolean}
+	     * @private
+	     */
+	    this._destroyed = false;
+	};
+
+	/**
+	 * Simple compare function to figure out if a function and context match.
+	 * @private
+	 * @param {Function} fn - The listener function to be added for one update
+	 * @param {Function} context - The listener context
+	 * @return {boolean} `true` if the listener match the arguments
+	 */
+	TickerListener.prototype.match = function match (fn, context)
+	{
+	    context = context || null;
+
+	    return this.fn === fn && this.context === context;
+	};
+
+	/**
+	 * Emit by calling the current function.
+	 * @private
+	 * @param {number} deltaTime - time since the last emit.
+	 * @return {TickerListener} Next ticker
+	 */
+	TickerListener.prototype.emit = function emit (deltaTime)
+	{
+	    if (this.fn)
+	    {
+	        if (this.context)
+	        {
+	            this.fn.call(this.context, deltaTime);
+	        }
+	        else
+	        {
+	            this.fn(deltaTime);
+	        }
+	    }
+
+	    var redirect = this.next;
+
+	    if (this.once)
+	    {
+	        this.destroy(true);
+	    }
+
+	    // Soft-destroying should remove
+	    // the next reference
+	    if (this._destroyed)
+	    {
+	        this.next = null;
+	    }
+
+	    return redirect;
+	};
+
+	/**
+	 * Connect to the list.
+	 * @private
+	 * @param {TickerListener} previous - Input node, previous listener
+	 */
+	TickerListener.prototype.connect = function connect (previous)
+	{
+	    this.previous = previous;
+	    if (previous.next)
+	    {
+	        previous.next.previous = this;
+	    }
+	    this.next = previous.next;
+	    previous.next = this;
+	};
+
+	/**
+	 * Destroy and don't use after this.
+	 * @private
+	 * @param {boolean} [hard = false] `true` to remove the `next` reference, this
+	 *    is considered a hard destroy. Soft destroy maintains the next reference.
+	 * @return {TickerListener} The listener to redirect while emitting or removing.
+	 */
+	TickerListener.prototype.destroy = function destroy (hard)
+	{
+	        if ( hard === void 0 ) { hard = false; }
+
+	    this._destroyed = true;
+	    this.fn = null;
+	    this.context = null;
+
+	    // Disconnect, hook up next and previous
+	    if (this.previous)
+	    {
+	        this.previous.next = this.next;
+	    }
+
+	    if (this.next)
+	    {
+	        this.next.previous = this.previous;
+	    }
+
+	    // Redirect to the next item
+	    var redirect = this.next;
+
+	    // Remove references
+	    this.next = hard ? null : redirect;
+	    this.previous = null;
+
+	    return redirect;
+	};
+
+	/**
+	 * A Ticker class that runs an update loop that other objects listen to.
+	 *
+	 * This class is composed around listeners meant for execution on the next requested animation frame.
+	 * Animation frames are requested only when necessary, e.g. When the ticker is started and the emitter has listeners.
+	 *
+	 * @class
+	 * @memberof PIXI
+	 */
+	var Ticker = function Ticker()
+	{
+	    var this$1 = this;
+
+	    /**
+	     * The first listener. All new listeners added are chained on this.
+	     * @private
+	     * @type {TickerListener}
+	     */
+	    this._head = new TickerListener(null, null, Infinity);
+
+	    /**
+	     * Internal current frame request ID
+	     * @type {?number}
+	     * @private
+	     */
+	    this._requestId = null;
+
+	    /**
+	     * Internal value managed by minFPS property setter and getter.
+	     * This is the maximum allowed milliseconds between updates.
+	     * @type {number}
+	     * @private
+	     */
+	    this._maxElapsedMS = 100;
+
+	    /**
+	     * Internal value managed by maxFPS property setter and getter.
+	     * This is the minimum allowed milliseconds between updates.
+	     * @private
+	     */
+	    this._minElapsedMS = 0;
+
+	    /**
+	     * Whether or not this ticker should invoke the method
+	     * {@link PIXI.Ticker#start} automatically
+	     * when a listener is added.
+	     *
+	     * @member {boolean}
+	     * @default false
+	     */
+	    this.autoStart = false;
+
+	    /**
+	     * Scalar time value from last frame to this frame.
+	     * This value is capped by setting {@link PIXI.Ticker#minFPS}
+	     * and is scaled with {@link PIXI.Ticker#speed}.
+	     * **Note:** The cap may be exceeded by scaling.
+	     *
+	     * @member {number}
+	     * @default 1
+	     */
+	    this.deltaTime = 1;
+
+	    /**
+	     * Scaler time elapsed in milliseconds from last frame to this frame.
+	     * This value is capped by setting {@link PIXI.Ticker#minFPS}
+	     * and is scaled with {@link PIXI.Ticker#speed}.
+	     * **Note:** The cap may be exceeded by scaling.
+	     * If the platform supports DOMHighResTimeStamp,
+	     * this value will have a precision of 1 µs.
+	     * Defaults to target frame time
+	     *
+	     * @member {number}
+	     * @default 16.66
+	     */
+	    this.deltaMS = 1 / settings.TARGET_FPMS;
+
+	    /**
+	     * Time elapsed in milliseconds from last frame to this frame.
+	     * Opposed to what the scalar {@link PIXI.Ticker#deltaTime}
+	     * is based, this value is neither capped nor scaled.
+	     * If the platform supports DOMHighResTimeStamp,
+	     * this value will have a precision of 1 µs.
+	     * Defaults to target frame time
+	     *
+	     * @member {number}
+	     * @default 16.66
+	     */
+	    this.elapsedMS = 1 / settings.TARGET_FPMS;
+
+	    /**
+	     * The last time {@link PIXI.Ticker#update} was invoked.
+	     * This value is also reset internally outside of invoking
+	     * update, but only when a new animation frame is requested.
+	     * If the platform supports DOMHighResTimeStamp,
+	     * this value will have a precision of 1 µs.
+	     *
+	     * @member {number}
+	     * @default -1
+	     */
+	    this.lastTime = -1;
+
+	    /**
+	     * Factor of current {@link PIXI.Ticker#deltaTime}.
+	     * @example
+	     * // Scales ticker.deltaTime to what would be
+	     * // the equivalent of approximately 120 FPS
+	     * ticker.speed = 2;
+	     *
+	     * @member {number}
+	     * @default 1
+	     */
+	    this.speed = 1;
+
+	    /**
+	     * Whether or not this ticker has been started.
+	     * `true` if {@link PIXI.Ticker#start} has been called.
+	     * `false` if {@link PIXI.Ticker#stop} has been called.
+	     * While `false`, this value may change to `true` in the
+	     * event of {@link PIXI.Ticker#autoStart} being `true`
+	     * and a listener is added.
+	     *
+	     * @member {boolean}
+	     * @default false
+	     */
+	    this.started = false;
+
+	    /**
+	     * If enabled, deleting is disabled.
+	     * @member {boolean}
+	     * @default false
+	     * @private
+	     */
+	    this._protected = false;
+
+	    /**
+	     * The last time keyframe was executed.
+	     * Maintains a relatively fixed interval with the previous value.
+	     * @member {number}
+	     * @default -1
+	     * @private
+	     */
+	    this._lastFrame = -1;
+
+	    /**
+	     * Internal tick method bound to ticker instance.
+	     * This is because in early 2015, Function.bind
+	     * is still 60% slower in high performance scenarios.
+	     * Also separating frame requests from update method
+	     * so listeners may be called at any time and with
+	     * any animation API, just invoke ticker.update(time).
+	     *
+	     * @private
+	     * @param {number} time - Time since last tick.
+	     */
+	    this._tick = function (time) {
+	        this$1._requestId = null;
+
+	        if (this$1.started)
+	        {
+	            // Invoke listeners now
+	            this$1.update(time);
+	            // Listener side effects may have modified ticker state.
+	            if (this$1.started && this$1._requestId === null && this$1._head.next)
+	            {
+	                this$1._requestId = requestAnimationFrame(this$1._tick);
+	            }
+	        }
+	    };
+	};
+
+	var prototypeAccessors$4 = { FPS: { configurable: true },minFPS: { configurable: true },maxFPS: { configurable: true } };
+	var staticAccessors$2 = { shared: { configurable: true },system: { configurable: true } };
+
+	/**
+	 * Conditionally requests a new animation frame.
+	 * If a frame has not already been requested, and if the internal
+	 * emitter has listeners, a new frame is requested.
+	 *
+	 * @private
+	 */
+	Ticker.prototype._requestIfNeeded = function _requestIfNeeded ()
+	{
+	    if (this._requestId === null && this._head.next)
+	    {
+	        // ensure callbacks get correct delta
+	        this.lastTime = performance.now();
+	        this._lastFrame = this.lastTime;
+	        this._requestId = requestAnimationFrame(this._tick);
+	    }
+	};
+
+	/**
+	 * Conditionally cancels a pending animation frame.
+	 *
+	 * @private
+	 */
+	Ticker.prototype._cancelIfNeeded = function _cancelIfNeeded ()
+	{
+	    if (this._requestId !== null)
+	    {
+	        cancelAnimationFrame(this._requestId);
+	        this._requestId = null;
+	    }
+	};
+
+	/**
+	 * Conditionally requests a new animation frame.
+	 * If the ticker has been started it checks if a frame has not already
+	 * been requested, and if the internal emitter has listeners. If these
+	 * conditions are met, a new frame is requested. If the ticker has not
+	 * been started, but autoStart is `true`, then the ticker starts now,
+	 * and continues with the previous conditions to request a new frame.
+	 *
+	 * @private
+	 */
+	Ticker.prototype._startIfPossible = function _startIfPossible ()
+	{
+	    if (this.started)
+	    {
+	        this._requestIfNeeded();
+	    }
+	    else if (this.autoStart)
+	    {
+	        this.start();
+	    }
+	};
+
+	/**
+	 * Register a handler for tick events. Calls continuously unless
+	 * it is removed or the ticker is stopped.
+	 *
+	 * @param {Function} fn - The listener function to be added for updates
+	 * @param {*} [context] - The listener context
+	 * @param {number} [priority=PIXI.UPDATE_PRIORITY.NORMAL] - The priority for emitting
+	 * @returns {PIXI.Ticker} This instance of a ticker
+	 */
+	Ticker.prototype.add = function add (fn, context, priority)
+	{
+	        if ( priority === void 0 ) { priority = UPDATE_PRIORITY.NORMAL; }
+
+	    return this._addListener(new TickerListener(fn, context, priority));
+	};
+
+	/**
+	 * Add a handler for the tick event which is only execute once.
+	 *
+	 * @param {Function} fn - The listener function to be added for one update
+	 * @param {*} [context] - The listener context
+	 * @param {number} [priority=PIXI.UPDATE_PRIORITY.NORMAL] - The priority for emitting
+	 * @returns {PIXI.Ticker} This instance of a ticker
+	 */
+	Ticker.prototype.addOnce = function addOnce (fn, context, priority)
+	{
+	        if ( priority === void 0 ) { priority = UPDATE_PRIORITY.NORMAL; }
+
+	    return this._addListener(new TickerListener(fn, context, priority, true));
+	};
+
+	/**
+	 * Internally adds the event handler so that it can be sorted by priority.
+	 * Priority allows certain handler (user, AnimatedSprite, Interaction) to be run
+	 * before the rendering.
+	 *
+	 * @private
+	 * @param {TickerListener} listener - Current listener being added.
+	 * @returns {PIXI.Ticker} This instance of a ticker
+	 */
+	Ticker.prototype._addListener = function _addListener (listener)
+	{
+	    // For attaching to head
+	    var current = this._head.next;
+	    var previous = this._head;
+
+	    // Add the first item
+	    if (!current)
+	    {
+	        listener.connect(previous);
+	    }
+	    else
+	    {
+	        // Go from highest to lowest priority
+	        while (current)
+	        {
+	            if (listener.priority > current.priority)
+	            {
+	                listener.connect(previous);
+	                break;
+	            }
+	            previous = current;
+	            current = current.next;
+	        }
+
+	        // Not yet connected
+	        if (!listener.previous)
+	        {
+	            listener.connect(previous);
+	        }
+	    }
+
+	    this._startIfPossible();
+
+	    return this;
+	};
+
+	/**
+	 * Removes any handlers matching the function and context parameters.
+	 * If no handlers are left after removing, then it cancels the animation frame.
+	 *
+	 * @param {Function} fn - The listener function to be removed
+	 * @param {*} [context] - The listener context to be removed
+	 * @returns {PIXI.Ticker} This instance of a ticker
+	 */
+	Ticker.prototype.remove = function remove (fn, context)
+	{
+	    var listener = this._head.next;
+
+	    while (listener)
+	    {
+	        // We found a match, lets remove it
+	        // no break to delete all possible matches
+	        // incase a listener was added 2+ times
+	        if (listener.match(fn, context))
+	        {
+	            listener = listener.destroy();
+	        }
+	        else
+	        {
+	            listener = listener.next;
+	        }
+	    }
+
+	    if (!this._head.next)
+	    {
+	        this._cancelIfNeeded();
+	    }
+
+	    return this;
+	};
+
+	/**
+	 * Starts the ticker. If the ticker has listeners
+	 * a new animation frame is requested at this point.
+	 */
+	Ticker.prototype.start = function start ()
+	{
+	    if (!this.started)
+	    {
+	        this.started = true;
+	        this._requestIfNeeded();
+	    }
+	};
+
+	/**
+	 * Stops the ticker. If the ticker has requested
+	 * an animation frame it is canceled at this point.
+	 */
+	Ticker.prototype.stop = function stop ()
+	{
+	    if (this.started)
+	    {
+	        this.started = false;
+	        this._cancelIfNeeded();
+	    }
+	};
+
+	/**
+	 * Destroy the ticker and don't use after this. Calling
+	 * this method removes all references to internal events.
+	 */
+	Ticker.prototype.destroy = function destroy ()
+	{
+	    if (!this._protected)
+	    {
+	        this.stop();
+
+	        var listener = this._head.next;
+
+	        while (listener)
+	        {
+	            listener = listener.destroy(true);
+	        }
+
+	        this._head.destroy();
+	        this._head = null;
+	    }
+	};
+
+	/**
+	 * Triggers an update. An update entails setting the
+	 * current {@link PIXI.Ticker#elapsedMS},
+	 * the current {@link PIXI.Ticker#deltaTime},
+	 * invoking all listeners with current deltaTime,
+	 * and then finally setting {@link PIXI.Ticker#lastTime}
+	 * with the value of currentTime that was provided.
+	 * This method will be called automatically by animation
+	 * frame callbacks if the ticker instance has been started
+	 * and listeners are added.
+	 *
+	 * @param {number} [currentTime=performance.now()] - the current time of execution
+	 */
+	Ticker.prototype.update = function update (currentTime)
+	{
+	        if ( currentTime === void 0 ) { currentTime = performance.now(); }
+
+	    var elapsedMS;
+
+	    // If the difference in time is zero or negative, we ignore most of the work done here.
+	    // If there is no valid difference, then should be no reason to let anyone know about it.
+	    // A zero delta, is exactly that, nothing should update.
+	    //
+	    // The difference in time can be negative, and no this does not mean time traveling.
+	    // This can be the result of a race condition between when an animation frame is requested
+	    // on the current JavaScript engine event loop, and when the ticker's start method is invoked
+	    // (which invokes the internal _requestIfNeeded method). If a frame is requested before
+	    // _requestIfNeeded is invoked, then the callback for the animation frame the ticker requests,
+	    // can receive a time argument that can be less than the lastTime value that was set within
+	    // _requestIfNeeded. This difference is in microseconds, but this is enough to cause problems.
+	    //
+	    // This check covers this browser engine timing issue, as well as if consumers pass an invalid
+	    // currentTime value. This may happen if consumers opt-out of the autoStart, and update themselves.
+
+	    if (currentTime > this.lastTime)
+	    {
+	        // Save uncapped elapsedMS for measurement
+	        elapsedMS = this.elapsedMS = currentTime - this.lastTime;
+
+	        // cap the milliseconds elapsed used for deltaTime
+	        if (elapsedMS > this._maxElapsedMS)
+	        {
+	            elapsedMS = this._maxElapsedMS;
+	        }
+
+	        elapsedMS *= this.speed;
+
+	        // If not enough time has passed, exit the function.
+	        // Get ready for next frame by setting _lastFrame, but based on _minElapsedMS
+	        // adjustment to ensure a relatively stable interval.
+	        if (this._minElapsedMS)
+	        {
+	            var delta = currentTime - this._lastFrame | 0;
+
+	            if (delta < this._minElapsedMS)
+	            {
+	                return;
+	            }
+
+	            this._lastFrame = currentTime - (delta % this._minElapsedMS);
+	        }
+
+	        this.deltaMS = elapsedMS;
+	        this.deltaTime = this.deltaMS * settings.TARGET_FPMS;
+
+	        // Cache a local reference, in-case ticker is destroyed
+	        // during the emit, we can still check for head.next
+	        var head = this._head;
+
+	        // Invoke listeners added to internal emitter
+	        var listener = head.next;
+
+	        while (listener)
+	        {
+	            listener = listener.emit(this.deltaTime);
+	        }
+
+	        if (!head.next)
+	        {
+	            this._cancelIfNeeded();
+	        }
+	    }
+	    else
+	    {
+	        this.deltaTime = this.deltaMS = this.elapsedMS = 0;
+	    }
+
+	    this.lastTime = currentTime;
+	};
+
+	/**
+	 * The frames per second at which this ticker is running.
+	 * The default is approximately 60 in most modern browsers.
+	 * **Note:** This does not factor in the value of
+	 * {@link PIXI.Ticker#speed}, which is specific
+	 * to scaling {@link PIXI.Ticker#deltaTime}.
+	 *
+	 * @member {number}
+	 * @readonly
+	 */
+	prototypeAccessors$4.FPS.get = function ()
+	{
+	    return 1000 / this.elapsedMS;
+	};
+
+	/**
+	 * Manages the maximum amount of milliseconds allowed to
+	 * elapse between invoking {@link PIXI.Ticker#update}.
+	 * This value is used to cap {@link PIXI.Ticker#deltaTime},
+	 * but does not effect the measured value of {@link PIXI.Ticker#FPS}.
+	 * When setting this property it is clamped to a value between
+	 * `0` and `PIXI.settings.TARGET_FPMS * 1000`.
+	 *
+	 * @member {number}
+	 * @default 10
+	 */
+	prototypeAccessors$4.minFPS.get = function ()
+	{
+	    return 1000 / this._maxElapsedMS;
+	};
+
+	prototypeAccessors$4.minFPS.set = function (fps) // eslint-disable-line require-jsdoc
+	{
+	    // Minimum must be below the maxFPS
+	    var minFPS = Math.min(this.maxFPS, fps);
+
+	    // Must be at least 0, but below 1 / settings.TARGET_FPMS
+	    var minFPMS = Math.min(Math.max(0, minFPS) / 1000, settings.TARGET_FPMS);
+
+	    this._maxElapsedMS = 1 / minFPMS;
+	};
+
+	/**
+	 * Manages the minimum amount of milliseconds required to
+	 * elapse between invoking {@link PIXI.Ticker#update}.
+	 * This will effect the measured value of {@link PIXI.Ticker#FPS}.
+	 * If it is set to `0`, then there is no limit; PixiJS will render as many frames as it can.
+	 * Otherwise it will be at least `minFPS`
+	 *
+	 * @member {number}
+	 * @default 0
+	 */
+	prototypeAccessors$4.maxFPS.get = function ()
+	{
+	    if (this._minElapsedMS)
+	    {
+	        return Math.round(1000 / this._minElapsedMS);
+	    }
+
+	    return 0;
+	};
+
+	prototypeAccessors$4.maxFPS.set = function (fps)
+	{
+	    if (fps === 0)
+	    {
+	        this._minElapsedMS = 0;
+	    }
+	    else
+	    {
+	        // Max must be at least the minFPS
+	        var maxFPS = Math.max(this.minFPS, fps);
+
+	        this._minElapsedMS = 1 / (maxFPS / 1000);
+	    }
+	};
+
+	/**
+	 * The shared ticker instance used by {@link PIXI.AnimatedSprite} and by
+	 * {@link PIXI.VideoResource} to update animation frames / video textures.
+	 *
+	 * It may also be used by {@link PIXI.Application} if created with the `sharedTicker` option property set to true.
+	 *
+	 * The property {@link PIXI.Ticker#autoStart} is set to `true` for this instance.
+	 * Please follow the examples for usage, including how to opt-out of auto-starting the shared ticker.
+	 *
+	 * @example
+	 * let ticker = PIXI.Ticker.shared;
+	 * // Set this to prevent starting this ticker when listeners are added.
+	 * // By default this is true only for the PIXI.Ticker.shared instance.
+	 * ticker.autoStart = false;
+	 * // FYI, call this to ensure the ticker is stopped. It should be stopped
+	 * // if you have not attempted to render anything yet.
+	 * ticker.stop();
+	 * // Call this when you are ready for a running shared ticker.
+	 * ticker.start();
+	 *
+	 * @example
+	 * // You may use the shared ticker to render...
+	 * let renderer = PIXI.autoDetectRenderer();
+	 * let stage = new PIXI.Container();
+	 * document.body.appendChild(renderer.view);
+	 * ticker.add(function (time) {
+	 * renderer.render(stage);
+	 * });
+	 *
+	 * @example
+	 * // Or you can just update it manually.
+	 * ticker.autoStart = false;
+	 * ticker.stop();
+	 * function animate(time) {
+	 * ticker.update(time);
+	 * renderer.render(stage);
+	 * requestAnimationFrame(animate);
+	 * }
+	 * animate(performance.now());
+	 *
+	 * @member {PIXI.Ticker}
+	 * @static
+	 */
+	staticAccessors$2.shared.get = function ()
+	{
+	    if (!Ticker._shared)
+	    {
+	        var shared = Ticker._shared = new Ticker();
+
+	        shared.autoStart = true;
+	        shared._protected = true;
+	    }
+
+	    return Ticker._shared;
+	};
+
+	/**
+	 * The system ticker instance used by {@link PIXI.interaction.InteractionManager} and by
+	 * {@link PIXI.BasePrepare} for core timing functionality that shouldn't usually need to be paused,
+	 * unlike the `shared` ticker which drives visual animations and rendering which may want to be paused.
+	 *
+	 * The property {@link PIXI.Ticker#autoStart} is set to `true` for this instance.
+	 *
+	 * @member {PIXI.Ticker}
+	 * @static
+	 */
+	staticAccessors$2.system.get = function ()
+	{
+	    if (!Ticker._system)
+	    {
+	        var system = Ticker._system = new Ticker();
+
+	        system.autoStart = true;
+	        system._protected = true;
+	    }
+
+	    return Ticker._system;
+	};
+
+	Object.defineProperties( Ticker.prototype, prototypeAccessors$4 );
+	Object.defineProperties( Ticker, staticAccessors$2 );
+
+	/**
+	 * Middleware for for Application Ticker.
+	 *
+	 * @example
+	 * import {TickerPlugin} from '@pixi/ticker';
+	 * import {Application} from '@pixi/app';
+	 * Application.registerPlugin(TickerPlugin);
+	 *
+	 * @class
+	 * @memberof PIXI
+	 */
+	var TickerPlugin = function TickerPlugin () {};
+
+	TickerPlugin.init = function init (options)
+	{
+	        var this$1 = this;
+
+	    // Set default
+	    options = Object.assign({
+	        autoStart: true,
+	        sharedTicker: false,
+	    }, options);
+
+	    // Create ticker setter
+	    Object.defineProperty(this, 'ticker',
+	        {
+	            set: function set(ticker)
+	            {
+	                if (this._ticker)
+	                {
+	                    this._ticker.remove(this.render, this);
+	                }
+	                this._ticker = ticker;
+	                if (ticker)
+	                {
+	                    ticker.add(this.render, this, UPDATE_PRIORITY.LOW);
+	                }
+	            },
+	            get: function get()
+	            {
+	                return this._ticker;
+	            },
+	        });
+
+	    /**
+	     * Convenience method for stopping the render.
+	     *
+	     * @method PIXI.Application#stop
+	     */
+	    this.stop = function () {
+	        this$1._ticker.stop();
+	    };
+
+	    /**
+	     * Convenience method for starting the render.
+	     *
+	     * @method PIXI.Application#start
+	     */
+	    this.start = function () {
+	        this$1._ticker.start();
+	    };
+
+	    /**
+	     * Internal reference to the ticker.
+	     *
+	     * @type {PIXI.Ticker}
+	     * @name _ticker
+	     * @memberof PIXI.Application#
+	     * @private
+	     */
+	    this._ticker = null;
+
+	    /**
+	     * Ticker for doing render updates.
+	     *
+	     * @type {PIXI.Ticker}
+	     * @name ticker
+	     * @memberof PIXI.Application#
+	     * @default PIXI.Ticker.shared
+	     */
+	    this.ticker = options.sharedTicker ? Ticker.shared : new Ticker();
+
+	    // Start the rendering
+	    if (options.autoStart)
+	    {
+	        this.start();
+	    }
+	};
+
+	/**
+	 * Clean up the ticker, scoped to application.
+	 *
+	 * @static
+	 * @private
+	 */
+	TickerPlugin.destroy = function destroy ()
+	{
+	    if (this._ticker)
+	    {
+	        var oldTicker = this._ticker;
+
+	        this.ticker = null;
+	        oldTicker.destroy();
+	    }
+	};
+
+	/*!
+	 * @pixi/core - v5.1.4
+	 * Compiled Fri, 20 Sep 2019 17:22:13 UTC
+	 *
+	 * @pixi/core is licensed under the MIT License.
+	 * http://www.opensource.org/licenses/mit-license
+	 */
+
+	/**
+	 * Base resource class for textures that manages validation and uploading, depending on its type.
+	 *
+	 * Uploading of a base texture to the GPU is required.
+	 *
+	 * @class
+	 * @memberof PIXI.resources
+	 */
+	var Resource = function Resource(width, height)
+	{
+	    if ( width === void 0 ) { width = 0; }
+	    if ( height === void 0 ) { height = 0; }
+
+	    /**
+	     * Internal width of the resource
+	     * @member {number}
+	     * @protected
+	     */
+	    this._width = width;
+
+	    /**
+	     * Internal height of the resource
+	     * @member {number}
+	     * @protected
+	     */
+	    this._height = height;
+
+	    /**
+	     * If resource has been destroyed
+	     * @member {boolean}
+	     * @readonly
+	     * @default false
+	     */
+	    this.destroyed = false;
+
+	    /**
+	     * `true` if resource is created by BaseTexture
+	     * useful for doing cleanup with BaseTexture destroy
+	     * and not cleaning up resources that were created
+	     * externally.
+	     * @member {boolean}
+	     * @protected
+	     */
+	    this.internal = false;
+
+	    /**
+	     * Mini-runner for handling resize events
+	     *
+	     * @member {Runner}
+	     * @private
+	     */
+	    this.onResize = new Runner('setRealSize', 2);
+
+	    /**
+	     * Mini-runner for handling update events
+	     *
+	     * @member {Runner}
+	     * @private
+	     */
+	    this.onUpdate = new Runner('update');
+
+	    /**
+	     * Handle internal errors, such as loading errors
+	     *
+	     * @member {Runner}
+	     * @private
+	     */
+	    this.onError = new Runner('onError', 1);
+	};
+
+	var prototypeAccessors$5 = { valid: { configurable: true },width: { configurable: true },height: { configurable: true } };
+
+	/**
+	 * Bind to a parent BaseTexture
+	 *
+	 * @param {PIXI.BaseTexture} baseTexture - Parent texture
+	 */
+	Resource.prototype.bind = function bind (baseTexture)
+	{
+	    this.onResize.add(baseTexture);
+	    this.onUpdate.add(baseTexture);
+	    this.onError.add(baseTexture);
+
+	    // Call a resize immediate if we already
+	    // have the width and height of the resource
+	    if (this._width || this._height)
+	    {
+	        this.onResize.run(this._width, this._height);
+	    }
+	};
+
+	/**
+	 * Unbind to a parent BaseTexture
+	 *
+	 * @param {PIXI.BaseTexture} baseTexture - Parent texture
+	 */
+	Resource.prototype.unbind = function unbind (baseTexture)
+	{
+	    this.onResize.remove(baseTexture);
+	    this.onUpdate.remove(baseTexture);
+	    this.onError.remove(baseTexture);
+	};
+
+	/**
+	 * Trigger a resize event
+	 * @param {number} width X dimension
+	 * @param {number} height Y dimension
+	 */
+	Resource.prototype.resize = function resize (width, height)
+	{
+	    if (width !== this._width || height !== this._height)
+	    {
+	        this._width = width;
+	        this._height = height;
+	        this.onResize.run(width, height);
+	    }
+	};
+
+	/**
+	 * Has been validated
+	 * @readonly
+	 * @member {boolean}
+	 */
+	prototypeAccessors$5.valid.get = function ()
+	{
+	    return !!this._width && !!this._height;
+	};
+
+	/**
+	 * Has been updated trigger event
+	 */
+	Resource.prototype.update = function update ()
+	{
+	    if (!this.destroyed)
+	    {
+	        this.onUpdate.run();
+	    }
+	};
+
+	/**
+	 * This can be overridden to start preloading a resource
+	 * or do any other prepare step.
+	 * @protected
+	 * @return {Promise<void>} Handle the validate event
+	 */
+	Resource.prototype.load = function load ()
+	{
+	    return Promise.resolve();
+	};
+
+	/**
+	 * The width of the resource.
+	 *
+	 * @member {number}
+	 * @readonly
+	 */
+	prototypeAccessors$5.width.get = function ()
+	{
+	    return this._width;
+	};
+
+	/**
+	 * The height of the resource.
+	 *
+	 * @member {number}
+	 * @readonly
+	 */
+	prototypeAccessors$5.height.get = function ()
+	{
+	    return this._height;
+	};
+
+	/**
+	 * Uploads the texture or returns false if it cant for some reason. Override this.
+	 *
+	 * @param {PIXI.Renderer} renderer - yeah, renderer!
+	 * @param {PIXI.BaseTexture} baseTexture - the texture
+	 * @param {PIXI.GLTexture} glTexture - texture instance for this webgl context
+	 * @returns {boolean} true is success
+	 */
+	Resource.prototype.upload = function upload (renderer, baseTexture, glTexture) // eslint-disable-line no-unused-vars
+	{
+	    return false;
+	};
+
+	/**
+	 * Set the style, optional to override
+	 *
+	 * @param {PIXI.Renderer} renderer - yeah, renderer!
+	 * @param {PIXI.BaseTexture} baseTexture - the texture
+	 * @param {PIXI.GLTexture} glTexture - texture instance for this webgl context
+	 * @returns {boolean} `true` is success
+	 */
+	Resource.prototype.style = function style (renderer, baseTexture, glTexture) // eslint-disable-line no-unused-vars
+	{
+	    return false;
+	};
+
+	/**
+	 * Clean up anything, this happens when destroying is ready.
+	 *
+	 * @protected
+	 */
+	Resource.prototype.dispose = function dispose ()
+	{
+	    // override
+	};
+
+	/**
+	 * Call when destroying resource, unbind any BaseTexture object
+	 * before calling this method, as reference counts are maintained
+	 * internally.
+	 */
+	Resource.prototype.destroy = function destroy ()
+	{
+	    if (!this.destroyed)
+	    {
+	        this.destroyed = true;
+	        this.dispose();
+	        this.onError.removeAll();
+	        this.onError = null;
+	        this.onResize.removeAll();
+	        this.onResize = null;
+	        this.onUpdate.removeAll();
+	        this.onUpdate = null;
+	    }
+	};
+
+	Object.defineProperties( Resource.prototype, prototypeAccessors$5 );
+
+	/**
+	 * Base for all the image/canvas resources
+	 * @class
+	 * @extends PIXI.resources.Resource
+	 * @memberof PIXI.resources
+	 */
+	var BaseImageResource = /*@__PURE__*/(function (Resource) {
+	    function BaseImageResource(source)
+	    {
+	        var width = source.naturalWidth || source.videoWidth || source.width;
+	        var height = source.naturalHeight || source.videoHeight || source.height;
+
+	        Resource.call(this, width, height);
+
+	        /**
+	         * The source element
+	         * @member {HTMLImageElement|HTMLCanvasElement|HTMLVideoElement|SVGElement}
+	         * @readonly
+	         */
+	        this.source = source;
+
+	        /**
+	         * If set to `true`, will force `texImage2D` over `texSubImage2D` for uploading.
+	         * Certain types of media (e.g. video) using `texImage2D` is more performant.
+	         * @member {boolean}
+	         * @default false
+	         * @private
+	         */
+	        this.noSubImage = false;
+	    }
+
+	    if ( Resource ) { BaseImageResource.__proto__ = Resource; }
+	    BaseImageResource.prototype = Object.create( Resource && Resource.prototype );
+	    BaseImageResource.prototype.constructor = BaseImageResource;
+
+	    /**
+	     * Set cross origin based detecting the url and the crossorigin
+	     * @protected
+	     * @param {HTMLElement} element - Element to apply crossOrigin
+	     * @param {string} url - URL to check
+	     * @param {boolean|string} [crossorigin=true] - Cross origin value to use
+	     */
+	    BaseImageResource.crossOrigin = function crossOrigin (element, url, crossorigin)
+	    {
+	        if (crossorigin === undefined && url.indexOf('data:') !== 0)
+	        {
+	            element.crossOrigin = determineCrossOrigin(url);
+	        }
+	        else if (crossorigin !== false)
+	        {
+	            element.crossOrigin = typeof crossorigin === 'string' ? crossorigin : 'anonymous';
+	        }
+	    };
+
+	    /**
+	     * Upload the texture to the GPU.
+	     * @param {PIXI.Renderer} renderer Upload to the renderer
+	     * @param {PIXI.BaseTexture} baseTexture Reference to parent texture
+	     * @param {PIXI.GLTexture} glTexture
+	     * @param {HTMLImageElement|HTMLCanvasElement|HTMLVideoElement|SVGElement} [source] (optional)
+	     * @returns {boolean} true is success
+	     */
+	    BaseImageResource.prototype.upload = function upload (renderer, baseTexture, glTexture, source)
+	    {
+	        var gl = renderer.gl;
+	        var width = baseTexture.realWidth;
+	        var height = baseTexture.realHeight;
+
+	        source = source || this.source;
+
+	        gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, baseTexture.premultiplyAlpha);
+
+	        if (!this.noSubImage
+	            && baseTexture.target === gl.TEXTURE_2D
+	            && glTexture.width === width
+	            && glTexture.height === height)
+	        {
+	            gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, baseTexture.format, baseTexture.type, source);
+	        }
+	        else
+	        {
+	            glTexture.width = width;
+	            glTexture.height = height;
+
+	            gl.texImage2D(baseTexture.target, 0, baseTexture.format, baseTexture.format, baseTexture.type, source);
+	        }
+
+	        return true;
+	    };
+
+	    /**
+	     * Checks if source width/height was changed, resize can cause extra baseTexture update.
+	     * Triggers one update in any case.
+	     */
+	    BaseImageResource.prototype.update = function update ()
+	    {
+	        if (this.destroyed)
+	        {
+	            return;
+	        }
+
+	        var width = this.source.naturalWidth || this.source.videoWidth || this.source.width;
+	        var height = this.source.naturalHeight || this.source.videoHeight || this.source.height;
+
+	        this.resize(width, height);
+
+	        Resource.prototype.update.call(this);
+	    };
+
+	    /**
+	     * Destroy this BaseImageResource
+	     * @override
+	     * @param {PIXI.BaseTexture} [fromTexture] Optional base texture
+	     * @return {boolean} Destroy was successful
+	     */
+	    BaseImageResource.prototype.dispose = function dispose ()
+	    {
+	        this.source = null;
+	    };
+
+	    return BaseImageResource;
+	}(Resource));
+
+	/**
+	 * Resource type for HTMLImageElement.
+	 * @class
+	 * @extends PIXI.resources.BaseImageResource
+	 * @memberof PIXI.resources
+	 */
+	var ImageResource = /*@__PURE__*/(function (BaseImageResource) {
+	    function ImageResource(source, options)
+	    {
+	        options = options || {};
+
+	        if (!(source instanceof HTMLImageElement))
+	        {
+	            var imageElement = new Image();
+
+	            BaseImageResource.crossOrigin(imageElement, source, options.crossorigin);
+
+	            imageElement.src = source;
+	            source = imageElement;
+	        }
+
+	        BaseImageResource.call(this, source);
+
+	        // FireFox 68, and possibly other versions, seems like setting the HTMLImageElement#width and #height
+	        // to non-zero values before its loading completes if images are in a cache.
+	        // Because of this, need to set the `_width` and the `_height` to zero to avoid uploading incomplete images.
+	        // Please refer to the issue #5968 (https://github.com/pixijs/pixi.js/issues/5968).
+	        if (!source.complete && !!this._width && !!this._height)
+	        {
+	            this._width = 0;
+	            this._height = 0;
+	        }
+
+	        /**
+	         * URL of the image source
+	         * @member {string}
+	         */
+	        this.url = source.src;
+
+	        /**
+	         * When process is completed
+	         * @member {Promise<void>}
+	         * @private
+	         */
+	        this._process = null;
+
+	        /**
+	         * If the image should be disposed after upload
+	         * @member {boolean}
+	         * @default false
+	         */
+	        this.preserveBitmap = false;
+
+	        /**
+	         * If capable, convert the image using createImageBitmap API
+	         * @member {boolean}
+	         * @default PIXI.settings.CREATE_IMAGE_BITMAP
+	         */
+	        this.createBitmap = (options.createBitmap !== undefined
+	            ? options.createBitmap : settings.CREATE_IMAGE_BITMAP) && !!window.createImageBitmap;
+
+	        /**
+	         * Controls texture premultiplyAlpha field
+	         * Copies from options
+	         * @member {boolean|null}
+	         * @readonly
+	         */
+	        this.premultiplyAlpha = options.premultiplyAlpha !== false;
+
+	        /**
+	         * The ImageBitmap element created for HTMLImageElement
+	         * @member {ImageBitmap}
+	         * @default null
+	         */
+	        this.bitmap = null;
+
+	        /**
+	         * Promise when loading
+	         * @member {Promise<void>}
+	         * @private
+	         * @default null
+	         */
+	        this._load = null;
+
+	        if (options.autoLoad !== false)
+	        {
+	            this.load();
+	        }
+	    }
+
+	    if ( BaseImageResource ) { ImageResource.__proto__ = BaseImageResource; }
+	    ImageResource.prototype = Object.create( BaseImageResource && BaseImageResource.prototype );
+	    ImageResource.prototype.constructor = ImageResource;
+
+	    /**
+	     * returns a promise when image will be loaded and processed
+	     *
+	     * @param {boolean} [createBitmap=true] whether process image into bitmap
+	     * @returns {Promise<void>}
+	     */
+	    ImageResource.prototype.load = function load (createBitmap)
+	    {
+	        var this$1 = this;
+
+	        if (createBitmap !== undefined)
+	        {
+	            this.createBitmap = createBitmap;
+	        }
+
+	        if (this._load)
+	        {
+	            return this._load;
+	        }
+
+	        this._load = new Promise(function (resolve) {
+	            this$1.url = this$1.source.src;
+	            var ref = this$1;
+	            var source = ref.source;
+
+	            var completed = function () {
+	                if (this$1.destroyed)
+	                {
+	                    return;
+	                }
+	                source.onload = null;
+	                source.onerror = null;
+
+	                this$1.resize(source.width, source.height);
+	                this$1._load = null;
+
+	                if (this$1.createBitmap)
+	                {
+	                    resolve(this$1.process());
+	                }
+	                else
+	                {
+	                    resolve(this$1);
+	                }
+	            };
+
+	            if (source.complete && source.src)
+	            {
+	                completed();
+	            }
+	            else
+	            {
+	                source.onload = completed;
+	                source.onerror = function (event) { return this$1.onError.run(event); };
+	            }
+	        });
+
+	        return this._load;
+	    };
+
+	    /**
+	     * Called when we need to convert image into BitmapImage.
+	     * Can be called multiple times, real promise is cached inside.
+	     *
+	     * @returns {Promise<void>} cached promise to fill that bitmap
+	     */
+	    ImageResource.prototype.process = function process ()
+	    {
+	        var this$1 = this;
+
+	        if (this._process !== null)
+	        {
+	            return this._process;
+	        }
+	        if (this.bitmap !== null || !window.createImageBitmap)
+	        {
+	            return Promise.resolve(this);
+	        }
+
+	        this._process = window.createImageBitmap(this.source,
+	            0, 0, this.source.width, this.source.height,
+	            {
+	                premultiplyAlpha: this.premultiplyAlpha ? 'premultiply' : 'none',
+	            })
+	            .then(function (bitmap) {
+	                if (this$1.destroyed)
+	                {
+	                    return Promise.reject();
+	                }
+	                this$1.bitmap = bitmap;
+	                this$1.update();
+	                this$1._process = null;
+
+	                return Promise.resolve(this$1);
+	            });
+
+	        return this._process;
+	    };
+
+	    /**
+	     * Upload the image resource to GPU.
+	     *
+	     * @param {PIXI.Renderer} renderer - Renderer to upload to
+	     * @param {PIXI.BaseTexture} baseTexture - BaseTexture for this resource
+	     * @param {PIXI.GLTexture} glTexture - GLTexture to use
+	     * @returns {boolean} true is success
+	     */
+	    ImageResource.prototype.upload = function upload (renderer, baseTexture, glTexture)
+	    {
+	        baseTexture.premultiplyAlpha = this.premultiplyAlpha;
+
+	        if (!this.createBitmap)
+	        {
+	            return BaseImageResource.prototype.upload.call(this, renderer, baseTexture, glTexture);
+	        }
+	        if (!this.bitmap)
+	        {
+	            // yeah, ignore the output
+	            this.process();
+	            if (!this.bitmap)
+	            {
+	                return false;
+	            }
+	        }
+
+	        BaseImageResource.prototype.upload.call(this, renderer, baseTexture, glTexture, this.bitmap);
+
+	        if (!this.preserveBitmap)
+	        {
+	            // checks if there are other renderers that possibly need this bitmap
+
+	            var flag = true;
+
+	            for (var key in baseTexture._glTextures)
+	            {
+	                var otherTex = baseTexture._glTextures[key];
+
+	                if (otherTex !== glTexture && otherTex.dirtyId !== baseTexture.dirtyId)
+	                {
+	                    flag = false;
+	                    break;
+	                }
+	            }
+
+	            if (flag)
+	            {
+	                if (this.bitmap.close)
+	                {
+	                    this.bitmap.close();
+	                }
+
+	                this.bitmap = null;
+	            }
+	        }
+
+	        return true;
+	    };
+
+	    /**
+	     * Destroys this texture
+	     * @override
+	     */
+	    ImageResource.prototype.dispose = function dispose ()
+	    {
+	        this.source.onload = null;
+	        this.source.onerror = null;
+
+	        BaseImageResource.prototype.dispose.call(this);
+
+	        if (this.bitmap)
+	        {
+	            this.bitmap.close();
+	            this.bitmap = null;
+	        }
+	        this._process = null;
+	        this._load = null;
+	    };
+
+	    return ImageResource;
+	}(BaseImageResource));
+
+	/**
+	 * Collection of installed resource types, class must extend {@link PIXI.resources.Resource}.
+	 * @example
+	 * class CustomResource extends PIXI.resources.Resource {
+	 *   // MUST have source, options constructor signature
+	 *   // for auto-detected resources to be created.
+	 *   constructor(source, options) {
+	 *     super();
+	 *   }
+	 *   upload(renderer, baseTexture, glTexture) {
+	 *     // upload with GL
+	 *     return true;
+	 *   }
+	 *   // used to auto-detect resource
+	 *   static test(source, extension) {
+	 *     return extension === 'xyz'|| source instanceof SomeClass;
+	 *   }
+	 * }
+	 * // Install the new resource type
+	 * PIXI.resources.INSTALLED.push(CustomResource);
+	 *
+	 * @name PIXI.resources.INSTALLED
+	 * @type {Array<*>}
+	 * @static
+	 * @readonly
+	 */
+	var INSTALLED = [];
+
+	/**
+	 * Create a resource element from a single source element. This
+	 * auto-detects which type of resource to create. All resources that
+	 * are auto-detectable must have a static `test` method and a constructor
+	 * with the arguments `(source, options?)`. Currently, the supported
+	 * resources for auto-detection include:
+	 *  - {@link PIXI.resources.ImageResource}
+	 *  - {@link PIXI.resources.CanvasResource}
+	 *  - {@link PIXI.resources.VideoResource}
+	 *  - {@link PIXI.resources.SVGResource}
+	 *  - {@link PIXI.resources.BufferResource}
+	 * @static
+	 * @function PIXI.resources.autoDetectResource
+	 * @param {string|*} source - Resource source, this can be the URL to the resource,
+	 *        a typed-array (for BufferResource), HTMLVideoElement, SVG data-uri
+	 *        or any other resource that can be auto-detected. If not resource is
+	 *        detected, it's assumed to be an ImageResource.
+	 * @param {object} [options] - Pass-through options to use for Resource
+	 * @param {number} [options.width] - Width of BufferResource or SVG rasterization
+	 * @param {number} [options.height] - Height of BufferResource or SVG rasterization
+	 * @param {boolean} [options.autoLoad=true] - Image, SVG and Video flag to start loading
+	 * @param {number} [options.scale=1] - SVG source scale. Overridden by width, height
+	 * @param {boolean} [options.createBitmap=PIXI.settings.CREATE_IMAGE_BITMAP] - Image option to create Bitmap object
+	 * @param {boolean} [options.crossorigin=true] - Image and Video option to set crossOrigin
+	 * @param {boolean} [options.autoPlay=true] - Video option to start playing video immediately
+	 * @param {number} [options.updateFPS=0] - Video option to update how many times a second the
+	 *        texture should be updated from the video. Leave at 0 to update at every render
+	 * @return {PIXI.resources.Resource} The created resource.
+	 */
+	function autoDetectResource(source, options)
+	{
+	    if (!source)
+	    {
+	        return null;
+	    }
+
+	    var extension = '';
+
+	    if (typeof source === 'string')
+	    {
+	        // search for file extension: period, 3-4 chars, then ?, # or EOL
+	        var result = (/\.(\w{3,4})(?:$|\?|#)/i).exec(source);
+
+	        if (result)
+	        {
+	            extension = result[1].toLowerCase();
+	        }
+	    }
+
+	    for (var i = INSTALLED.length - 1; i >= 0; --i)
+	    {
+	        var ResourcePlugin = INSTALLED[i];
+
+	        if (ResourcePlugin.test && ResourcePlugin.test(source, extension))
+	        {
+	            return new ResourcePlugin(source, options);
+	        }
+	    }
+
+	    // When in doubt: probably an image
+	    // might be appropriate to throw an error or return null
+	    return new ImageResource(source, options);
+	}
+
+	/**
+	 * @interface SharedArrayBuffer
+	 */
+
+	/**
+	 * Buffer resource with data of typed array.
+	 * @class
+	 * @extends PIXI.resources.Resource
+	 * @memberof PIXI.resources
+	 */
+	var BufferResource = /*@__PURE__*/(function (Resource) {
+	    function BufferResource(source, options)
+	    {
+	        var ref = options || {};
+	        var width = ref.width;
+	        var height = ref.height;
+
+	        if (!width || !height)
+	        {
+	            throw new Error('BufferResource width or height invalid');
+	        }
+
+	        Resource.call(this, width, height);
+
+	        /**
+	         * Source array
+	         * Cannot be ClampedUint8Array because it cant be uploaded to WebGL
+	         *
+	         * @member {Float32Array|Uint8Array|Uint32Array}
+	         */
+	        this.data = source;
+	    }
+
+	    if ( Resource ) { BufferResource.__proto__ = Resource; }
+	    BufferResource.prototype = Object.create( Resource && Resource.prototype );
+	    BufferResource.prototype.constructor = BufferResource;
+
+	    /**
+	     * Upload the texture to the GPU.
+	     * @param {PIXI.Renderer} renderer Upload to the renderer
+	     * @param {PIXI.BaseTexture} baseTexture Reference to parent texture
+	     * @param {PIXI.GLTexture} glTexture glTexture
+	     * @returns {boolean} true is success
+	     */
+	    BufferResource.prototype.upload = function upload (renderer, baseTexture, glTexture)
+	    {
+	        var gl = renderer.gl;
+
+	        gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, baseTexture.premultiplyAlpha);
+
+	        if (glTexture.width === baseTexture.width && glTexture.height === baseTexture.height)
+	        {
+	            gl.texSubImage2D(
+	                baseTexture.target,
+	                0,
+	                0,
+	                0,
+	                baseTexture.width,
+	                baseTexture.height,
+	                baseTexture.format,
+	                baseTexture.type,
+	                this.data
+	            );
+	        }
+	        else
+	        {
+	            glTexture.width = baseTexture.width;
+	            glTexture.height = baseTexture.height;
+
+	            gl.texImage2D(
+	                baseTexture.target,
+	                0,
+	                glTexture.internalFormat,
+	                baseTexture.width,
+	                baseTexture.height,
+	                0,
+	                baseTexture.format,
+	                glTexture.type,
+	                this.data
+	            );
+	        }
+
+	        return true;
+	    };
+
+	    /**
+	     * Destroy and don't use after this
+	     * @override
+	     */
+	    BufferResource.prototype.dispose = function dispose ()
+	    {
+	        this.data = null;
+	    };
+
+	    /**
+	     * Used to auto-detect the type of resource.
+	     *
+	     * @static
+	     * @param {*} source - The source object
+	     * @return {boolean} `true` if <canvas>
+	     */
+	    BufferResource.test = function test (source)
+	    {
+	        return source instanceof Float32Array
+	            || source instanceof Uint8Array
+	            || source instanceof Uint32Array;
+	    };
+
+	    return BufferResource;
+	}(Resource));
+
+	var defaultBufferOptions = {
+	    scaleMode: SCALE_MODES.NEAREST,
+	    format: FORMATS.RGBA,
+	    premultiplyAlpha: false,
+	};
+
+	/**
+	 * A Texture stores the information that represents an image.
+	 * All textures have a base texture, which contains information about the source.
+	 * Therefore you can have many textures all using a single BaseTexture
+	 *
+	 * @class
+	 * @extends PIXI.utils.EventEmitter
+	 * @memberof PIXI
+	 * @param {PIXI.resources.Resource|string|HTMLImageElement|HTMLCanvasElement|HTMLVideoElement} [resource=null]
+	 *        The current resource to use, for things that aren't Resource objects, will be converted
+	 *        into a Resource.
+	 * @param {Object} [options] - Collection of options
+	 * @param {PIXI.MIPMAP_MODES} [options.mipmap=PIXI.settings.MIPMAP_TEXTURES] - If mipmapping is enabled for texture
+	 * @param {number} [options.anisotropicLevel=PIXI.settings.ANISOTROPIC_LEVEL] - Anisotropic filtering level of texture
+	 * @param {PIXI.WRAP_MODES} [options.wrapMode=PIXI.settings.WRAP_MODE] - Wrap mode for textures
+	 * @param {PIXI.SCALE_MODES} [options.scaleMode=PIXI.settings.SCALE_MODE] - Default scale mode, linear, nearest
+	 * @param {PIXI.FORMATS} [options.format=PIXI.FORMATS.RGBA] - GL format type
+	 * @param {PIXI.TYPES} [options.type=PIXI.TYPES.UNSIGNED_BYTE] - GL data type
+	 * @param {PIXI.TARGETS} [options.target=PIXI.TARGETS.TEXTURE_2D] - GL texture target
+	 * @param {boolean} [options.premultiplyAlpha=true] - Pre multiply the image alpha
+	 * @param {number} [options.width=0] - Width of the texture
+	 * @param {number} [options.height=0] - Height of the texture
+	 * @param {number} [options.resolution] - Resolution of the base texture
+	 * @param {object} [options.resourceOptions] - Optional resource options,
+	 *        see {@link PIXI.resources.autoDetectResource autoDetectResource}
+	 */
+	var BaseTexture = /*@__PURE__*/(function (EventEmitter) {
+	    function BaseTexture(resource, options)
+	    {
+	        if ( resource === void 0 ) { resource = null; }
+	        if ( options === void 0 ) { options = null; }
+
+	        EventEmitter.call(this);
+
+	        options = options || {};
+
+	        var premultiplyAlpha = options.premultiplyAlpha;
+	        var mipmap = options.mipmap;
+	        var anisotropicLevel = options.anisotropicLevel;
+	        var scaleMode = options.scaleMode;
+	        var width = options.width;
+	        var height = options.height;
+	        var wrapMode = options.wrapMode;
+	        var format = options.format;
+	        var type = options.type;
+	        var target = options.target;
+	        var resolution = options.resolution;
+	        var resourceOptions = options.resourceOptions;
+
+	        // Convert the resource to a Resource object
+	        if (resource && !(resource instanceof Resource))
+	        {
+	            resource = autoDetectResource(resource, resourceOptions);
+	            resource.internal = true;
+	        }
+
+	        /**
+	         * The width of the base texture set when the image has loaded
+	         *
+	         * @readonly
+	         * @member {number}
+	         */
+	        this.width = width || 0;
+
+	        /**
+	         * The height of the base texture set when the image has loaded
+	         *
+	         * @readonly
+	         * @member {number}
+	         */
+	        this.height = height || 0;
+
+	        /**
+	         * The resolution / device pixel ratio of the texture
+	         *
+	         * @member {number}
+	         * @default PIXI.settings.RESOLUTION
+	         */
+	        this.resolution = resolution || settings.RESOLUTION;
+
+	        /**
+	         * Mipmap mode of the texture, affects downscaled images
+	         *
+	         * @member {PIXI.MIPMAP_MODES}
+	         * @default PIXI.settings.MIPMAP_TEXTURES
+	         */
+	        this.mipmap = mipmap !== undefined ? mipmap : settings.MIPMAP_TEXTURES;
+
+	        /**
+	         * Anisotropic filtering level of texture
+	         *
+	         * @member {number}
+	         * @default PIXI.settings.ANISOTROPIC_LEVEL
+	         */
+	        this.anisotropicLevel = anisotropicLevel !== undefined ? anisotropicLevel : settings.ANISOTROPIC_LEVEL;
+
+	        /**
+	         * How the texture wraps
+	         * @member {number}
+	         */
+	        this.wrapMode = wrapMode || settings.WRAP_MODE;
+
+	        /**
+	         * The scale mode to apply when scaling this texture
+	         *
+	         * @member {PIXI.SCALE_MODES}
+	         * @default PIXI.settings.SCALE_MODE
+	         */
+	        this.scaleMode = scaleMode !== undefined ? scaleMode : settings.SCALE_MODE;
+
+	        /**
+	         * The pixel format of the texture
+	         *
+	         * @member {PIXI.FORMATS}
+	         * @default PIXI.FORMATS.RGBA
+	         */
+	        this.format = format || FORMATS.RGBA;
+
+	        /**
+	         * The type of resource data
+	         *
+	         * @member {PIXI.TYPES}
+	         * @default PIXI.TYPES.UNSIGNED_BYTE
+	         */
+	        this.type = type || TYPES.UNSIGNED_BYTE;
+
+	        /**
+	         * The target type
+	         *
+	         * @member {PIXI.TARGETS}
+	         * @default PIXI.TARGETS.TEXTURE_2D
+	         */
+	        this.target = target || TARGETS.TEXTURE_2D;
+
+	        /**
+	         * Set to true to enable pre-multiplied alpha
+	         *
+	         * @member {boolean}
+	         * @default true
+	         */
+	        this.premultiplyAlpha = premultiplyAlpha !== false;
+
+	        /**
+	         * Global unique identifier for this BaseTexture
+	         *
+	         * @member {string}
+	         * @protected
+	         */
+	        this.uid = uid();
+
+	        /**
+	         * Used by automatic texture Garbage Collection, stores last GC tick when it was bound
+	         *
+	         * @member {number}
+	         * @protected
+	         */
+	        this.touched = 0;
+
+	        /**
+	         * Whether or not the texture is a power of two, try to use power of two textures as much
+	         * as you can
+	         *
+	         * @readonly
+	         * @member {boolean}
+	         * @default false
+	         */
+	        this.isPowerOfTwo = false;
+	        this._refreshPOT();
+
+	        /**
+	         * The map of render context textures where this is bound
+	         *
+	         * @member {Object}
+	         * @private
+	         */
+	        this._glTextures = {};
+
+	        /**
+	         * Used by TextureSystem to only update texture to the GPU when needed.
+	         * Please call `update()` to increment it.
+	         *
+	         * @readonly
+	         * @member {number}
+	         */
+	        this.dirtyId = 0;
+
+	        /**
+	         * Used by TextureSystem to only update texture style when needed.
+	         *
+	         * @protected
+	         * @member {number}
+	         */
+	        this.dirtyStyleId = 0;
+
+	        /**
+	         * Currently default cache ID.
+	         *
+	         * @member {string}
+	         */
+	        this.cacheId = null;
+
+	        /**
+	         * Generally speaking means when resource is loaded.
+	         * @readonly
+	         * @member {boolean}
+	         */
+	        this.valid = width > 0 && height > 0;
+
+	        /**
+	         * The collection of alternative cache ids, since some BaseTextures
+	         * can have more than one ID, short name and longer full URL
+	         *
+	         * @member {Array<string>}
+	         * @readonly
+	         */
+	        this.textureCacheIds = [];
+
+	        /**
+	         * Flag if BaseTexture has been destroyed.
+	         *
+	         * @member {boolean}
+	         * @readonly
+	         */
+	        this.destroyed = false;
+
+	        /**
+	         * The resource used by this BaseTexture, there can only
+	         * be one resource per BaseTexture, but textures can share
+	         * resources.
+	         *
+	         * @member {PIXI.resources.Resource}
+	         * @readonly
+	         */
+	        this.resource = null;
+
+	        /**
+	         * Number of the texture batch, used by multi-texture renderers
+	         *
+	         * @member {number}
+	         */
+	        this._batchEnabled = 0;
+
+	        /**
+	         * Fired when a not-immediately-available source finishes loading.
+	         *
+	         * @protected
+	         * @event PIXI.BaseTexture#loaded
+	         * @param {PIXI.BaseTexture} baseTexture - Resource loaded.
+	         */
+
+	        /**
+	         * Fired when a not-immediately-available source fails to load.
+	         *
+	         * @protected
+	         * @event PIXI.BaseTexture#error
+	         * @param {PIXI.BaseTexture} baseTexture - Resource errored.
+	         * @param {ErrorEvent} event - Load error event.
+	         */
+
+	        /**
+	         * Fired when BaseTexture is updated.
+	         *
+	         * @protected
+	         * @event PIXI.BaseTexture#loaded
+	         * @param {PIXI.BaseTexture} baseTexture - Resource loaded.
+	         */
+
+	        /**
+	         * Fired when BaseTexture is updated.
+	         *
+	         * @protected
+	         * @event PIXI.BaseTexture#update
+	         * @param {PIXI.BaseTexture} baseTexture - Instance of texture being updated.
+	         */
+
+	        /**
+	         * Fired when BaseTexture is destroyed.
+	         *
+	         * @protected
+	         * @event PIXI.BaseTexture#dispose
+	         * @param {PIXI.BaseTexture} baseTexture - Instance of texture being destroyed.
+	         */
+
+	        // Set the resource
+	        this.setResource(resource);
+	    }
+
+	    if ( EventEmitter ) { BaseTexture.__proto__ = EventEmitter; }
+	    BaseTexture.prototype = Object.create( EventEmitter && EventEmitter.prototype );
+	    BaseTexture.prototype.constructor = BaseTexture;
+
+	    var prototypeAccessors = { realWidth: { configurable: true },realHeight: { configurable: true } };
+
+	    /**
+	     * Pixel width of the source of this texture
+	     *
+	     * @readonly
+	     * @member {number}
+	     */
+	    prototypeAccessors.realWidth.get = function ()
+	    {
+	        return Math.ceil((this.width * this.resolution) - 1e-4);
+	    };
+
+	    /**
+	     * Pixel height of the source of this texture
+	     *
+	     * @readonly
+	     * @member {number}
+	     */
+	    prototypeAccessors.realHeight.get = function ()
+	    {
+	        return Math.ceil((this.height * this.resolution) - 1e-4);
+	    };
+
+	    /**
+	     * Changes style options of BaseTexture
+	     *
+	     * @param {PIXI.SCALE_MODES} [scaleMode] - Pixi scalemode
+	     * @param {PIXI.MIPMAP_MODES} [mipmap] - enable mipmaps
+	     * @returns {PIXI.BaseTexture} this
+	     */
+	    BaseTexture.prototype.setStyle = function setStyle (scaleMode, mipmap)
+	    {
+	        var dirty;
+
+	        if (scaleMode !== undefined && scaleMode !== this.scaleMode)
+	        {
+	            this.scaleMode = scaleMode;
+	            dirty = true;
+	        }
+
+	        if (mipmap !== undefined && mipmap !== this.mipmap)
+	        {
+	            this.mipmap = mipmap;
+	            dirty = true;
+	        }
+
+	        if (dirty)
+	        {
+	            this.dirtyStyleId++;
+	        }
+
+	        return this;
+	    };
+
+	    /**
+	     * Changes w/h/resolution. Texture becomes valid if width and height are greater than zero.
+	     *
+	     * @param {number} width Visual width
+	     * @param {number} height Visual height
+	     * @param {number} [resolution] Optionally set resolution
+	     * @returns {PIXI.BaseTexture} this
+	     */
+	    BaseTexture.prototype.setSize = function setSize (width, height, resolution)
+	    {
+	        this.resolution = resolution || this.resolution;
+	        this.width = width;
+	        this.height = height;
+	        this._refreshPOT();
+	        this.update();
+
+	        return this;
+	    };
+
+	    /**
+	     * Sets real size of baseTexture, preserves current resolution.
+	     *
+	     * @param {number} realWidth Full rendered width
+	     * @param {number} realHeight Full rendered height
+	     * @param {number} [resolution] Optionally set resolution
+	     * @returns {PIXI.BaseTexture} this
+	     */
+	    BaseTexture.prototype.setRealSize = function setRealSize (realWidth, realHeight, resolution)
+	    {
+	        this.resolution = resolution || this.resolution;
+	        this.width = realWidth / this.resolution;
+	        this.height = realHeight / this.resolution;
+	        this._refreshPOT();
+	        this.update();
+
+	        return this;
+	    };
+
+	    /**
+	     * Refresh check for isPowerOfTwo texture based on size
+	     *
+	     * @private
+	     */
+	    BaseTexture.prototype._refreshPOT = function _refreshPOT ()
+	    {
+	        this.isPowerOfTwo = isPow2(this.realWidth) && isPow2(this.realHeight);
+	    };
+
+	    /**
+	     * Changes resolution
+	     *
+	     * @param {number} [resolution] res
+	     * @returns {PIXI.BaseTexture} this
+	     */
+	    BaseTexture.prototype.setResolution = function setResolution (resolution)
+	    {
+	        var oldResolution = this.resolution;
+
+	        if (oldResolution === resolution)
+	        {
+	            return this;
+	        }
+
+	        this.resolution = resolution;
+
+	        if (this.valid)
+	        {
+	            this.width = this.width * oldResolution / resolution;
+	            this.height = this.height * oldResolution / resolution;
+	            this.emit('update', this);
+	        }
+
+	        this._refreshPOT();
+
+	        return this;
+	    };
+
+	    /**
+	     * Sets the resource if it wasn't set. Throws error if resource already present
+	     *
+	     * @param {PIXI.resources.Resource} resource - that is managing this BaseTexture
+	     * @returns {PIXI.BaseTexture} this
+	     */
+	    BaseTexture.prototype.setResource = function setResource (resource)
+	    {
+	        if (this.resource === resource)
+	        {
+	            return this;
+	        }
+
+	        if (this.resource)
+	        {
+	            throw new Error('Resource can be set only once');
+	        }
+
+	        resource.bind(this);
+
+	        this.resource = resource;
+
+	        return this;
+	    };
+
+	    /**
+	     * Invalidates the object. Texture becomes valid if width and height are greater than zero.
+	     */
+	    BaseTexture.prototype.update = function update ()
+	    {
+	        if (!this.valid)
+	        {
+	            if (this.width > 0 && this.height > 0)
+	            {
+	                this.valid = true;
+	                this.emit('loaded', this);
+	                this.emit('update', this);
+	            }
+	        }
+	        else
+	        {
+	            this.dirtyId++;
+	            this.dirtyStyleId++;
+	            this.emit('update', this);
+	        }
+	    };
+
+	    /**
+	     * Handle errors with resources.
+	     * @private
+	     * @param {ErrorEvent} event - Error event emitted.
+	     */
+	    BaseTexture.prototype.onError = function onError (event)
+	    {
+	        this.emit('error', this, event);
+	    };
+
+	    /**
+	     * Destroys this base texture.
+	     * The method stops if resource doesn't want this texture to be destroyed.
+	     * Removes texture from all caches.
+	     */
+	    BaseTexture.prototype.destroy = function destroy ()
+	    {
+	        // remove and destroy the resource
+	        if (this.resource)
+	        {
+	            this.resource.unbind(this);
+	            // only destroy resourced created internally
+	            if (this.resource.internal)
+	            {
+	                this.resource.destroy();
+	            }
+	            this.resource = null;
+	        }
+
+	        if (this.cacheId)
+	        {
+	            delete BaseTextureCache[this.cacheId];
+	            delete TextureCache[this.cacheId];
+
+	            this.cacheId = null;
+	        }
+
+	        // finally let the WebGL renderer know..
+	        this.dispose();
+
+	        BaseTexture.removeFromCache(this);
+	        this.textureCacheIds = null;
+
+	        this.destroyed = true;
+	    };
+
+	    /**
+	     * Frees the texture from WebGL memory without destroying this texture object.
+	     * This means you can still use the texture later which will upload it to GPU
+	     * memory again.
+	     *
+	     * @fires PIXI.BaseTexture#dispose
+	     */
+	    BaseTexture.prototype.dispose = function dispose ()
+	    {
+	        this.emit('dispose', this);
+	    };
+
+	    /**
+	     * Helper function that creates a base texture based on the source you provide.
+	     * The source can be - image url, image element, canvas element. If the
+	     * source is an image url or an image element and not in the base texture
+	     * cache, it will be created and loaded.
+	     *
+	     * @static
+	     * @param {string|HTMLImageElement|HTMLCanvasElement|SVGElement|HTMLVideoElement} source - The
+	     *        source to create base texture from.
+	     * @param {object} [options] See {@link PIXI.BaseTexture}'s constructor for options.
+	     * @returns {PIXI.BaseTexture} The new base texture.
+	     */
+	    BaseTexture.from = function from (source, options)
+	    {
+	        var cacheId = null;
+
+	        if (typeof source === 'string')
+	        {
+	            cacheId = source;
+	        }
+	        else
+	        {
+	            if (!source._pixiId)
+	            {
+	                source._pixiId = "pixiid_" + (uid());
+	            }
+
+	            cacheId = source._pixiId;
+	        }
+
+	        var baseTexture = BaseTextureCache[cacheId];
+
+	        if (!baseTexture)
+	        {
+	            baseTexture = new BaseTexture(source, options);
+	            baseTexture.cacheId = cacheId;
+	            BaseTexture.addToCache(baseTexture, cacheId);
+	        }
+
+	        return baseTexture;
+	    };
+
+	    /**
+	     * Create a new BaseTexture with a BufferResource from a Float32Array.
+	     * RGBA values are floats from 0 to 1.
+	     * @static
+	     * @param {Float32Array|Uint8Array} buffer The optional array to use, if no data
+	     *        is provided, a new Float32Array is created.
+	     * @param {number} width - Width of the resource
+	     * @param {number} height - Height of the resource
+	     * @param {object} [options] See {@link PIXI.BaseTexture}'s constructor for options.
+	     * @return {PIXI.BaseTexture} The resulting new BaseTexture
+	     */
+	    BaseTexture.fromBuffer = function fromBuffer (buffer, width, height, options)
+	    {
+	        buffer = buffer || new Float32Array(width * height * 4);
+
+	        var resource = new BufferResource(buffer, { width: width, height: height });
+	        var type = buffer instanceof Float32Array ? TYPES.FLOAT : TYPES.UNSIGNED_BYTE;
+
+	        return new BaseTexture(resource, Object.assign(defaultBufferOptions, options || { width: width, height: height, type: type }));
+	    };
+
+	    /**
+	     * Adds a BaseTexture to the global BaseTextureCache. This cache is shared across the whole PIXI object.
+	     *
+	     * @static
+	     * @param {PIXI.BaseTexture} baseTexture - The BaseTexture to add to the cache.
+	     * @param {string} id - The id that the BaseTexture will be stored against.
+	     */
+	    BaseTexture.addToCache = function addToCache (baseTexture, id)
+	    {
+	        if (id)
+	        {
+	            if (baseTexture.textureCacheIds.indexOf(id) === -1)
+	            {
+	                baseTexture.textureCacheIds.push(id);
+	            }
+
+	            if (BaseTextureCache[id])
+	            {
+	                // eslint-disable-next-line no-console
+	                console.warn(("BaseTexture added to the cache with an id [" + id + "] that already had an entry"));
+	            }
+
+	            BaseTextureCache[id] = baseTexture;
+	        }
+	    };
+
+	    /**
+	     * Remove a BaseTexture from the global BaseTextureCache.
+	     *
+	     * @static
+	     * @param {string|PIXI.BaseTexture} baseTexture - id of a BaseTexture to be removed, or a BaseTexture instance itself.
+	     * @return {PIXI.BaseTexture|null} The BaseTexture that was removed.
+	     */
+	    BaseTexture.removeFromCache = function removeFromCache (baseTexture)
+	    {
+	        if (typeof baseTexture === 'string')
+	        {
+	            var baseTextureFromCache = BaseTextureCache[baseTexture];
+
+	            if (baseTextureFromCache)
+	            {
+	                var index = baseTextureFromCache.textureCacheIds.indexOf(baseTexture);
+
+	                if (index > -1)
+	                {
+	                    baseTextureFromCache.textureCacheIds.splice(index, 1);
+	                }
+
+	                delete BaseTextureCache[baseTexture];
+
+	                return baseTextureFromCache;
+	            }
+	        }
+	        else if (baseTexture && baseTexture.textureCacheIds)
+	        {
+	            for (var i = 0; i < baseTexture.textureCacheIds.length; ++i)
+	            {
+	                delete BaseTextureCache[baseTexture.textureCacheIds[i]];
+	            }
+
+	            baseTexture.textureCacheIds.length = 0;
+
+	            return baseTexture;
+	        }
+
+	        return null;
+	    };
+
+	    Object.defineProperties( BaseTexture.prototype, prototypeAccessors );
+
+	    return BaseTexture;
+	}(eventemitter3));
+
+	/**
+	 * Global number of the texture batch, used by multi-texture renderers
+	 *
+	 * @static
+	 * @member {number}
+	 */
+	BaseTexture._globalBatch = 0;
+
+	/**
+	 * A resource that contains a number of sources.
+	 *
+	 * @class
+	 * @extends PIXI.resources.Resource
+	 * @memberof PIXI.resources
+	 * @param {number|Array<*>} source - Number of items in array or the collection
+	 *        of image URLs to use. Can also be resources, image elements, canvas, etc.
+	 * @param {object} [options] Options to apply to {@link PIXI.resources.autoDetectResource}
+	 * @param {number} [options.width] - Width of the resource
+	 * @param {number} [options.height] - Height of the resource
+	 */
+	var ArrayResource = /*@__PURE__*/(function (Resource) {
+	    function ArrayResource(source, options)
+	    {
+	        options = options || {};
+
+	        var urls;
+	        var length = source;
+
+	        if (Array.isArray(source))
+	        {
+	            urls = source;
+	            length = source.length;
+	        }
+
+	        Resource.call(this, options.width, options.height);
+
+	        /**
+	         * Collection of resources.
+	         * @member {Array<PIXI.BaseTexture>}
+	         * @readonly
+	         */
+	        this.items = [];
+
+	        /**
+	         * Dirty IDs for each part
+	         * @member {Array<number>}
+	         * @readonly
+	         */
+	        this.itemDirtyIds = [];
+
+	        for (var i = 0; i < length; i++)
+	        {
+	            var partTexture = new BaseTexture();
+
+	            this.items.push(partTexture);
+	            this.itemDirtyIds.push(-1);
+	        }
+
+	        /**
+	         * Number of elements in array
+	         *
+	         * @member {number}
+	         * @readonly
+	         */
+	        this.length = length;
+
+	        /**
+	         * Promise when loading
+	         * @member {Promise}
+	         * @private
+	         * @default null
+	         */
+	        this._load = null;
+
+	        if (urls)
+	        {
+	            for (var i$1 = 0; i$1 < length; i$1++)
+	            {
+	                this.addResourceAt(autoDetectResource(urls[i$1], options), i$1);
+	            }
+	        }
+	    }
+
+	    if ( Resource ) { ArrayResource.__proto__ = Resource; }
+	    ArrayResource.prototype = Object.create( Resource && Resource.prototype );
+	    ArrayResource.prototype.constructor = ArrayResource;
+
+	    /**
+	     * Destroy this BaseImageResource
+	     * @override
+	     */
+	    ArrayResource.prototype.dispose = function dispose ()
+	    {
+	        for (var i = 0, len = this.length; i < len; i++)
+	        {
+	            this.items[i].destroy();
+	        }
+	        this.items = null;
+	        this.itemDirtyIds = null;
+	        this._load = null;
+	    };
+
+	    /**
+	     * Set a resource by ID
+	     *
+	     * @param {PIXI.resources.Resource} resource
+	     * @param {number} index - Zero-based index of resource to set
+	     * @return {PIXI.resources.ArrayResource} Instance for chaining
+	     */
+	    ArrayResource.prototype.addResourceAt = function addResourceAt (resource, index)
+	    {
+	        var baseTexture = this.items[index];
+
+	        if (!baseTexture)
+	        {
+	            throw new Error(("Index " + index + " is out of bounds"));
+	        }
+
+	        // Inherit the first resource dimensions
+	        if (resource.valid && !this.valid)
+	        {
+	            this.resize(resource.width, resource.height);
+	        }
+
+	        this.items[index].setResource(resource);
+
+	        return this;
+	    };
+
+	    /**
+	     * Set the parent base texture
+	     * @member {PIXI.BaseTexture}
+	     * @override
+	     */
+	    ArrayResource.prototype.bind = function bind (baseTexture)
+	    {
+	        Resource.prototype.bind.call(this, baseTexture);
+
+	        baseTexture.target = TARGETS.TEXTURE_2D_ARRAY;
+
+	        for (var i = 0; i < this.length; i++)
+	        {
+	            this.items[i].on('update', baseTexture.update, baseTexture);
+	        }
+	    };
+
+	    /**
+	     * Unset the parent base texture
+	     * @member {PIXI.BaseTexture}
+	     * @override
+	     */
+	    ArrayResource.prototype.unbind = function unbind (baseTexture)
+	    {
+	        Resource.prototype.unbind.call(this, baseTexture);
+
+	        for (var i = 0; i < this.length; i++)
+	        {
+	            this.items[i].off('update', baseTexture.update, baseTexture);
+	        }
+	    };
+
+	    /**
+	     * Load all the resources simultaneously
+	     * @override
+	     * @return {Promise<void>} When load is resolved
+	     */
+	    ArrayResource.prototype.load = function load ()
+	    {
+	        var this$1 = this;
+
+	        if (this._load)
+	        {
+	            return this._load;
+	        }
+
+	        var resources = this.items.map(function (item) { return item.resource; });
+
+	        // TODO: also implement load part-by-part strategy
+	        var promises = resources.map(function (item) { return item.load(); });
+
+	        this._load = Promise.all(promises)
+	            .then(function () {
+	                var ref = resources[0];
+	                var width = ref.width;
+	                var height = ref.height;
+
+	                this$1.resize(width, height);
+
+	                return Promise.resolve(this$1);
+	            }
+	            );
+
+	        return this._load;
+	    };
+
+	    /**
+	     * Upload the resources to the GPU.
+	     * @param {PIXI.Renderer} renderer
+	     * @param {PIXI.BaseTexture} texture
+	     * @param {PIXI.GLTexture} glTexture
+	     * @returns {boolean} whether texture was uploaded
+	     */
+	    ArrayResource.prototype.upload = function upload (renderer, texture, glTexture)
+	    {
+	        var ref = this;
+	        var length = ref.length;
+	        var itemDirtyIds = ref.itemDirtyIds;
+	        var items = ref.items;
+	        var gl = renderer.gl;
+
+	        if (glTexture.dirtyId < 0)
+	        {
+	            gl.texImage3D(
+	                gl.TEXTURE_2D_ARRAY,
+	                0,
+	                texture.format,
+	                this._width,
+	                this._height,
+	                length,
+	                0,
+	                texture.format,
+	                texture.type,
+	                null
+	            );
+	        }
+
+	        for (var i = 0; i < length; i++)
+	        {
+	            var item = items[i];
+
+	            if (itemDirtyIds[i] < item.dirtyId)
+	            {
+	                itemDirtyIds[i] = item.dirtyId;
+	                if (item.valid)
+	                {
+	                    gl.texSubImage3D(
+	                        gl.TEXTURE_2D_ARRAY,
+	                        0,
+	                        0, // xoffset
+	                        0, // yoffset
+	                        i, // zoffset
+	                        item.resource.width,
+	                        item.resource.height,
+	                        1,
+	                        texture.format,
+	                        texture.type,
+	                        item.resource.source
+	                    );
+	                }
+	            }
+	        }
+
+	        return true;
+	    };
+
+	    return ArrayResource;
+	}(Resource));
+
+	/**
+	 * @interface OffscreenCanvas
+	 */
+
+	/**
+	 * Resource type for HTMLCanvasElement.
+	 * @class
+	 * @extends PIXI.resources.BaseImageResource
+	 * @memberof PIXI.resources
+	 * @param {HTMLCanvasElement} source - Canvas element to use
+	 */
+	var CanvasResource = /*@__PURE__*/(function (BaseImageResource) {
+	    function CanvasResource () {
+	        BaseImageResource.apply(this, arguments);
+	    }
+
+	    if ( BaseImageResource ) { CanvasResource.__proto__ = BaseImageResource; }
+	    CanvasResource.prototype = Object.create( BaseImageResource && BaseImageResource.prototype );
+	    CanvasResource.prototype.constructor = CanvasResource;
+
+	    CanvasResource.test = function test (source)
+	    {
+	        var OffscreenCanvas = window.OffscreenCanvas;
+
+	        // Check for browsers that don't yet support OffscreenCanvas
+	        if (OffscreenCanvas && source instanceof OffscreenCanvas)
+	        {
+	            return true;
+	        }
+
+	        return source instanceof HTMLCanvasElement;
+	    };
+
+	    return CanvasResource;
+	}(BaseImageResource));
+
+	/**
+	 * Resource for a CubeTexture which contains six resources.
+	 *
+	 * @class
+	 * @extends PIXI.resources.ArrayResource
+	 * @memberof PIXI.resources
+	 * @param {Array<string|PIXI.resources.Resource>} [source] Collection of URLs or resources
+	 *        to use as the sides of the cube.
+	 * @param {object} [options] - ImageResource options
+	 * @param {number} [options.width] - Width of resource
+	 * @param {number} [options.height] - Height of resource
+	 */
+	var CubeResource = /*@__PURE__*/(function (ArrayResource) {
+	    function CubeResource(source, options)
+	    {
+	        options = options || {};
+
+	        ArrayResource.call(this, source, options);
+
+	        if (this.length !== CubeResource.SIDES)
+	        {
+	            throw new Error(("Invalid length. Got " + (this.length) + ", expected 6"));
+	        }
+
+	        for (var i = 0; i < CubeResource.SIDES; i++)
+	        {
+	            this.items[i].target = TARGETS.TEXTURE_CUBE_MAP_POSITIVE_X + i;
+	        }
+
+	        if (options.autoLoad !== false)
+	        {
+	            this.load();
+	        }
+	    }
+
+	    if ( ArrayResource ) { CubeResource.__proto__ = ArrayResource; }
+	    CubeResource.prototype = Object.create( ArrayResource && ArrayResource.prototype );
+	    CubeResource.prototype.constructor = CubeResource;
+
+	    /**
+	     * Add binding
+	     *
+	     * @override
+	     * @param {PIXI.BaseTexture} baseTexture - parent base texture
+	     */
+	    CubeResource.prototype.bind = function bind (baseTexture)
+	    {
+	        ArrayResource.prototype.bind.call(this, baseTexture);
+
+	        baseTexture.target = TARGETS.TEXTURE_CUBE_MAP;
+	    };
+
+	    /**
+	     * Upload the resource
+	     *
+	     * @returns {boolean} true is success
+	     */
+	    CubeResource.prototype.upload = function upload (renderer, baseTexture, glTexture)
+	    {
+	        var dirty = this.itemDirtyIds;
+
+	        for (var i = 0; i < CubeResource.SIDES; i++)
+	        {
+	            var side = this.items[i];
+
+	            if (dirty[i] < side.dirtyId)
+	            {
+	                dirty[i] = side.dirtyId;
+	                if (side.valid)
+	                {
+	                    side.resource.upload(renderer, side, glTexture);
+	                }
+	            }
+	        }
+
+	        return true;
+	    };
+
+	    return CubeResource;
+	}(ArrayResource));
+
+	/**
+	 * Number of texture sides to store for CubeResources
+	 *
+	 * @name PIXI.resources.CubeResource.SIDES
+	 * @static
+	 * @member {number}
+	 * @default 6
+	 */
+	CubeResource.SIDES = 6;
+
+	/**
+	 * Resource type for SVG elements and graphics.
+	 * @class
+	 * @extends PIXI.resources.BaseImageResource
+	 * @memberof PIXI.resources
+	 * @param {string} source - Base64 encoded SVG element or URL for SVG file.
+	 * @param {object} [options] - Options to use
+	 * @param {number} [options.scale=1] Scale to apply to SVG. Overridden by...
+	 * @param {number} [options.width] Rasterize SVG this wide. Aspect ratio preserved if height not specified.
+	 * @param {number} [options.height] Rasterize SVG this high. Aspect ratio preserved if width not specified.
+	 * @param {boolean} [options.autoLoad=true] Start loading right away.
+	 */
+	var SVGResource = /*@__PURE__*/(function (BaseImageResource) {
+	    function SVGResource(source, options)
+	    {
+	        options = options || {};
+
+	        BaseImageResource.call(this, document.createElement('canvas'));
+	        this._width = 0;
+	        this._height = 0;
+
+	        /**
+	         * Base64 encoded SVG element or URL for SVG file
+	         * @readonly
+	         * @member {string}
+	         */
+	        this.svg = source;
+
+	        /**
+	         * The source scale to apply when rasterizing on load
+	         * @readonly
+	         * @member {number}
+	         */
+	        this.scale = options.scale || 1;
+
+	        /**
+	         * A width override for rasterization on load
+	         * @readonly
+	         * @member {number}
+	         */
+	        this._overrideWidth = options.width;
+
+	        /**
+	         * A height override for rasterization on load
+	         * @readonly
+	         * @member {number}
+	         */
+	        this._overrideHeight = options.height;
+
+	        /**
+	         * Call when completely loaded
+	         * @private
+	         * @member {function}
+	         */
+	        this._resolve = null;
+
+	        /**
+	         * Cross origin value to use
+	         * @private
+	         * @member {boolean|string}
+	         */
+	        this._crossorigin = options.crossorigin;
+
+	        /**
+	         * Promise when loading
+	         * @member {Promise<void>}
+	         * @private
+	         * @default null
+	         */
+	        this._load = null;
+
+	        if (options.autoLoad !== false)
+	        {
+	            this.load();
+	        }
+	    }
+
+	    if ( BaseImageResource ) { SVGResource.__proto__ = BaseImageResource; }
+	    SVGResource.prototype = Object.create( BaseImageResource && BaseImageResource.prototype );
+	    SVGResource.prototype.constructor = SVGResource;
+
+	    SVGResource.prototype.load = function load ()
+	    {
+	        var this$1 = this;
+
+	        if (this._load)
+	        {
+	            return this._load;
+	        }
+
+	        this._load = new Promise(function (resolve) {
+	            // Save this until after load is finished
+	            this$1._resolve = function () {
+	                this$1.resize(this$1.source.width, this$1.source.height);
+	                resolve(this$1);
+	            };
+
+	            // Convert SVG inline string to data-uri
+	            if ((/^\<svg/).test(this$1.svg.trim()))
+	            {
+	                if (!btoa)
+	                {
+	                    throw new Error('Your browser doesn\'t support base64 conversions.');
+	                }
+	                this$1.svg = "data:image/svg+xml;base64," + (btoa(unescape(encodeURIComponent(this$1.svg))));
+	            }
+
+	            this$1._loadSvg();
+	        });
+
+	        return this._load;
+	    };
+
+	    /**
+	     * Loads an SVG image from `imageUrl` or `data URL`.
+	     *
+	     * @private
+	     */
+	    SVGResource.prototype._loadSvg = function _loadSvg ()
+	    {
+	        var this$1 = this;
+
+	        var tempImage = new Image();
+
+	        BaseImageResource.crossOrigin(tempImage, this.svg, this._crossorigin);
+	        tempImage.src = this.svg;
+
+	        tempImage.onerror = function (event) {
+	            tempImage.onerror = null;
+	            this$1.onError.run(event);
+	        };
+
+	        tempImage.onload = function () {
+	            var svgWidth = tempImage.width;
+	            var svgHeight = tempImage.height;
+
+	            if (!svgWidth || !svgHeight)
+	            {
+	                throw new Error('The SVG image must have width and height defined (in pixels), canvas API needs them.');
+	            }
+
+	            // Set render size
+	            var width = svgWidth * this$1.scale;
+	            var height = svgHeight * this$1.scale;
+
+	            if (this$1._overrideWidth || this$1._overrideHeight)
+	            {
+	                width = this$1._overrideWidth || this$1._overrideHeight / svgHeight * svgWidth;
+	                height = this$1._overrideHeight || this$1._overrideWidth / svgWidth * svgHeight;
+	            }
+	            width = Math.round(width);
+	            height = Math.round(height);
+
+	            // Create a canvas element
+	            var canvas = this$1.source;
+
+	            canvas.width = width;
+	            canvas.height = height;
+	            canvas._pixiId = "canvas_" + (uid());
+
+	            // Draw the Svg to the canvas
+	            canvas
+	                .getContext('2d')
+	                .drawImage(tempImage, 0, 0, svgWidth, svgHeight, 0, 0, width, height);
+
+	            this$1._resolve();
+	            this$1._resolve = null;
+	        };
+	    };
+
+	    /**
+	     * Get size from an svg string using regexp.
+	     *
+	     * @method
+	     * @param {string} svgString - a serialized svg element
+	     * @return {PIXI.ISize} image extension
+	     */
+	    SVGResource.getSize = function getSize (svgString)
+	    {
+	        var sizeMatch = SVGResource.SVG_SIZE.exec(svgString);
+	        var size = {};
+
+	        if (sizeMatch)
+	        {
+	            size[sizeMatch[1]] = Math.round(parseFloat(sizeMatch[3]));
+	            size[sizeMatch[5]] = Math.round(parseFloat(sizeMatch[7]));
+	        }
+
+	        return size;
+	    };
+
+	    /**
+	     * Destroys this texture
+	     * @override
+	     */
+	    SVGResource.prototype.dispose = function dispose ()
+	    {
+	        BaseImageResource.prototype.dispose.call(this);
+	        this._resolve = null;
+	        this._crossorigin = null;
+	    };
+
+	    /**
+	     * Used to auto-detect the type of resource.
+	     *
+	     * @static
+	     * @param {*} source - The source object
+	     * @param {string} extension - The extension of source, if set
+	     */
+	    SVGResource.test = function test (source, extension)
+	    {
+	        // url file extension is SVG
+	        return extension === 'svg'
+	            // source is SVG data-uri
+	            || (typeof source === 'string' && source.indexOf('data:image/svg+xml;base64') === 0)
+	            // source is SVG inline
+	            || (typeof source === 'string' && source.indexOf('<svg') === 0);
+	    };
+
+	    return SVGResource;
+	}(BaseImageResource));
+
+	/**
+	 * RegExp for SVG size.
+	 *
+	 * @static
+	 * @constant {RegExp|string} SVG_SIZE
+	 * @memberof PIXI.resources.SVGResource
+	 * @example &lt;svg width="100" height="100"&gt;&lt;/svg&gt;
+	 */
+	SVGResource.SVG_SIZE = /<svg[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i; // eslint-disable-line max-len
+
+	/**
+	 * Resource type for HTMLVideoElement.
+	 * @class
+	 * @extends PIXI.resources.BaseImageResource
+	 * @memberof PIXI.resources
+	 * @param {HTMLVideoElement|object|string|Array<string|object>} source - Video element to use.
+	 * @param {object} [options] - Options to use
+	 * @param {boolean} [options.autoLoad=true] - Start loading the video immediately
+	 * @param {boolean} [options.autoPlay=true] - Start playing video immediately
+	 * @param {number} [options.updateFPS=0] - How many times a second to update the texture from the video.
+	 * Leave at 0 to update at every render.
+	 * @param {boolean} [options.crossorigin=true] - Load image using cross origin
+	 */
+	var VideoResource = /*@__PURE__*/(function (BaseImageResource) {
+	    function VideoResource(source, options)
+	    {
+	        options = options || {};
+
+	        if (!(source instanceof HTMLVideoElement))
+	        {
+	            var videoElement = document.createElement('video');
+
+	            // workaround for https://github.com/pixijs/pixi.js/issues/5996
+	            videoElement.setAttribute('preload', 'auto');
+	            videoElement.setAttribute('webkit-playsinline', '');
+	            videoElement.setAttribute('playsinline', '');
+
+	            if (typeof source === 'string')
+	            {
+	                source = [source];
+	            }
+
+	            BaseImageResource.crossOrigin(videoElement, (source[0].src || source[0]), options.crossorigin);
+
+	            // array of objects or strings
+	            for (var i = 0; i < source.length; ++i)
+	            {
+	                var sourceElement = document.createElement('source');
+
+	                var ref = source[i];
+	                var src = ref.src;
+	                var mime = ref.mime;
+
+	                src = src || source[i];
+
+	                var baseSrc = src.split('?').shift().toLowerCase();
+	                var ext = baseSrc.substr(baseSrc.lastIndexOf('.') + 1);
+
+	                mime = mime || ("video/" + ext);
+
+	                sourceElement.src = src;
+	                sourceElement.type = mime;
+
+	                videoElement.appendChild(sourceElement);
+	            }
+
+	            // Override the source
+	            source = videoElement;
+	        }
+
+	        BaseImageResource.call(this, source);
+
+	        this.noSubImage = true;
+	        this._autoUpdate = true;
+	        this._isAutoUpdating = false;
+	        this._updateFPS = options.updateFPS || 0;
+	        this._msToNextUpdate = 0;
+
+	        /**
+	         * When set to true will automatically play videos used by this texture once
+	         * they are loaded. If false, it will not modify the playing state.
+	         *
+	         * @member {boolean}
+	         * @default true
+	         */
+	        this.autoPlay = options.autoPlay !== false;
+
+	        /**
+	         * Promise when loading
+	         * @member {Promise<void>}
+	         * @private
+	         * @default null
+	         */
+	        this._load = null;
+
+	        /**
+	         * Callback when completed with load.
+	         * @member {function}
+	         * @private
+	         */
+	        this._resolve = null;
+
+	        // Bind for listeners
+	        this._onCanPlay = this._onCanPlay.bind(this);
+	        this._onError = this._onError.bind(this);
+
+	        if (options.autoLoad !== false)
+	        {
+	            this.load();
+	        }
+	    }
+
+	    if ( BaseImageResource ) { VideoResource.__proto__ = BaseImageResource; }
+	    VideoResource.prototype = Object.create( BaseImageResource && BaseImageResource.prototype );
+	    VideoResource.prototype.constructor = VideoResource;
+
+	    var prototypeAccessors = { autoUpdate: { configurable: true },updateFPS: { configurable: true } };
+
+	    /**
+	     * Trigger updating of the texture
+	     *
+	     * @param {number} [deltaTime=0] - time delta since last tick
+	     */
+	    VideoResource.prototype.update = function update (deltaTime)
+	    {
+	        if ( deltaTime === void 0 ) { deltaTime = 0; }
+
+	        if (!this.destroyed)
+	        {
+	            // account for if video has had its playbackRate changed
+	            var elapsedMS = Ticker.shared.elapsedMS * this.source.playbackRate;
+
+	            this._msToNextUpdate = Math.floor(this._msToNextUpdate - elapsedMS);
+	            if (!this._updateFPS || this._msToNextUpdate <= 0)
+	            {
+	                BaseImageResource.prototype.update.call(this, deltaTime);
+	                this._msToNextUpdate = this._updateFPS ? Math.floor(1000 / this._updateFPS) : 0;
+	            }
+	        }
+	    };
+
+	    /**
+	     * Start preloading the video resource.
+	     *
+	     * @protected
+	     * @return {Promise<void>} Handle the validate event
+	     */
+	    VideoResource.prototype.load = function load ()
+	    {
+	        var this$1 = this;
+
+	        if (this._load)
+	        {
+	            return this._load;
+	        }
+
+	        var source = this.source;
+
+	        if ((source.readyState === source.HAVE_ENOUGH_DATA || source.readyState === source.HAVE_FUTURE_DATA)
+	            && source.width && source.height)
+	        {
+	            source.complete = true;
+	        }
+
+	        source.addEventListener('play', this._onPlayStart.bind(this));
+	        source.addEventListener('pause', this._onPlayStop.bind(this));
+
+	        if (!this._isSourceReady())
+	        {
+	            source.addEventListener('canplay', this._onCanPlay);
+	            source.addEventListener('canplaythrough', this._onCanPlay);
+	            source.addEventListener('error', this._onError, true);
+	        }
+	        else
+	        {
+	            this._onCanPlay();
+	        }
+
+	        this._load = new Promise(function (resolve) {
+	            if (this$1.valid)
+	            {
+	                resolve(this$1);
+	            }
+	            else
+	            {
+	                this$1._resolve = resolve;
+
+	                source.load();
+	            }
+	        });
+
+	        return this._load;
+	    };
+
+	    /**
+	     * Handle video error events.
+	     *
+	     * @private
+	     */
+	    VideoResource.prototype._onError = function _onError ()
+	    {
+	        this.source.removeEventListener('error', this._onError, true);
+	        this.onError.run(event);
+	    };
+
+	    /**
+	     * Returns true if the underlying source is playing.
+	     *
+	     * @private
+	     * @return {boolean} True if playing.
+	     */
+	    VideoResource.prototype._isSourcePlaying = function _isSourcePlaying ()
+	    {
+	        var source = this.source;
+
+	        return (source.currentTime > 0 && source.paused === false && source.ended === false && source.readyState > 2);
+	    };
+
+	    /**
+	     * Returns true if the underlying source is ready for playing.
+	     *
+	     * @private
+	     * @return {boolean} True if ready.
+	     */
+	    VideoResource.prototype._isSourceReady = function _isSourceReady ()
+	    {
+	        return this.source.readyState === 3 || this.source.readyState === 4;
+	    };
+
+	    /**
+	     * Runs the update loop when the video is ready to play
+	     *
+	     * @private
+	     */
+	    VideoResource.prototype._onPlayStart = function _onPlayStart ()
+	    {
+	        // Just in case the video has not received its can play even yet..
+	        if (!this.valid)
+	        {
+	            this._onCanPlay();
+	        }
+
+	        if (!this._isAutoUpdating && this.autoUpdate)
+	        {
+	            Ticker.shared.add(this.update, this);
+	            this._isAutoUpdating = true;
+	        }
+	    };
+
+	    /**
+	     * Fired when a pause event is triggered, stops the update loop
+	     *
+	     * @private
+	     */
+	    VideoResource.prototype._onPlayStop = function _onPlayStop ()
+	    {
+	        if (this._isAutoUpdating)
+	        {
+	            Ticker.shared.remove(this.update, this);
+	            this._isAutoUpdating = false;
+	        }
+	    };
+
+	    /**
+	     * Fired when the video is loaded and ready to play
+	     *
+	     * @private
+	     */
+	    VideoResource.prototype._onCanPlay = function _onCanPlay ()
+	    {
+	        var ref = this;
+	        var source = ref.source;
+
+	        source.removeEventListener('canplay', this._onCanPlay);
+	        source.removeEventListener('canplaythrough', this._onCanPlay);
+
+	        var valid = this.valid;
+
+	        this.resize(source.videoWidth, source.videoHeight);
+
+	        // prevent multiple loaded dispatches..
+	        if (!valid && this._resolve)
+	        {
+	            this._resolve(this);
+	            this._resolve = null;
+	        }
+
+	        if (this._isSourcePlaying())
+	        {
+	            this._onPlayStart();
+	        }
+	        else if (this.autoPlay)
+	        {
+	            source.play();
+	        }
+	    };
+
+	    /**
+	     * Destroys this texture
+	     * @override
+	     */
+	    VideoResource.prototype.dispose = function dispose ()
+	    {
+	        if (this._isAutoUpdating)
+	        {
+	            Ticker.shared.remove(this.update, this);
+	        }
+
+	        if (this.source)
+	        {
+	            this.source.removeEventListener('error', this._onError, true);
+	            this.source.pause();
+	            this.source.src = '';
+	            this.source.load();
+	        }
+	        BaseImageResource.prototype.dispose.call(this);
+	    };
+
+	    /**
+	     * Should the base texture automatically update itself, set to true by default
+	     *
+	     * @member {boolean}
+	     */
+	    prototypeAccessors.autoUpdate.get = function ()
+	    {
+	        return this._autoUpdate;
+	    };
+
+	    prototypeAccessors.autoUpdate.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        if (value !== this._autoUpdate)
+	        {
+	            this._autoUpdate = value;
+
+	            if (!this._autoUpdate && this._isAutoUpdating)
+	            {
+	                Ticker.shared.remove(this.update, this);
+	                this._isAutoUpdating = false;
+	            }
+	            else if (this._autoUpdate && !this._isAutoUpdating)
+	            {
+	                Ticker.shared.add(this.update, this);
+	                this._isAutoUpdating = true;
+	            }
+	        }
+	    };
+
+	    /**
+	     * How many times a second to update the texture from the video. Leave at 0 to update at every render.
+	     * A lower fps can help performance, as updating the texture at 60fps on a 30ps video may not be efficient.
+	     *
+	     * @member {number}
+	     */
+	    prototypeAccessors.updateFPS.get = function ()
+	    {
+	        return this._updateFPS;
+	    };
+
+	    prototypeAccessors.updateFPS.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        if (value !== this._updateFPS)
+	        {
+	            this._updateFPS = value;
+	        }
+	    };
+
+	    /**
+	     * Used to auto-detect the type of resource.
+	     *
+	     * @static
+	     * @param {*} source - The source object
+	     * @param {string} extension - The extension of source, if set
+	     * @return {boolean} `true` if video source
+	     */
+	    VideoResource.test = function test (source, extension)
+	    {
+	        return (source instanceof HTMLVideoElement)
+	            || VideoResource.TYPES.indexOf(extension) > -1;
+	    };
+
+	    Object.defineProperties( VideoResource.prototype, prototypeAccessors );
+
+	    return VideoResource;
+	}(BaseImageResource));
+
+	/**
+	 * List of common video file extensions supported by VideoResource.
+	 * @constant
+	 * @member {Array<string>}
+	 * @static
+	 * @readonly
+	 */
+	VideoResource.TYPES = ['mp4', 'm4v', 'webm', 'ogg', 'ogv', 'h264', 'avi', 'mov'];
+
+	/**
+	 * Resource type for ImageBitmap.
+	 * @class
+	 * @extends PIXI.resources.BaseImageResource
+	 * @memberof PIXI.resources
+	 * @param {ImageBitmap} source - Image element to use
+	 */
+	var ImageBitmapResource = /*@__PURE__*/(function (BaseImageResource) {
+	    function ImageBitmapResource () {
+	        BaseImageResource.apply(this, arguments);
+	    }
+
+	    if ( BaseImageResource ) { ImageBitmapResource.__proto__ = BaseImageResource; }
+	    ImageBitmapResource.prototype = Object.create( BaseImageResource && BaseImageResource.prototype );
+	    ImageBitmapResource.prototype.constructor = ImageBitmapResource;
+
+	    ImageBitmapResource.test = function test (source)
+	    {
+	        return !!window.createImageBitmap && source instanceof ImageBitmap;
+	    };
+
+	    return ImageBitmapResource;
+	}(BaseImageResource));
+
+	INSTALLED.push(
+	    ImageResource,
+	    ImageBitmapResource,
+	    CanvasResource,
+	    VideoResource,
+	    SVGResource,
+	    BufferResource,
+	    CubeResource,
+	    ArrayResource
+	);
+
+	var index = ({
+	    INSTALLED: INSTALLED,
+	    autoDetectResource: autoDetectResource,
+	    ArrayResource: ArrayResource,
+	    BufferResource: BufferResource,
+	    CanvasResource: CanvasResource,
+	    CubeResource: CubeResource,
+	    ImageResource: ImageResource,
+	    ImageBitmapResource: ImageBitmapResource,
+	    SVGResource: SVGResource,
+	    VideoResource: VideoResource,
+	    Resource: Resource,
+	    BaseImageResource: BaseImageResource
+	});
+
+	/**
+	 * System is a base class used for extending systems used by the {@link PIXI.Renderer}
+	 *
+	 * @see PIXI.Renderer#addSystem
+	 * @class
+	 * @memberof PIXI
+	 */
+	var System = function System(renderer)
+	{
+	    /**
+	     * The renderer this manager works for.
+	     *
+	     * @member {PIXI.Renderer}
+	     */
+	    this.renderer = renderer;
+	};
+
+	/**
+	 * Generic destroy methods to be overridden by the subclass
+	 */
+	System.prototype.destroy = function destroy ()
+	{
+	    this.renderer = null;
+	};
+
+	/**
+	 * Resource type for DepthTexture.
+	 * @class
+	 * @extends PIXI.resources.BufferResource
+	 * @memberof PIXI.resources
+	 */
+	var DepthResource = /*@__PURE__*/(function (BufferResource) {
+	    function DepthResource () {
+	        BufferResource.apply(this, arguments);
+	    }
+
+	    if ( BufferResource ) { DepthResource.__proto__ = BufferResource; }
+	    DepthResource.prototype = Object.create( BufferResource && BufferResource.prototype );
+	    DepthResource.prototype.constructor = DepthResource;
+
+	    DepthResource.prototype.upload = function upload (renderer, baseTexture, glTexture)
+	    {
+	        var gl = renderer.gl;
+
+	        gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, baseTexture.premultiplyAlpha);
+
+	        if (glTexture.width === baseTexture.width && glTexture.height === baseTexture.height)
+	        {
+	            gl.texSubImage2D(
+	                baseTexture.target,
+	                0,
+	                0,
+	                0,
+	                baseTexture.width,
+	                baseTexture.height,
+	                baseTexture.format,
+	                baseTexture.type,
+	                this.data
+	            );
+	        }
+	        else
+	        {
+	            glTexture.width = baseTexture.width;
+	            glTexture.height = baseTexture.height;
+
+	            gl.texImage2D(
+	                baseTexture.target,
+	                0,
+	                gl.DEPTH_COMPONENT16, // Needed for depth to render properly in webgl2.0
+	                baseTexture.width,
+	                baseTexture.height,
+	                0,
+	                baseTexture.format,
+	                baseTexture.type,
+	                this.data
+	            );
+	        }
+
+	        return true;
+	    };
+
+	    return DepthResource;
+	}(BufferResource));
+
+	/**
+	 * Frame buffer used by the BaseRenderTexture
+	 *
+	 * @class
+	 * @memberof PIXI
+	 */
+	var Framebuffer = function Framebuffer(width, height)
+	{
+	    this.width = Math.ceil(width || 100);
+	    this.height = Math.ceil(height || 100);
+
+	    this.stencil = false;
+	    this.depth = false;
+
+	    this.dirtyId = 0;
+	    this.dirtyFormat = 0;
+	    this.dirtySize = 0;
+
+	    this.depthTexture = null;
+	    this.colorTextures = [];
+
+	    this.glFramebuffers = {};
+
+	    this.disposeRunner = new Runner('disposeFramebuffer', 2);
+	};
+
+	var prototypeAccessors$1$2 = { colorTexture: { configurable: true } };
+
+	/**
+	 * Reference to the colorTexture.
+	 *
+	 * @member {PIXI.Texture[]}
+	 * @readonly
+	 */
+	prototypeAccessors$1$2.colorTexture.get = function ()
+	{
+	    return this.colorTextures[0];
+	};
+
+	/**
+	 * Add texture to the colorTexture array
+	 *
+	 * @param {number} [index=0] - Index of the array to add the texture to
+	 * @param {PIXI.Texture} [texture] - Texture to add to the array
+	 */
+	Framebuffer.prototype.addColorTexture = function addColorTexture (index, texture)
+	{
+	        if ( index === void 0 ) { index = 0; }
+
+	    // TODO add some validation to the texture - same width / height etc?
+	    this.colorTextures[index] = texture || new BaseTexture(null, { scaleMode: 0,
+	        resolution: 1,
+	        mipmap: false,
+	        width: this.width,
+	        height: this.height });// || new Texture();
+
+	    this.dirtyId++;
+	    this.dirtyFormat++;
+
+	    return this;
+	};
+
+	/**
+	 * Add a depth texture to the frame buffer
+	 *
+	 * @param {PIXI.Texture} [texture] - Texture to add
+	 */
+	Framebuffer.prototype.addDepthTexture = function addDepthTexture (texture)
+	{
+	    /* eslint-disable max-len */
+	    this.depthTexture = texture || new BaseTexture(new DepthResource(null, { width: this.width, height: this.height }), { scaleMode: 0,
+	        resolution: 1,
+	        width: this.width,
+	        height: this.height,
+	        mipmap: false,
+	        format: FORMATS.DEPTH_COMPONENT,
+	        type: TYPES.UNSIGNED_SHORT });// UNSIGNED_SHORT;
+	    /* eslint-disable max-len */
+	    this.dirtyId++;
+	    this.dirtyFormat++;
+
+	    return this;
+	};
+
+	/**
+	 * Enable depth on the frame buffer
+	 */
+	Framebuffer.prototype.enableDepth = function enableDepth ()
+	{
+	    this.depth = true;
+
+	    this.dirtyId++;
+	    this.dirtyFormat++;
+
+	    return this;
+	};
+
+	/**
+	 * Enable stencil on the frame buffer
+	 */
+	Framebuffer.prototype.enableStencil = function enableStencil ()
+	{
+	    this.stencil = true;
+
+	    this.dirtyId++;
+	    this.dirtyFormat++;
+
+	    return this;
+	};
+
+	/**
+	 * Resize the frame buffer
+	 *
+	 * @param {number} width - Width of the frame buffer to resize to
+	 * @param {number} height - Height of the frame buffer to resize to
+	 */
+	Framebuffer.prototype.resize = function resize (width, height)
+	{
+	    width = Math.ceil(width);
+	    height = Math.ceil(height);
+
+	    if (width === this.width && height === this.height) { return; }
+
+	    this.width = width;
+	    this.height = height;
+
+	    this.dirtyId++;
+	    this.dirtySize++;
+
+	    for (var i = 0; i < this.colorTextures.length; i++)
+	    {
+	        var texture = this.colorTextures[i];
+	        var resolution = texture.resolution;
+
+	        // take into acount the fact the texture may have a different resolution..
+	        texture.setSize(width / resolution, height / resolution);
+	    }
+
+	    if (this.depthTexture)
+	    {
+	        var resolution$1 = this.depthTexture.resolution;
+
+	        this.depthTexture.setSize(width / resolution$1, height / resolution$1);
+	    }
+	};
+
+	/**
+	 * disposes WebGL resources that are connected to this geometry
+	 */
+	Framebuffer.prototype.dispose = function dispose ()
+	{
+	    this.disposeRunner.run(this, false);
+	};
+
+	Object.defineProperties( Framebuffer.prototype, prototypeAccessors$1$2 );
+
+	/**
+	 * A BaseRenderTexture is a special texture that allows any PixiJS display object to be rendered to it.
+	 *
+	 * __Hint__: All DisplayObjects (i.e. Sprites) that render to a BaseRenderTexture should be preloaded
+	 * otherwise black rectangles will be drawn instead.
+	 *
+	 * A BaseRenderTexture takes a snapshot of any Display Object given to its render method. The position
+	 * and rotation of the given Display Objects is ignored. For example:
+	 *
+	 * ```js
+	 * let renderer = PIXI.autoDetectRenderer();
+	 * let baseRenderTexture = new PIXI.BaseRenderTexture({ width: 800, height: 600 });
+	 * let renderTexture = new PIXI.RenderTexture(baseRenderTexture);
+	 * let sprite = PIXI.Sprite.from("spinObj_01.png");
+	 *
+	 * sprite.position.x = 800/2;
+	 * sprite.position.y = 600/2;
+	 * sprite.anchor.x = 0.5;
+	 * sprite.anchor.y = 0.5;
+	 *
+	 * renderer.render(sprite, renderTexture);
+	 * ```
+	 *
+	 * The Sprite in this case will be rendered using its local transform. To render this sprite at 0,0
+	 * you can clear the transform
+	 *
+	 * ```js
+	 *
+	 * sprite.setTransform()
+	 *
+	 * let baseRenderTexture = new PIXI.BaseRenderTexture({ width: 100, height: 100 });
+	 * let renderTexture = new PIXI.RenderTexture(baseRenderTexture);
+	 *
+	 * renderer.render(sprite, renderTexture);  // Renders to center of RenderTexture
+	 * ```
+	 *
+	 * @class
+	 * @extends PIXI.BaseTexture
+	 * @memberof PIXI
+	 */
+	var BaseRenderTexture = /*@__PURE__*/(function (BaseTexture) {
+	    function BaseRenderTexture(options)
+	    {
+	        if (typeof options === 'number')
+	        {
+	            /* eslint-disable prefer-rest-params */
+	            // Backward compatibility of signature
+	            var width$1 = arguments[0];
+	            var height$1 = arguments[1];
+	            var scaleMode = arguments[2];
+	            var resolution = arguments[3];
+
+	            options = { width: width$1, height: height$1, scaleMode: scaleMode, resolution: resolution };
+	            /* eslint-enable prefer-rest-params */
+	        }
+
+	        BaseTexture.call(this, null, options);
+
+	        var ref = options || {};
+	        var width = ref.width;
+	        var height = ref.height;
+
+	        // Set defaults
+	        this.mipmap = false;
+	        this.width = Math.ceil(width) || 100;
+	        this.height = Math.ceil(height) || 100;
+	        this.valid = true;
+
+	        /**
+	         * A reference to the canvas render target (we only need one as this can be shared across renderers)
+	         *
+	         * @protected
+	         * @member {object}
+	         */
+	        this._canvasRenderTarget = null;
+
+	        this.clearColor = [0, 0, 0, 0];
+
+	        this.framebuffer = new Framebuffer(this.width * this.resolution, this.height * this.resolution)
+	            .addColorTexture(0, this);
+
+	        // TODO - could this be added the systems?
+
+	        /**
+	         * The data structure for the stencil masks.
+	         *
+	         * @member {PIXI.Graphics[]}
+	         */
+	        this.stencilMaskStack = [];
+
+	        /**
+	         * The data structure for the filters.
+	         *
+	         * @member {PIXI.Graphics[]}
+	         */
+	        this.filterStack = [{}];
+	    }
+
+	    if ( BaseTexture ) { BaseRenderTexture.__proto__ = BaseTexture; }
+	    BaseRenderTexture.prototype = Object.create( BaseTexture && BaseTexture.prototype );
+	    BaseRenderTexture.prototype.constructor = BaseRenderTexture;
+
+	    /**
+	     * Resizes the BaseRenderTexture.
+	     *
+	     * @param {number} width - The width to resize to.
+	     * @param {number} height - The height to resize to.
+	     */
+	    BaseRenderTexture.prototype.resize = function resize (width, height)
+	    {
+	        width = Math.ceil(width);
+	        height = Math.ceil(height);
+	        this.framebuffer.resize(width * this.resolution, height * this.resolution);
+	    };
+
+	    /**
+	     * Frees the texture and framebuffer from WebGL memory without destroying this texture object.
+	     * This means you can still use the texture later which will upload it to GPU
+	     * memory again.
+	     *
+	     * @fires PIXI.BaseTexture#dispose
+	     */
+	    BaseRenderTexture.prototype.dispose = function dispose ()
+	    {
+	        this.framebuffer.dispose();
+
+	        BaseTexture.prototype.dispose.call(this);
+	    };
+
+	    /**
+	     * Destroys this texture.
+	     *
+	     */
+	    BaseRenderTexture.prototype.destroy = function destroy ()
+	    {
+	        BaseTexture.prototype.destroy.call(this, true);
+
+	        this.framebuffer = null;
+	    };
+
+	    return BaseRenderTexture;
+	}(BaseTexture));
+
+	/**
+	 * Stores a texture's frame in UV coordinates, in
+	 * which everything lies in the rectangle `[(0,0), (1,0),
+	 * (1,1), (0,1)]`.
+	 *
+	 * | Corner       | Coordinates |
+	 * |--------------|-------------|
+	 * | Top-Left     | `(x0,y0)`   |
+	 * | Top-Right    | `(x1,y1)`   |
+	 * | Bottom-Right | `(x2,y2)`   |
+	 * | Bottom-Left  | `(x3,y3)`   |
+	 *
+	 * @class
+	 * @protected
+	 * @memberof PIXI
+	 */
+	var TextureUvs = function TextureUvs()
+	{
+	    /**
+	     * X-component of top-left corner `(x0,y0)`.
+	     *
+	     * @member {number}
+	     */
+	    this.x0 = 0;
+
+	    /**
+	     * Y-component of top-left corner `(x0,y0)`.
+	     *
+	     * @member {number}
+	     */
+	    this.y0 = 0;
+
+	    /**
+	     * X-component of top-right corner `(x1,y1)`.
+	     *
+	     * @member {number}
+	     */
+	    this.x1 = 1;
+
+	    /**
+	     * Y-component of top-right corner `(x1,y1)`.
+	     *
+	     * @member {number}
+	     */
+	    this.y1 = 0;
+
+	    /**
+	     * X-component of bottom-right corner `(x2,y2)`.
+	     *
+	     * @member {number}
+	     */
+	    this.x2 = 1;
+
+	    /**
+	     * Y-component of bottom-right corner `(x2,y2)`.
+	     *
+	     * @member {number}
+	     */
+	    this.y2 = 1;
+
+	    /**
+	     * X-component of bottom-left corner `(x3,y3)`.
+	     *
+	     * @member {number}
+	     */
+	    this.x3 = 0;
+
+	    /**
+	     * Y-component of bottom-right corner `(x3,y3)`.
+	     *
+	     * @member {number}
+	     */
+	    this.y3 = 1;
+
+	    this.uvsFloat32 = new Float32Array(8);
+	};
+
+	/**
+	 * Sets the texture Uvs based on the given frame information.
+	 *
+	 * @protected
+	 * @param {PIXI.Rectangle} frame - The frame of the texture
+	 * @param {PIXI.Rectangle} baseFrame - The base frame of the texture
+	 * @param {number} rotate - Rotation of frame, see {@link PIXI.GroupD8}
+	 */
+	TextureUvs.prototype.set = function set (frame, baseFrame, rotate)
+	{
+	    var tw = baseFrame.width;
+	    var th = baseFrame.height;
+
+	    if (rotate)
+	    {
+	        // width and height div 2 div baseFrame size
+	        var w2 = frame.width / 2 / tw;
+	        var h2 = frame.height / 2 / th;
+
+	        // coordinates of center
+	        var cX = (frame.x / tw) + w2;
+	        var cY = (frame.y / th) + h2;
+
+	        rotate = GroupD8.add(rotate, GroupD8.NW); // NW is top-left corner
+	        this.x0 = cX + (w2 * GroupD8.uX(rotate));
+	        this.y0 = cY + (h2 * GroupD8.uY(rotate));
+
+	        rotate = GroupD8.add(rotate, 2); // rotate 90 degrees clockwise
+	        this.x1 = cX + (w2 * GroupD8.uX(rotate));
+	        this.y1 = cY + (h2 * GroupD8.uY(rotate));
+
+	        rotate = GroupD8.add(rotate, 2);
+	        this.x2 = cX + (w2 * GroupD8.uX(rotate));
+	        this.y2 = cY + (h2 * GroupD8.uY(rotate));
+
+	        rotate = GroupD8.add(rotate, 2);
+	        this.x3 = cX + (w2 * GroupD8.uX(rotate));
+	        this.y3 = cY + (h2 * GroupD8.uY(rotate));
+	    }
+	    else
+	    {
+	        this.x0 = frame.x / tw;
+	        this.y0 = frame.y / th;
+
+	        this.x1 = (frame.x + frame.width) / tw;
+	        this.y1 = frame.y / th;
+
+	        this.x2 = (frame.x + frame.width) / tw;
+	        this.y2 = (frame.y + frame.height) / th;
+
+	        this.x3 = frame.x / tw;
+	        this.y3 = (frame.y + frame.height) / th;
+	    }
+
+	    this.uvsFloat32[0] = this.x0;
+	    this.uvsFloat32[1] = this.y0;
+	    this.uvsFloat32[2] = this.x1;
+	    this.uvsFloat32[3] = this.y1;
+	    this.uvsFloat32[4] = this.x2;
+	    this.uvsFloat32[5] = this.y2;
+	    this.uvsFloat32[6] = this.x3;
+	    this.uvsFloat32[7] = this.y3;
+	};
+
+	var DEFAULT_UVS = new TextureUvs();
+
+	/**
+	 * A texture stores the information that represents an image or part of an image.
+	 *
+	 * It cannot be added to the display list directly; instead use it as the texture for a Sprite.
+	 * If no frame is provided for a texture, then the whole image is used.
+	 *
+	 * You can directly create a texture from an image and then reuse it multiple times like this :
+	 *
+	 * ```js
+	 * let texture = PIXI.Texture.from('assets/image.png');
+	 * let sprite1 = new PIXI.Sprite(texture);
+	 * let sprite2 = new PIXI.Sprite(texture);
+	 * ```
+	 *
+	 * If you didnt pass the texture frame to constructor, it enables `noFrame` mode:
+	 * it subscribes on baseTexture events, it automatically resizes at the same time as baseTexture.
+	 *
+	 * Textures made from SVGs, loaded or not, cannot be used before the file finishes processing.
+	 * You can check for this by checking the sprite's _textureID property.
+	 * ```js
+	 * var texture = PIXI.Texture.from('assets/image.svg');
+	 * var sprite1 = new PIXI.Sprite(texture);
+	 * //sprite1._textureID should not be undefined if the texture has finished processing the SVG file
+	 * ```
+	 * You can use a ticker or rAF to ensure your sprites load the finished textures after processing. See issue #3068.
+	 *
+	 * @class
+	 * @extends PIXI.utils.EventEmitter
+	 * @memberof PIXI
+	 */
+	var Texture = /*@__PURE__*/(function (EventEmitter) {
+	    function Texture(baseTexture, frame, orig, trim, rotate, anchor)
+	    {
+	        EventEmitter.call(this);
+
+	        /**
+	         * Does this Texture have any frame data assigned to it?
+	         *
+	         * This mode is enabled automatically if no frame was passed inside constructor.
+	         *
+	         * In this mode texture is subscribed to baseTexture events, and fires `update` on any change.
+	         *
+	         * Beware, after loading or resize of baseTexture event can fired two times!
+	         * If you want more control, subscribe on baseTexture itself.
+	         *
+	         * ```js
+	         * texture.on('update', () => {});
+	         * ```
+	         *
+	         * Any assignment of `frame` switches off `noFrame` mode.
+	         *
+	         * @member {boolean}
+	         */
+	        this.noFrame = false;
+
+	        if (!frame)
+	        {
+	            this.noFrame = true;
+	            frame = new Rectangle(0, 0, 1, 1);
+	        }
+
+	        if (baseTexture instanceof Texture)
+	        {
+	            baseTexture = baseTexture.baseTexture;
+	        }
+
+	        /**
+	         * The base texture that this texture uses.
+	         *
+	         * @member {PIXI.BaseTexture}
+	         */
+	        this.baseTexture = baseTexture;
+
+	        /**
+	         * This is the area of the BaseTexture image to actually copy to the Canvas / WebGL when rendering,
+	         * irrespective of the actual frame size or placement (which can be influenced by trimmed texture atlases)
+	         *
+	         * @member {PIXI.Rectangle}
+	         */
+	        this._frame = frame;
+
+	        /**
+	         * This is the trimmed area of original texture, before it was put in atlas
+	         * Please call `updateUvs()` after you change coordinates of `trim` manually.
+	         *
+	         * @member {PIXI.Rectangle}
+	         */
+	        this.trim = trim;
+
+	        /**
+	         * This will let the renderer know if the texture is valid. If it's not then it cannot be rendered.
+	         *
+	         * @member {boolean}
+	         */
+	        this.valid = false;
+
+	        /**
+	         * This will let a renderer know that a texture has been updated (used mainly for WebGL uv updates)
+	         *
+	         * @member {boolean}
+	         */
+	        this.requiresUpdate = false;
+
+	        /**
+	         * The WebGL UV data cache. Can be used as quad UV
+	         *
+	         * @member {PIXI.TextureUvs}
+	         * @protected
+	         */
+	        this._uvs = DEFAULT_UVS;
+
+	        /**
+	         * Default TextureMatrix instance for this texture
+	         * By default that object is not created because its heavy
+	         *
+	         * @member {PIXI.TextureMatrix}
+	         */
+	        this.uvMatrix = null;
+
+	        /**
+	         * This is the area of original texture, before it was put in atlas
+	         *
+	         * @member {PIXI.Rectangle}
+	         */
+	        this.orig = orig || frame;// new Rectangle(0, 0, 1, 1);
+
+	        this._rotate = Number(rotate || 0);
+
+	        if (rotate === true)
+	        {
+	            // this is old texturepacker legacy, some games/libraries are passing "true" for rotated textures
+	            this._rotate = 2;
+	        }
+	        else if (this._rotate % 2 !== 0)
+	        {
+	            throw new Error('attempt to use diamond-shaped UVs. If you are sure, set rotation manually');
+	        }
+
+	        /**
+	         * Anchor point that is used as default if sprite is created with this texture.
+	         * Changing the `defaultAnchor` at a later point of time will not update Sprite's anchor point.
+	         * @member {PIXI.Point}
+	         * @default {0,0}
+	         */
+	        this.defaultAnchor = anchor ? new Point(anchor.x, anchor.y) : new Point(0, 0);
+
+	        /**
+	         * Update ID is observed by sprites and TextureMatrix instances.
+	         * Call updateUvs() to increment it.
+	         *
+	         * @member {number}
+	         * @protected
+	         */
+
+	        this._updateID = 0;
+
+	        /**
+	         * The ids under which this Texture has been added to the texture cache. This is
+	         * automatically set as long as Texture.addToCache is used, but may not be set if a
+	         * Texture is added directly to the TextureCache array.
+	         *
+	         * @member {string[]}
+	         */
+	        this.textureCacheIds = [];
+
+	        if (!baseTexture.valid)
+	        {
+	            baseTexture.once('loaded', this.onBaseTextureUpdated, this);
+	        }
+	        else if (this.noFrame)
+	        {
+	            // if there is no frame we should monitor for any base texture changes..
+	            if (baseTexture.valid)
+	            {
+	                this.onBaseTextureUpdated(baseTexture);
+	            }
+	        }
+	        else
+	        {
+	            this.frame = frame;
+	        }
+
+	        if (this.noFrame)
+	        {
+	            baseTexture.on('update', this.onBaseTextureUpdated, this);
+	        }
+	    }
+
+	    if ( EventEmitter ) { Texture.__proto__ = EventEmitter; }
+	    Texture.prototype = Object.create( EventEmitter && EventEmitter.prototype );
+	    Texture.prototype.constructor = Texture;
+
+	    var prototypeAccessors = { resolution: { configurable: true },frame: { configurable: true },rotate: { configurable: true },width: { configurable: true },height: { configurable: true } };
+
+	    /**
+	     * Updates this texture on the gpu.
+	     *
+	     * Calls the TextureResource update.
+	     *
+	     * If you adjusted `frame` manually, please call `updateUvs()` instead.
+	     *
+	     */
+	    Texture.prototype.update = function update ()
+	    {
+	        if (this.baseTexture.resource)
+	        {
+	            this.baseTexture.resource.update();
+	        }
+	    };
+
+	    /**
+	     * Called when the base texture is updated
+	     *
+	     * @protected
+	     * @param {PIXI.BaseTexture} baseTexture - The base texture.
+	     */
+	    Texture.prototype.onBaseTextureUpdated = function onBaseTextureUpdated (baseTexture)
+	    {
+	        if (this.noFrame)
+	        {
+	            if (!this.baseTexture.valid)
+	            {
+	                return;
+	            }
+
+	            this._frame.width = baseTexture.width;
+	            this._frame.height = baseTexture.height;
+	            this.valid = true;
+	            this.updateUvs();
+	        }
+	        else
+	        {
+	            // TODO this code looks confusing.. boo to abusing getters and setters!
+	            // if user gave us frame that has bigger size than resized texture it can be a problem
+	            this.frame = this._frame;
+	        }
+
+	        this.emit('update', this);
+	    };
+
+	    /**
+	     * Destroys this texture
+	     *
+	     * @param {boolean} [destroyBase=false] Whether to destroy the base texture as well
+	     */
+	    Texture.prototype.destroy = function destroy (destroyBase)
+	    {
+	        if (this.baseTexture)
+	        {
+	            if (destroyBase)
+	            {
+	                var ref = this.baseTexture;
+	                var resource = ref.resource;
+
+	                // delete the texture if it exists in the texture cache..
+	                // this only needs to be removed if the base texture is actually destroyed too..
+	                if (resource && TextureCache[resource.url])
+	                {
+	                    Texture.removeFromCache(resource.url);
+	                }
+
+	                this.baseTexture.destroy();
+	            }
+
+	            this.baseTexture.off('update', this.onBaseTextureUpdated, this);
+
+	            this.baseTexture = null;
+	        }
+
+	        this._frame = null;
+	        this._uvs = null;
+	        this.trim = null;
+	        this.orig = null;
+
+	        this.valid = false;
+
+	        Texture.removeFromCache(this);
+	        this.textureCacheIds = null;
+	    };
+
+	    /**
+	     * Creates a new texture object that acts the same as this one.
+	     *
+	     * @return {PIXI.Texture} The new texture
+	     */
+	    Texture.prototype.clone = function clone ()
+	    {
+	        return new Texture(this.baseTexture, this.frame, this.orig, this.trim, this.rotate, this.defaultAnchor);
+	    };
+
+	    /**
+	     * Updates the internal WebGL UV cache. Use it after you change `frame` or `trim` of the texture.
+	     * Call it after changing the frame
+	     */
+	    Texture.prototype.updateUvs = function updateUvs ()
+	    {
+	        if (this._uvs === DEFAULT_UVS)
+	        {
+	            this._uvs = new TextureUvs();
+	        }
+
+	        this._uvs.set(this._frame, this.baseTexture, this.rotate);
+
+	        this._updateID++;
+	    };
+
+	    /**
+	     * Helper function that creates a new Texture based on the source you provide.
+	     * The source can be - frame id, image url, video url, canvas element, video element, base texture
+	     *
+	     * @static
+	     * @param {number|string|HTMLImageElement|HTMLCanvasElement|HTMLVideoElement|PIXI.BaseTexture} source
+	     *        Source to create texture from
+	     * @param {object} [options] See {@link PIXI.BaseTexture}'s constructor for options.
+	     * @return {PIXI.Texture} The newly created texture
+	     */
+	    Texture.from = function from (source, options)
+	    {
+	        if ( options === void 0 ) { options = {}; }
+
+	        var cacheId = null;
+
+	        if (typeof source === 'string')
+	        {
+	            cacheId = source;
+	        }
+	        else
+	        {
+	            if (!source._pixiId)
+	            {
+	                source._pixiId = "pixiid_" + (uid());
+	            }
+
+	            cacheId = source._pixiId;
+	        }
+
+	        var texture = TextureCache[cacheId];
+
+	        if (!texture)
+	        {
+	            if (!options.resolution)
+	            {
+	                options.resolution = getResolutionOfUrl(source);
+	            }
+
+	            texture = new Texture(new BaseTexture(source, options));
+	            texture.baseTexture.cacheId = cacheId;
+
+	            BaseTexture.addToCache(texture.baseTexture, cacheId);
+	            Texture.addToCache(texture, cacheId);
+	        }
+
+	        // lets assume its a base texture!
+	        return texture;
+	    };
+
+	    /**
+	     * Create a new Texture with a BufferResource from a Float32Array.
+	     * RGBA values are floats from 0 to 1.
+	     * @static
+	     * @param {Float32Array|Uint8Array} buffer The optional array to use, if no data
+	     *        is provided, a new Float32Array is created.
+	     * @param {number} width - Width of the resource
+	     * @param {number} height - Height of the resource
+	     * @param {object} [options] See {@link PIXI.BaseTexture}'s constructor for options.
+	     * @return {PIXI.Texture} The resulting new BaseTexture
+	     */
+	    Texture.fromBuffer = function fromBuffer (buffer, width, height, options)
+	    {
+	        return new Texture(BaseTexture.fromBuffer(buffer, width, height, options));
+	    };
+
+	    /**
+	     * Create a texture from a source and add to the cache.
+	     *
+	     * @static
+	     * @param {HTMLImageElement|HTMLCanvasElement} source - The input source.
+	     * @param {String} imageUrl - File name of texture, for cache and resolving resolution.
+	     * @param {String} [name] - Human readable name for the texture cache. If no name is
+	     *        specified, only `imageUrl` will be used as the cache ID.
+	     * @return {PIXI.Texture} Output texture
+	     */
+	    Texture.fromLoader = function fromLoader (source, imageUrl, name)
+	    {
+	        var resource = new ImageResource(source);
+
+	        resource.url = imageUrl;
+
+	        var baseTexture = new BaseTexture(resource, {
+	            scaleMode: settings.SCALE_MODE,
+	            resolution: getResolutionOfUrl(imageUrl),
+	        });
+
+	        var texture = new Texture(baseTexture);
+
+	        // No name, use imageUrl instead
+	        if (!name)
+	        {
+	            name = imageUrl;
+	        }
+
+	        // lets also add the frame to pixi's global cache for 'fromLoader' function
+	        BaseTexture.addToCache(texture.baseTexture, name);
+	        Texture.addToCache(texture, name);
+
+	        // also add references by url if they are different.
+	        if (name !== imageUrl)
+	        {
+	            BaseTexture.addToCache(texture.baseTexture, imageUrl);
+	            Texture.addToCache(texture, imageUrl);
+	        }
+
+	        return texture;
+	    };
+
+	    /**
+	     * Adds a Texture to the global TextureCache. This cache is shared across the whole PIXI object.
+	     *
+	     * @static
+	     * @param {PIXI.Texture} texture - The Texture to add to the cache.
+	     * @param {string} id - The id that the Texture will be stored against.
+	     */
+	    Texture.addToCache = function addToCache (texture, id)
+	    {
+	        if (id)
+	        {
+	            if (texture.textureCacheIds.indexOf(id) === -1)
+	            {
+	                texture.textureCacheIds.push(id);
+	            }
+
+	            if (TextureCache[id])
+	            {
+	                // eslint-disable-next-line no-console
+	                console.warn(("Texture added to the cache with an id [" + id + "] that already had an entry"));
+	            }
+
+	            TextureCache[id] = texture;
+	        }
+	    };
+
+	    /**
+	     * Remove a Texture from the global TextureCache.
+	     *
+	     * @static
+	     * @param {string|PIXI.Texture} texture - id of a Texture to be removed, or a Texture instance itself
+	     * @return {PIXI.Texture|null} The Texture that was removed
+	     */
+	    Texture.removeFromCache = function removeFromCache (texture)
+	    {
+	        if (typeof texture === 'string')
+	        {
+	            var textureFromCache = TextureCache[texture];
+
+	            if (textureFromCache)
+	            {
+	                var index = textureFromCache.textureCacheIds.indexOf(texture);
+
+	                if (index > -1)
+	                {
+	                    textureFromCache.textureCacheIds.splice(index, 1);
+	                }
+
+	                delete TextureCache[texture];
+
+	                return textureFromCache;
+	            }
+	        }
+	        else if (texture && texture.textureCacheIds)
+	        {
+	            for (var i = 0; i < texture.textureCacheIds.length; ++i)
+	            {
+	                // Check that texture matches the one being passed in before deleting it from the cache.
+	                if (TextureCache[texture.textureCacheIds[i]] === texture)
+	                {
+	                    delete TextureCache[texture.textureCacheIds[i]];
+	                }
+	            }
+
+	            texture.textureCacheIds.length = 0;
+
+	            return texture;
+	        }
+
+	        return null;
+	    };
+
+	    /**
+	     * Returns resolution of baseTexture
+	     *
+	     * @member {number}
+	     * @readonly
+	     */
+	    prototypeAccessors.resolution.get = function ()
+	    {
+	        return this.baseTexture.resolution;
+	    };
+
+	    /**
+	     * The frame specifies the region of the base texture that this texture uses.
+	     * Please call `updateUvs()` after you change coordinates of `frame` manually.
+	     *
+	     * @member {PIXI.Rectangle}
+	     */
+	    prototypeAccessors.frame.get = function ()
+	    {
+	        return this._frame;
+	    };
+
+	    prototypeAccessors.frame.set = function (frame) // eslint-disable-line require-jsdoc
+	    {
+	        this._frame = frame;
+
+	        this.noFrame = false;
+
+	        var x = frame.x;
+	        var y = frame.y;
+	        var width = frame.width;
+	        var height = frame.height;
+	        var xNotFit = x + width > this.baseTexture.width;
+	        var yNotFit = y + height > this.baseTexture.height;
+
+	        if (xNotFit || yNotFit)
+	        {
+	            var relationship = xNotFit && yNotFit ? 'and' : 'or';
+	            var errorX = "X: " + x + " + " + width + " = " + (x + width) + " > " + (this.baseTexture.width);
+	            var errorY = "Y: " + y + " + " + height + " = " + (y + height) + " > " + (this.baseTexture.height);
+
+	            throw new Error('Texture Error: frame does not fit inside the base Texture dimensions: '
+	                + errorX + " " + relationship + " " + errorY);
+	        }
+
+	        this.valid = width && height && this.baseTexture.valid;
+
+	        if (!this.trim && !this.rotate)
+	        {
+	            this.orig = frame;
+	        }
+
+	        if (this.valid)
+	        {
+	            this.updateUvs();
+	        }
+	    };
+
+	    /**
+	     * Indicates whether the texture is rotated inside the atlas
+	     * set to 2 to compensate for texture packer rotation
+	     * set to 6 to compensate for spine packer rotation
+	     * can be used to rotate or mirror sprites
+	     * See {@link PIXI.GroupD8} for explanation
+	     *
+	     * @member {number}
+	     */
+	    prototypeAccessors.rotate.get = function ()
+	    {
+	        return this._rotate;
+	    };
+
+	    prototypeAccessors.rotate.set = function (rotate) // eslint-disable-line require-jsdoc
+	    {
+	        this._rotate = rotate;
+	        if (this.valid)
+	        {
+	            this.updateUvs();
+	        }
+	    };
+
+	    /**
+	     * The width of the Texture in pixels.
+	     *
+	     * @member {number}
+	     */
+	    prototypeAccessors.width.get = function ()
+	    {
+	        return this.orig.width;
+	    };
+
+	    /**
+	     * The height of the Texture in pixels.
+	     *
+	     * @member {number}
+	     */
+	    prototypeAccessors.height.get = function ()
+	    {
+	        return this.orig.height;
+	    };
+
+	    Object.defineProperties( Texture.prototype, prototypeAccessors );
+
+	    return Texture;
+	}(eventemitter3));
+
+	function createWhiteTexture()
+	{
+	    var canvas = document.createElement('canvas');
+
+	    canvas.width = 16;
+	    canvas.height = 16;
+
+	    var context = canvas.getContext('2d');
+
+	    context.fillStyle = 'white';
+	    context.fillRect(0, 0, 16, 16);
+
+	    return new Texture(new BaseTexture(new CanvasResource(canvas)));
+	}
+
+	function removeAllHandlers(tex)
+	{
+	    tex.destroy = function _emptyDestroy() { /* empty */ };
+	    tex.on = function _emptyOn() { /* empty */ };
+	    tex.once = function _emptyOnce() { /* empty */ };
+	    tex.emit = function _emptyEmit() { /* empty */ };
+	}
+
+	/**
+	 * An empty texture, used often to not have to create multiple empty textures.
+	 * Can not be destroyed.
+	 *
+	 * @static
+	 * @constant
+	 * @member {PIXI.Texture}
+	 */
+	Texture.EMPTY = new Texture(new BaseTexture());
+	removeAllHandlers(Texture.EMPTY);
+	removeAllHandlers(Texture.EMPTY.baseTexture);
+
+	/**
+	 * A white texture of 16x16 size, used for graphics and other things
+	 * Can not be destroyed.
+	 *
+	 * @static
+	 * @constant
+	 * @member {PIXI.Texture}
+	 */
+	Texture.WHITE = createWhiteTexture();
+	removeAllHandlers(Texture.WHITE);
+	removeAllHandlers(Texture.WHITE.baseTexture);
+
+	/**
+	 * A RenderTexture is a special texture that allows any PixiJS display object to be rendered to it.
+	 *
+	 * __Hint__: All DisplayObjects (i.e. Sprites) that render to a RenderTexture should be preloaded
+	 * otherwise black rectangles will be drawn instead.
+	 *
+	 * __Hint-2__: The actual memory allocation will happen on first render.
+	 * You shouldn't create renderTextures each frame just to delete them after, try to reuse them.
+	 *
+	 * A RenderTexture takes a snapshot of any Display Object given to its render method. For example:
+	 *
+	 * ```js
+	 * let renderer = PIXI.autoDetectRenderer();
+	 * let renderTexture = PIXI.RenderTexture.create(800, 600);
+	 * let sprite = PIXI.Sprite.from("spinObj_01.png");
+	 *
+	 * sprite.position.x = 800/2;
+	 * sprite.position.y = 600/2;
+	 * sprite.anchor.x = 0.5;
+	 * sprite.anchor.y = 0.5;
+	 *
+	 * renderer.render(sprite, renderTexture);
+	 * ```
+	 *
+	 * The Sprite in this case will be rendered using its local transform. To render this sprite at 0,0
+	 * you can clear the transform
+	 *
+	 * ```js
+	 *
+	 * sprite.setTransform()
+	 *
+	 * let renderTexture = new PIXI.RenderTexture.create(100, 100);
+	 *
+	 * renderer.render(sprite, renderTexture);  // Renders to center of RenderTexture
+	 * ```
+	 *
+	 * @class
+	 * @extends PIXI.Texture
+	 * @memberof PIXI
+	 */
+	var RenderTexture = /*@__PURE__*/(function (Texture) {
+	    function RenderTexture(baseRenderTexture, frame)
+	    {
+	        // support for legacy..
+	        var _legacyRenderer = null;
+
+	        if (!(baseRenderTexture instanceof BaseRenderTexture))
+	        {
+	            /* eslint-disable prefer-rest-params, no-console */
+	            var width = arguments[1];
+	            var height = arguments[2];
+	            var scaleMode = arguments[3];
+	            var resolution = arguments[4];
+
+	            // we have an old render texture..
+	            console.warn(("Please use RenderTexture.create(" + width + ", " + height + ") instead of the ctor directly."));
+	            _legacyRenderer = arguments[0];
+	            /* eslint-enable prefer-rest-params, no-console */
+
+	            frame = null;
+	            baseRenderTexture = new BaseRenderTexture({
+	                width: width,
+	                height: height,
+	                scaleMode: scaleMode,
+	                resolution: resolution,
+	            });
+	        }
+
+	        /**
+	         * The base texture object that this texture uses
+	         *
+	         * @member {PIXI.BaseTexture}
+	         */
+	        Texture.call(this, baseRenderTexture, frame);
+
+	        this.legacyRenderer = _legacyRenderer;
+
+	        /**
+	         * This will let the renderer know if the texture is valid. If it's not then it cannot be rendered.
+	         *
+	         * @member {boolean}
+	         */
+	        this.valid = true;
+
+	        /**
+	         * Stores `sourceFrame` when this texture is inside current filter stack.
+	         * You can read it inside filters.
+	         *
+	         * @readonly
+	         * @member {PIXI.Rectangle}
+	         */
+	        this.filterFrame = null;
+
+	        /**
+	         * The key for pooled texture of FilterSystem
+	         * @protected
+	         * @member {string}
+	         */
+	        this.filterPoolKey = null;
+
+	        this.updateUvs();
+	    }
+
+	    if ( Texture ) { RenderTexture.__proto__ = Texture; }
+	    RenderTexture.prototype = Object.create( Texture && Texture.prototype );
+	    RenderTexture.prototype.constructor = RenderTexture;
+
+	    /**
+	     * Resizes the RenderTexture.
+	     *
+	     * @param {number} width - The width to resize to.
+	     * @param {number} height - The height to resize to.
+	     * @param {boolean} [resizeBaseTexture=true] - Should the baseTexture.width and height values be resized as well?
+	     */
+	    RenderTexture.prototype.resize = function resize (width, height, resizeBaseTexture)
+	    {
+	        if ( resizeBaseTexture === void 0 ) { resizeBaseTexture = true; }
+
+	        width = Math.ceil(width);
+	        height = Math.ceil(height);
+
+	        // TODO - could be not required..
+	        this.valid = (width > 0 && height > 0);
+
+	        this._frame.width = this.orig.width = width;
+	        this._frame.height = this.orig.height = height;
+
+	        if (resizeBaseTexture)
+	        {
+	            this.baseTexture.resize(width, height);
+	        }
+
+	        this.updateUvs();
+	    };
+
+	    /**
+	     * Changes the resolution of baseTexture, but does not change framebuffer size.
+	     *
+	     * @param {number} resolution - The new resolution to apply to RenderTexture
+	     */
+	    RenderTexture.prototype.setResolution = function setResolution (resolution)
+	    {
+	        var ref = this;
+	        var baseTexture = ref.baseTexture;
+
+	        if (baseTexture.resolution === resolution)
+	        {
+	            return;
+	        }
+
+	        baseTexture.setResolution(resolution);
+	        this.resize(baseTexture.width, baseTexture.height, false);
+	    };
+
+	    /**
+	     * A short hand way of creating a render texture.
+	     *
+	     * @param {object} [options] - Options
+	     * @param {number} [options.width=100] - The width of the render texture
+	     * @param {number} [options.height=100] - The height of the render texture
+	     * @param {number} [options.scaleMode=PIXI.settings.SCALE_MODE] - See {@link PIXI.SCALE_MODES} for possible values
+	     * @param {number} [options.resolution=1] - The resolution / device pixel ratio of the texture being generated
+	     * @return {PIXI.RenderTexture} The new render texture
+	     */
+	    RenderTexture.create = function create (options)
+	    {
+	        // fallback, old-style: create(width, height, scaleMode, resolution)
+	        if (typeof options === 'number')
+	        {
+	            /* eslint-disable prefer-rest-params */
+	            options = {
+	                width: options,
+	                height: arguments[1],
+	                scaleMode: arguments[2],
+	                resolution: arguments[3],
+	            };
+	            /* eslint-enable prefer-rest-params */
+	        }
+
+	        return new RenderTexture(new BaseRenderTexture(options));
+	    };
+
+	    return RenderTexture;
+	}(Texture));
+
+	/**
+	 * Experimental!
+	 *
+	 * Texture pool, used by FilterSystem and plugins
+	 * Stores collection of temporary pow2 or screen-sized renderTextures
+	 *
+	 * If you use custom RenderTexturePool for your filters, you can use methods
+	 * `getFilterTexture` and `returnFilterTexture` same as in
+	 *
+	 * @class
+	 * @memberof PIXI
+	 */
+	var RenderTexturePool = function RenderTexturePool(textureOptions)
+	{
+	    this.texturePool = {};
+	    this.textureOptions = textureOptions || {};
+	    /**
+	     * Allow renderTextures of the same size as screen, not just pow2
+	     *
+	     * Automatically sets to true after `setScreenSize`
+	     *
+	     * @member {boolean}
+	     * @default false
+	     */
+	    this.enableFullScreen = false;
+
+	    this._pixelsWidth = 0;
+	    this._pixelsHeight = 0;
+	};
+
+	/**
+	 * creates of texture with params that were specified in pool constructor
+	 *
+	 * @param {number} realWidth width of texture in pixels
+	 * @param {number} realHeight height of texture in pixels
+	 * @returns {RenderTexture}
+	 */
+	RenderTexturePool.prototype.createTexture = function createTexture (realWidth, realHeight)
+	{
+	    var baseRenderTexture = new BaseRenderTexture(Object.assign({
+	        width: realWidth,
+	        height: realHeight,
+	        resolution: 1,
+	    }, this.textureOptions));
+
+	    return new RenderTexture(baseRenderTexture);
+	};
+
+	/**
+	 * Gets a Power-of-Two render texture or fullScreen texture
+	 *
+	 * @protected
+	 * @param {number} minWidth - The minimum width of the render texture in real pixels.
+	 * @param {number} minHeight - The minimum height of the render texture in real pixels.
+	 * @param {number} [resolution=1] - The resolution of the render texture.
+	 * @return {PIXI.RenderTexture} The new render texture.
+	 */
+	RenderTexturePool.prototype.getOptimalTexture = function getOptimalTexture (minWidth, minHeight, resolution)
+	{
+	        if ( resolution === void 0 ) { resolution = 1; }
+
+	    var key = RenderTexturePool.SCREEN_KEY;
+
+	    minWidth *= resolution;
+	    minHeight *= resolution;
+
+	    if (!this.enableFullScreen || minWidth !== this._pixelsWidth || minHeight !== this._pixelsHeight)
+	    {
+	        minWidth = nextPow2(minWidth);
+	        minHeight = nextPow2(minHeight);
+	        key = ((minWidth & 0xFFFF) << 16) | (minHeight & 0xFFFF);
+	    }
+
+	    if (!this.texturePool[key])
+	    {
+	        this.texturePool[key] = [];
+	    }
+
+	    var renderTexture = this.texturePool[key].pop();
+
+	    if (!renderTexture)
+	    {
+	        renderTexture = this.createTexture(minWidth, minHeight);
+	    }
+
+	    renderTexture.filterPoolKey = key;
+	    renderTexture.setResolution(resolution);
+
+	    return renderTexture;
+	};
+
+	/**
+	 * Gets extra texture of the same size as input renderTexture
+	 *
+	 * `getFilterTexture(input, 0.5)` or `getFilterTexture(0.5, input)`
+	 *
+	 * @param {PIXI.RenderTexture} input renderTexture from which size and resolution will be copied
+	 * @param {number} [resolution] override resolution of the renderTexture
+	 *  It overrides, it does not multiply
+	 * @returns {PIXI.RenderTexture}
+	 */
+	RenderTexturePool.prototype.getFilterTexture = function getFilterTexture (input, resolution)
+	{
+	    var filterTexture = this.getOptimalTexture(input.width, input.height, resolution || input.resolution);
+
+	    filterTexture.filterFrame = input.filterFrame;
+
+	    return filterTexture;
+	};
+
+	/**
+	 * Place a render texture back into the pool.
+	 * @param {PIXI.RenderTexture} renderTexture - The renderTexture to free
+	 */
+	RenderTexturePool.prototype.returnTexture = function returnTexture (renderTexture)
+	{
+	    var key = renderTexture.filterPoolKey;
+
+	    renderTexture.filterFrame = null;
+	    this.texturePool[key].push(renderTexture);
+	};
+
+	/**
+	 * Alias for returnTexture, to be compliant with FilterSystem interface
+	 * @param {PIXI.RenderTexture} renderTexture - The renderTexture to free
+	 */
+	RenderTexturePool.prototype.returnFilterTexture = function returnFilterTexture (renderTexture)
+	{
+	    this.returnTexture(renderTexture);
+	};
+
+	/**
+	 * Clears the pool
+	 *
+	 * @param {boolean} [destroyTextures=true] destroy all stored textures
+	 */
+	RenderTexturePool.prototype.clear = function clear (destroyTextures)
+	{
+	    destroyTextures = destroyTextures !== false;
+	    if (destroyTextures)
+	    {
+	        for (var i in this.texturePool)
+	        {
+	            var textures = this.texturePool[i];
+
+	            if (textures)
+	            {
+	                for (var j = 0; j < textures.length; j++)
+	                {
+	                    textures[j].destroy(true);
+	                }
+	            }
+	        }
+	    }
+
+	    this.texturePool = {};
+	};
+
+	/**
+	 * If screen size was changed, drops all screen-sized textures,
+	 * sets new screen size, sets `enableFullScreen` to true
+	 *
+	 * Size is measured in pixels, `renderer.view` can be passed here, not `renderer.screen`
+	 *
+	 * @param {PIXI.ISize} size - Initial size of screen
+	 */
+	RenderTexturePool.prototype.setScreenSize = function setScreenSize (size)
+	{
+	    if (size.width === this._pixelsWidth
+	        && size.height === this._pixelsHeight)
+	    {
+	        return;
+	    }
+
+	    var screenKey = RenderTexturePool.SCREEN_KEY;
+	    var textures = this.texturePool[screenKey];
+
+	    this.enableFullScreen = size.width > 0 && size.height > 0;
+
+	    if (textures)
+	    {
+	        for (var j = 0; j < textures.length; j++)
+	        {
+	            textures[j].destroy(true);
+	        }
+	    }
+	    this.texturePool[screenKey] = [];
+
+	    this._pixelsWidth = size.width;
+	    this._pixelsHeight = size.height;
+	};
+
+	/**
+	 * Key that is used to store fullscreen renderTextures in a pool
+	 *
+	 * @static
+	 * @const {string}
+	 */
+	RenderTexturePool.SCREEN_KEY = 'screen';
+
+	/* eslint-disable max-len */
+
+	/**
+	 * Holds the information for a single attribute structure required to render geometry.
+	 *
+	 * This does not contain the actual data, but instead has a buffer id that maps to a {@link PIXI.Buffer}
+	 * This can include anything from positions, uvs, normals, colors etc.
+	 *
+	 * @class
+	 * @memberof PIXI
+	 */
+	var Attribute = function Attribute(buffer, size, normalized, type, stride, start, instance)
+	{
+	    if ( normalized === void 0 ) { normalized = false; }
+	    if ( type === void 0 ) { type = 5126; }
+
+	    this.buffer = buffer;
+	    this.size = size;
+	    this.normalized = normalized;
+	    this.type = type;
+	    this.stride = stride;
+	    this.start = start;
+	    this.instance = instance;
+	};
+
+	/**
+	 * Destroys the Attribute.
+	 */
+	Attribute.prototype.destroy = function destroy ()
+	{
+	    this.buffer = null;
+	};
+
+	/**
+	 * Helper function that creates an Attribute based on the information provided
+	 *
+	 * @static
+	 * @param {string} buffer  the id of the buffer that this attribute will look for
+	 * @param {Number} [size=2] the size of the attribute. If you have 2 floats per vertex (eg position x and y) this would be 2
+	 * @param {Number} [stride=0] How far apart (in floats) the start of each value is. (used for interleaving data)
+	 * @param {Number} [start=0] How far into the array to start reading values (used for interleaving data)
+	 * @param {Boolean} [normalized=false] should the data be normalized.
+	 *
+	 * @returns {PIXI.Attribute} A new {@link PIXI.Attribute} based on the information provided
+	 */
+	Attribute.from = function from (buffer, size, normalized, type, stride)
+	{
+	    return new Attribute(buffer, size, normalized, type, stride);
+	};
+
+	var UID = 0;
+	/* eslint-disable max-len */
+
+	/**
+	 * A wrapper for data so that it can be used and uploaded by WebGL
+	 *
+	 * @class
+	 * @memberof PIXI
+	 */
+	var Buffer = function Buffer(data, _static, index)
+	{
+	    if ( _static === void 0 ) { _static = true; }
+	    if ( index === void 0 ) { index = false; }
+
+	    /**
+	     * The data in the buffer, as a typed array
+	     *
+	     * @member {ArrayBuffer| SharedArrayBuffer|ArrayBufferView}
+	     */
+	    this.data = data || new Float32Array(1);
+
+	    /**
+	     * A map of renderer IDs to webgl buffer
+	     *
+	     * @private
+	     * @member {object<number, GLBuffer>}
+	     */
+	    this._glBuffers = {};
+
+	    this._updateID = 0;
+
+	    this.index = index;
+
+	    this.static = _static;
+
+	    this.id = UID++;
+
+	    this.disposeRunner = new Runner('disposeBuffer', 2);
+	};
+
+	// TODO could explore flagging only a partial upload?
+	/**
+	 * flags this buffer as requiring an upload to the GPU
+	 * @param {ArrayBuffer|SharedArrayBuffer|ArrayBufferView} [data] the data to update in the buffer.
+	 */
+	Buffer.prototype.update = function update (data)
+	{
+	    this.data = data || this.data;
+	    this._updateID++;
+	};
+
+	/**
+	 * disposes WebGL resources that are connected to this geometry
+	 */
+	Buffer.prototype.dispose = function dispose ()
+	{
+	    this.disposeRunner.run(this, false);
+	};
+
+	/**
+	 * Destroys the buffer
+	 */
+	Buffer.prototype.destroy = function destroy ()
+	{
+	    this.dispose();
+
+	    this.data = null;
+	};
+
+	/**
+	 * Helper function that creates a buffer based on an array or TypedArray
+	 *
+	 * @static
+	 * @param {ArrayBufferView | number[]} data the TypedArray that the buffer will store. If this is a regular Array it will be converted to a Float32Array.
+	 * @return {PIXI.Buffer} A new Buffer based on the data provided.
+	 */
+	Buffer.from = function from (data)
+	{
+	    if (data instanceof Array)
+	    {
+	        data = new Float32Array(data);
+	    }
+
+	    return new Buffer(data);
+	};
+
+	function getBufferType(array)
+	{
+	    if (array.BYTES_PER_ELEMENT === 4)
+	    {
+	        if (array instanceof Float32Array)
+	        {
+	            return 'Float32Array';
+	        }
+	        else if (array instanceof Uint32Array)
+	        {
+	            return 'Uint32Array';
+	        }
+
+	        return 'Int32Array';
+	    }
+	    else if (array.BYTES_PER_ELEMENT === 2)
+	    {
+	        if (array instanceof Uint16Array)
+	        {
+	            return 'Uint16Array';
+	        }
+	    }
+	    else if (array.BYTES_PER_ELEMENT === 1)
+	    {
+	        if (array instanceof Uint8Array)
+	        {
+	            return 'Uint8Array';
+	        }
+	    }
+
+	    // TODO map out the rest of the array elements!
+	    return null;
+	}
+
+	/* eslint-disable object-shorthand */
+	var map = {
+	    Float32Array: Float32Array,
+	    Uint32Array: Uint32Array,
+	    Int32Array: Int32Array,
+	    Uint8Array: Uint8Array,
+	};
+
+	function interleaveTypedArrays(arrays, sizes)
+	{
+	    var outSize = 0;
+	    var stride = 0;
+	    var views = {};
+
+	    for (var i = 0; i < arrays.length; i++)
+	    {
+	        stride += sizes[i];
+	        outSize += arrays[i].length;
+	    }
+
+	    var buffer = new ArrayBuffer(outSize * 4);
+
+	    var out = null;
+	    var littleOffset = 0;
+
+	    for (var i$1 = 0; i$1 < arrays.length; i$1++)
+	    {
+	        var size = sizes[i$1];
+	        var array = arrays[i$1];
+
+	        var type = getBufferType(array);
+
+	        if (!views[type])
+	        {
+	            views[type] = new map[type](buffer);
+	        }
+
+	        out = views[type];
+
+	        for (var j = 0; j < array.length; j++)
+	        {
+	            var indexStart = ((j / size | 0) * stride) + littleOffset;
+	            var index = j % size;
+
+	            out[indexStart + index] = array[j];
+	        }
+
+	        littleOffset += size;
+	    }
+
+	    return new Float32Array(buffer);
+	}
+
+	var byteSizeMap = { 5126: 4, 5123: 2, 5121: 1 };
+	var UID$1 = 0;
+
+	/* eslint-disable object-shorthand */
+	var map$1 = {
+	    Float32Array: Float32Array,
+	    Uint32Array: Uint32Array,
+	    Int32Array: Int32Array,
+	    Uint8Array: Uint8Array,
+	    Uint16Array: Uint16Array,
+	};
+
+	/* eslint-disable max-len */
+
+	/**
+	 * The Geometry represents a model. It consists of two components:
+	 * - GeometryStyle - The structure of the model such as the attributes layout
+	 * - GeometryData - the data of the model - this consists of buffers.
+	 * This can include anything from positions, uvs, normals, colors etc.
+	 *
+	 * Geometry can be defined without passing in a style or data if required (thats how I prefer!)
+	 *
+	 * ```js
+	 * let geometry = new PIXI.Geometry();
+	 *
+	 * geometry.addAttribute('positions', [0, 0, 100, 0, 100, 100, 0, 100], 2);
+	 * geometry.addAttribute('uvs', [0,0,1,0,1,1,0,1],2)
+	 * geometry.addIndex([0,1,2,1,3,2])
+	 *
+	 * ```
+	 * @class
+	 * @memberof PIXI
+	 */
+	var Geometry = function Geometry(buffers, attributes)
+	{
+	    if ( buffers === void 0 ) { buffers = []; }
+	    if ( attributes === void 0 ) { attributes = {}; }
+
+	    this.buffers = buffers;
+
+	    this.indexBuffer = null;
+
+	    this.attributes = attributes;
+
+	    /**
+	     * A map of renderer IDs to webgl VAOs
+	     *
+	     * @protected
+	     * @type {object}
+	     */
+	    this.glVertexArrayObjects = {};
+
+	    this.id = UID$1++;
+
+	    this.instanced = false;
+
+	    /**
+	     * Number of instances in this geometry, pass it to `GeometrySystem.draw()`
+	     * @member {number}
+	     * @default 1
+	     */
+	    this.instanceCount = 1;
+
+	    this.disposeRunner = new Runner('disposeGeometry', 2);
+
+	    /**
+	     * Count of existing (not destroyed) meshes that reference this geometry
+	     * @member {number}
+	     */
+	    this.refCount = 0;
+	};
+
+	/**
+	*
+	* Adds an attribute to the geometry
+	*
+	* @param {String} id - the name of the attribute (matching up to a shader)
+	* @param {PIXI.Buffer} [buffer] the buffer that holds the data of the attribute . You can also provide an Array and a buffer will be created from it.
+	* @param {Number} [size=0] the size of the attribute. If you have 2 floats per vertex (eg position x and y) this would be 2
+	* @param {Boolean} [normalized=false] should the data be normalized.
+	* @param {Number} [type=PIXI.TYPES.FLOAT] what type of number is the attribute. Check {PIXI.TYPES} to see the ones available
+	* @param {Number} [stride=0] How far apart (in floats) the start of each value is. (used for interleaving data)
+	* @param {Number} [start=0] How far into the array to start reading values (used for interleaving data)
+	*
+	* @return {PIXI.Geometry} returns self, useful for chaining.
+	*/
+	Geometry.prototype.addAttribute = function addAttribute (id, buffer, size, normalized, type, stride, start, instance)
+	{
+	        if ( normalized === void 0 ) { normalized = false; }
+	        if ( instance === void 0 ) { instance = false; }
+
+	    if (!buffer)
+	    {
+	        throw new Error('You must pass a buffer when creating an attribute');
+	    }
+
+	    // check if this is a buffer!
+	    if (!buffer.data)
+	    {
+	        // its an array!
+	        if (buffer instanceof Array)
+	        {
+	            buffer = new Float32Array(buffer);
+	        }
+
+	        buffer = new Buffer(buffer);
+	    }
+
+	    var ids = id.split('|');
+
+	    if (ids.length > 1)
+	    {
+	        for (var i = 0; i < ids.length; i++)
+	        {
+	            this.addAttribute(ids[i], buffer, size, normalized, type);
+	        }
+
+	        return this;
+	    }
+
+	    var bufferIndex = this.buffers.indexOf(buffer);
+
+	    if (bufferIndex === -1)
+	    {
+	        this.buffers.push(buffer);
+	        bufferIndex = this.buffers.length - 1;
+	    }
+
+	    this.attributes[id] = new Attribute(bufferIndex, size, normalized, type, stride, start, instance);
+
+	    // assuming that if there is instanced data then this will be drawn with instancing!
+	    this.instanced = this.instanced || instance;
+
+	    return this;
+	};
+
+	/**
+	 * returns the requested attribute
+	 *
+	 * @param {String} id  the name of the attribute required
+	 * @return {PIXI.Attribute} the attribute requested.
+	 */
+	Geometry.prototype.getAttribute = function getAttribute (id)
+	{
+	    return this.attributes[id];
+	};
+
+	/**
+	 * returns the requested buffer
+	 *
+	 * @param {String} id  the name of the buffer required
+	 * @return {PIXI.Buffer} the buffer requested.
+	 */
+	Geometry.prototype.getBuffer = function getBuffer (id)
+	{
+	    return this.buffers[this.getAttribute(id).buffer];
+	};
+
+	/**
+	*
+	* Adds an index buffer to the geometry
+	* The index buffer contains integers, three for each triangle in the geometry, which reference the various attribute buffers (position, colour, UV coordinates, other UV coordinates, normal, …). There is only ONE index buffer.
+	*
+	* @param {PIXI.Buffer} [buffer] the buffer that holds the data of the index buffer. You can also provide an Array and a buffer will be created from it.
+	* @return {PIXI.Geometry} returns self, useful for chaining.
+	*/
+	Geometry.prototype.addIndex = function addIndex (buffer)
+	{
+	    if (!buffer.data)
+	    {
+	        // its an array!
+	        if (buffer instanceof Array)
+	        {
+	            buffer = new Uint16Array(buffer);
+	        }
+
+	        buffer = new Buffer(buffer);
+	    }
+
+	    buffer.index = true;
+	    this.indexBuffer = buffer;
+
+	    if (this.buffers.indexOf(buffer) === -1)
+	    {
+	        this.buffers.push(buffer);
+	    }
+
+	    return this;
+	};
+
+	/**
+	 * returns the index buffer
+	 *
+	 * @return {PIXI.Buffer} the index buffer.
+	 */
+	Geometry.prototype.getIndex = function getIndex ()
+	{
+	    return this.indexBuffer;
+	};
+
+	/**
+	 * this function modifies the structure so that all current attributes become interleaved into a single buffer
+	 * This can be useful if your model remains static as it offers a little performance boost
+	 *
+	 * @return {PIXI.Geometry} returns self, useful for chaining.
+	 */
+	Geometry.prototype.interleave = function interleave ()
+	{
+	    // a simple check to see if buffers are already interleaved..
+	    if (this.buffers.length === 1 || (this.buffers.length === 2 && this.indexBuffer)) { return this; }
+
+	    // assume already that no buffers are interleaved
+	    var arrays = [];
+	    var sizes = [];
+	    var interleavedBuffer = new Buffer();
+	    var i;
+
+	    for (i in this.attributes)
+	    {
+	        var attribute = this.attributes[i];
+
+	        var buffer = this.buffers[attribute.buffer];
+
+	        arrays.push(buffer.data);
+
+	        sizes.push((attribute.size * byteSizeMap[attribute.type]) / 4);
+
+	        attribute.buffer = 0;
+	    }
+
+	    interleavedBuffer.data = interleaveTypedArrays(arrays, sizes);
+
+	    for (i = 0; i < this.buffers.length; i++)
+	    {
+	        if (this.buffers[i] !== this.indexBuffer)
+	        {
+	            this.buffers[i].destroy();
+	        }
+	    }
+
+	    this.buffers = [interleavedBuffer];
+
+	    if (this.indexBuffer)
+	    {
+	        this.buffers.push(this.indexBuffer);
+	    }
+
+	    return this;
+	};
+
+	Geometry.prototype.getSize = function getSize ()
+	{
+	    for (var i in this.attributes)
+	    {
+	        var attribute = this.attributes[i];
+	        var buffer = this.buffers[attribute.buffer];
+
+	        return buffer.data.length / ((attribute.stride / 4) || attribute.size);
+	    }
+
+	    return 0;
+	};
+
+	/**
+	 * disposes WebGL resources that are connected to this geometry
+	 */
+	Geometry.prototype.dispose = function dispose ()
+	{
+	    this.disposeRunner.run(this, false);
+	};
+
+	/**
+	 * Destroys the geometry.
+	 */
+	Geometry.prototype.destroy = function destroy ()
+	{
+	    this.dispose();
+
+	    this.buffers = null;
+	    this.indexBuffer.destroy();
+
+	    this.attributes = null;
+	};
+
+	/**
+	 * returns a clone of the geometry
+	 *
+	 * @returns {PIXI.Geometry} a new clone of this geometry
+	 */
+	Geometry.prototype.clone = function clone ()
+	{
+	    var geometry = new Geometry();
+
+	    for (var i = 0; i < this.buffers.length; i++)
+	    {
+	        geometry.buffers[i] = new Buffer(this.buffers[i].data.slice());
+	    }
+
+	    for (var i$1 in this.attributes)
+	    {
+	        var attrib = this.attributes[i$1];
+
+	        geometry.attributes[i$1] = new Attribute(
+	            attrib.buffer,
+	            attrib.size,
+	            attrib.normalized,
+	            attrib.type,
+	            attrib.stride,
+	            attrib.start,
+	            attrib.instance
+	        );
+	    }
+
+	    if (this.indexBuffer)
+	    {
+	        geometry.indexBuffer = geometry.buffers[this.buffers.indexOf(this.indexBuffer)];
+	        geometry.indexBuffer.index = true;
+	    }
+
+	    return geometry;
+	};
+
+	/**
+	 * merges an array of geometries into a new single one
+	 * geometry attribute styles must match for this operation to work
+	 *
+	 * @param {PIXI.Geometry[]} geometries array of geometries to merge
+	 * @returns {PIXI.Geometry} shiny new geometry!
+	 */
+	Geometry.merge = function merge (geometries)
+	{
+	    // todo add a geometry check!
+	    // also a size check.. cant be too big!]
+
+	    var geometryOut = new Geometry();
+
+	    var arrays = [];
+	    var sizes = [];
+	    var offsets = [];
+
+	    var geometry;
+
+	    // pass one.. get sizes..
+	    for (var i = 0; i < geometries.length; i++)
+	    {
+	        geometry = geometries[i];
+
+	        for (var j = 0; j < geometry.buffers.length; j++)
+	        {
+	            sizes[j] = sizes[j] || 0;
+	            sizes[j] += geometry.buffers[j].data.length;
+	            offsets[j] = 0;
+	        }
+	    }
+
+	    // build the correct size arrays..
+	    for (var i$1 = 0; i$1 < geometry.buffers.length; i$1++)
+	    {
+	        // TODO types!
+	        arrays[i$1] = new map$1[getBufferType(geometry.buffers[i$1].data)](sizes[i$1]);
+	        geometryOut.buffers[i$1] = new Buffer(arrays[i$1]);
+	    }
+
+	    // pass to set data..
+	    for (var i$2 = 0; i$2 < geometries.length; i$2++)
+	    {
+	        geometry = geometries[i$2];
+
+	        for (var j$1 = 0; j$1 < geometry.buffers.length; j$1++)
+	        {
+	            arrays[j$1].set(geometry.buffers[j$1].data, offsets[j$1]);
+	            offsets[j$1] += geometry.buffers[j$1].data.length;
+	        }
+	    }
+
+	    geometryOut.attributes = geometry.attributes;
+
+	    if (geometry.indexBuffer)
+	    {
+	        geometryOut.indexBuffer = geometryOut.buffers[geometry.buffers.indexOf(geometry.indexBuffer)];
+	        geometryOut.indexBuffer.index = true;
+
+	        var offset = 0;
+	        var stride = 0;
+	        var offset2 = 0;
+	        var bufferIndexToCount = 0;
+
+	        // get a buffer
+	        for (var i$3 = 0; i$3 < geometry.buffers.length; i$3++)
+	        {
+	            if (geometry.buffers[i$3] !== geometry.indexBuffer)
+	            {
+	                bufferIndexToCount = i$3;
+	                break;
+	            }
+	        }
+
+	        // figure out the stride of one buffer..
+	        for (var i$4 in geometry.attributes)
+	        {
+	            var attribute = geometry.attributes[i$4];
+
+	            if ((attribute.buffer | 0) === bufferIndexToCount)
+	            {
+	                stride += ((attribute.size * byteSizeMap[attribute.type]) / 4);
+	            }
+	        }
+
+	        // time to off set all indexes..
+	        for (var i$5 = 0; i$5 < geometries.length; i$5++)
+	        {
+	            var indexBufferData = geometries[i$5].indexBuffer.data;
+
+	            for (var j$2 = 0; j$2 < indexBufferData.length; j$2++)
+	            {
+	                geometryOut.indexBuffer.data[j$2 + offset2] += offset;
+	            }
+
+	            offset += geometry.buffers[bufferIndexToCount].data.length / (stride);
+	            offset2 += indexBufferData.length;
+	        }
+	    }
+
+	    return geometryOut;
+	};
+
+	/**
+	 * Helper class to create a quad
+	 *
+	 * @class
+	 * @memberof PIXI
+	 */
+	var Quad = /*@__PURE__*/(function (Geometry) {
+	    function Quad()
+	    {
+	        Geometry.call(this);
+
+	        this.addAttribute('aVertexPosition', [
+	            0, 0,
+	            1, 0,
+	            1, 1,
+	            0, 1 ])
+	            .addIndex([0, 1, 3, 2]);
+	    }
+
+	    if ( Geometry ) { Quad.__proto__ = Geometry; }
+	    Quad.prototype = Object.create( Geometry && Geometry.prototype );
+	    Quad.prototype.constructor = Quad;
+
+	    return Quad;
+	}(Geometry));
+
+	/**
+	 * Helper class to create a quad with uvs like in v4
+	 *
+	 * @class
+	 * @memberof PIXI
+	 * @extends PIXI.Geometry
+	 */
+	var QuadUv = /*@__PURE__*/(function (Geometry) {
+	    function QuadUv()
+	    {
+	        Geometry.call(this);
+
+	        /**
+	         * An array of vertices
+	         *
+	         * @member {Float32Array}
+	         */
+	        this.vertices = new Float32Array([
+	            -1, -1,
+	            1, -1,
+	            1, 1,
+	            -1, 1 ]);
+
+	        /**
+	         * The Uvs of the quad
+	         *
+	         * @member {Float32Array}
+	         */
+	        this.uvs = new Float32Array([
+	            0, 0,
+	            1, 0,
+	            1, 1,
+	            0, 1 ]);
+
+	        this.vertexBuffer = new Buffer(this.vertices);
+	        this.uvBuffer = new Buffer(this.uvs);
+
+	        this.addAttribute('aVertexPosition', this.vertexBuffer)
+	            .addAttribute('aTextureCoord', this.uvBuffer)
+	            .addIndex([0, 1, 2, 0, 2, 3]);
+	    }
+
+	    if ( Geometry ) { QuadUv.__proto__ = Geometry; }
+	    QuadUv.prototype = Object.create( Geometry && Geometry.prototype );
+	    QuadUv.prototype.constructor = QuadUv;
+
+	    /**
+	     * Maps two Rectangle to the quad.
+	     *
+	     * @param {PIXI.Rectangle} targetTextureFrame - the first rectangle
+	     * @param {PIXI.Rectangle} destinationFrame - the second rectangle
+	     * @return {PIXI.Quad} Returns itself.
+	     */
+	    QuadUv.prototype.map = function map (targetTextureFrame, destinationFrame)
+	    {
+	        var x = 0; // destinationFrame.x / targetTextureFrame.width;
+	        var y = 0; // destinationFrame.y / targetTextureFrame.height;
+
+	        this.uvs[0] = x;
+	        this.uvs[1] = y;
+
+	        this.uvs[2] = x + (destinationFrame.width / targetTextureFrame.width);
+	        this.uvs[3] = y;
+
+	        this.uvs[4] = x + (destinationFrame.width / targetTextureFrame.width);
+	        this.uvs[5] = y + (destinationFrame.height / targetTextureFrame.height);
+
+	        this.uvs[6] = x;
+	        this.uvs[7] = y + (destinationFrame.height / targetTextureFrame.height);
+
+	        x = destinationFrame.x;
+	        y = destinationFrame.y;
+
+	        this.vertices[0] = x;
+	        this.vertices[1] = y;
+
+	        this.vertices[2] = x + destinationFrame.width;
+	        this.vertices[3] = y;
+
+	        this.vertices[4] = x + destinationFrame.width;
+	        this.vertices[5] = y + destinationFrame.height;
+
+	        this.vertices[6] = x;
+	        this.vertices[7] = y + destinationFrame.height;
+
+	        this.invalidate();
+
+	        return this;
+	    };
+
+	    /**
+	     * legacy upload method, just marks buffers dirty
+	     * @returns {PIXI.QuadUv} Returns itself.
+	     */
+	    QuadUv.prototype.invalidate = function invalidate ()
+	    {
+	        this.vertexBuffer._updateID++;
+	        this.uvBuffer._updateID++;
+
+	        return this;
+	    };
+
+	    return QuadUv;
+	}(Geometry));
+
+	var UID$2 = 0;
+
+	/**
+	 * Uniform group holds uniform map and some ID's for work
+	 *
+	 * @class
+	 * @memberof PIXI
+	 */
+	var UniformGroup = function UniformGroup(uniforms, _static)
+	{
+	    /**
+	     * uniform values
+	     * @member {object}
+	     * @readonly
+	     */
+	    this.uniforms = uniforms;
+
+	    /**
+	     * Its a group and not a single uniforms
+	     * @member {boolean}
+	     * @readonly
+	     * @default true
+	     */
+	    this.group = true;
+
+	    // lets generate this when the shader ?
+	    this.syncUniforms = {};
+
+	    /**
+	     * dirty version
+	     * @protected
+	     * @member {number}
+	     */
+	    this.dirtyId = 0;
+
+	    /**
+	     * unique id
+	     * @protected
+	     * @member {number}
+	     */
+	    this.id = UID$2++;
+
+	    /**
+	     * Uniforms wont be changed after creation
+	     * @member {boolean}
+	     */
+	    this.static = !!_static;
+	};
+
+	UniformGroup.prototype.update = function update ()
+	{
+	    this.dirtyId++;
+	};
+
+	UniformGroup.prototype.add = function add (name, uniforms, _static)
+	{
+	    this.uniforms[name] = new UniformGroup(uniforms, _static);
+	};
+
+	UniformGroup.from = function from (uniforms, _static)
+	{
+	    return new UniformGroup(uniforms, _static);
+	};
+
+	/**
+	 * System plugin to the renderer to manage filter states.
+	 *
+	 * @class
+	 * @private
+	 */
+	var FilterState = function FilterState()
+	{
+	    this.renderTexture = null;
+
+	    /**
+	     * Target of the filters
+	     * We store for case when custom filter wants to know the element it was applied on
+	     * @member {PIXI.DisplayObject}
+	     * @private
+	     */
+	    this.target = null;
+
+	    /**
+	     * Compatibility with PixiJS v4 filters
+	     * @member {boolean}
+	     * @default false
+	     * @private
+	     */
+	    this.legacy = false;
+
+	    /**
+	     * Resolution of filters
+	     * @member {number}
+	     * @default 1
+	     * @private
+	     */
+	    this.resolution = 1;
+
+	    // next three fields are created only for root
+	    // re-assigned for everything else
+
+	    /**
+	     * Source frame
+	     * @member {PIXI.Rectangle}
+	     * @private
+	     */
+	    this.sourceFrame = new Rectangle();
+
+	    /**
+	     * Destination frame
+	     * @member {PIXI.Rectangle}
+	     * @private
+	     */
+	    this.destinationFrame = new Rectangle();
+
+	    /**
+	     * Collection of filters
+	     * @member {PIXI.Filter[]}
+	     * @private
+	     */
+	    this.filters = [];
+	};
+
+	/**
+	 * clears the state
+	 * @private
+	 */
+	FilterState.prototype.clear = function clear ()
+	{
+	    this.target = null;
+	    this.filters = null;
+	    this.renderTexture = null;
+	};
+
+	/**
+	 * System plugin to the renderer to manage the filters.
+	 *
+	 * @class
+	 * @memberof PIXI.systems
+	 * @extends PIXI.System
+	 */
+	var FilterSystem = /*@__PURE__*/(function (System) {
+	    function FilterSystem(renderer)
+	    {
+	        System.call(this, renderer);
+
+	        /**
+	         * List of filters for the FilterSystem
+	         * @member {Object[]}
+	         * @readonly
+	         */
+	        this.defaultFilterStack = [{}];
+
+	        /**
+	         * stores a bunch of PO2 textures used for filtering
+	         * @member {Object}
+	         */
+	        this.texturePool = new RenderTexturePool();
+
+	        this.texturePool.setScreenSize(renderer.view);
+
+	        /**
+	         * a pool for storing filter states, save us creating new ones each tick
+	         * @member {Object[]}
+	         */
+	        this.statePool = [];
+
+	        /**
+	         * A very simple geometry used when drawing a filter effect to the screen
+	         * @member {PIXI.Quad}
+	         */
+	        this.quad = new Quad();
+
+	        /**
+	         * Quad UVs
+	         * @member {PIXI.QuadUv}
+	         */
+	        this.quadUv = new QuadUv();
+
+	        /**
+	         * Temporary rect for maths
+	         * @type {PIXI.Rectangle}
+	         */
+	        this.tempRect = new Rectangle();
+
+	        /**
+	         * Active state
+	         * @member {object}
+	         */
+	        this.activeState = {};
+
+	        /**
+	         * This uniform group is attached to filter uniforms when used
+	         * @member {PIXI.UniformGroup}
+	         * @property {PIXI.Rectangle} outputFrame
+	         * @property {Float32Array} inputSize
+	         * @property {Float32Array} inputPixel
+	         * @property {Float32Array} inputClamp
+	         * @property {Number} resolution
+	         * @property {Float32Array} filterArea
+	         * @property {Fload32Array} filterClamp
+	         */
+	        this.globalUniforms = new UniformGroup({
+	            outputFrame: this.tempRect,
+	            inputSize: new Float32Array(4),
+	            inputPixel: new Float32Array(4),
+	            inputClamp: new Float32Array(4),
+	            resolution: 1,
+
+	            // legacy variables
+	            filterArea: new Float32Array(4),
+	            filterClamp: new Float32Array(4),
+	        }, true);
+
+	        this._pixelsWidth = renderer.view.width;
+	        this._pixelsHeight = renderer.view.height;
+	    }
+
+	    if ( System ) { FilterSystem.__proto__ = System; }
+	    FilterSystem.prototype = Object.create( System && System.prototype );
+	    FilterSystem.prototype.constructor = FilterSystem;
+
+	    /**
+	     * Adds a new filter to the System.
+	     *
+	     * @param {PIXI.DisplayObject} target - The target of the filter to render.
+	     * @param {PIXI.Filter[]} filters - The filters to apply.
+	     */
+	    FilterSystem.prototype.push = function push (target, filters)
+	    {
+	        var renderer = this.renderer;
+	        var filterStack = this.defaultFilterStack;
+	        var state = this.statePool.pop() || new FilterState();
+
+	        var resolution = filters[0].resolution;
+	        var padding = filters[0].padding;
+	        var autoFit = filters[0].autoFit;
+	        var legacy = filters[0].legacy;
+
+	        for (var i = 1; i < filters.length; i++)
+	        {
+	            var filter =  filters[i];
+
+	            // lets use the lowest resolution..
+	            resolution = Math.min(resolution, filter.resolution);
+	            // and the largest amount of padding!
+	            padding = Math.max(padding, filter.padding);
+	            // only auto fit if all filters are autofit
+	            autoFit = autoFit || filter.autoFit;
+
+	            legacy = legacy || filter.legacy;
+	        }
+
+	        if (filterStack.length === 1)
+	        {
+	            this.defaultFilterStack[0].renderTexture = renderer.renderTexture.current;
+	        }
+
+	        filterStack.push(state);
+
+	        state.resolution = resolution;
+
+	        state.legacy = legacy;
+
+	        state.target = target;
+
+	        state.sourceFrame.copyFrom(target.filterArea || target.getBounds(true));
+
+	        state.sourceFrame.pad(padding);
+	        if (autoFit)
+	        {
+	            state.sourceFrame.fit(this.renderer.renderTexture.sourceFrame);
+	        }
+
+	        // round to whole number based on resolution
+	        state.sourceFrame.ceil(resolution);
+
+	        state.renderTexture = this.getOptimalFilterTexture(state.sourceFrame.width, state.sourceFrame.height, resolution);
+	        state.filters = filters;
+
+	        state.destinationFrame.width = state.renderTexture.width;
+	        state.destinationFrame.height = state.renderTexture.height;
+
+	        state.renderTexture.filterFrame = state.sourceFrame;
+
+	        renderer.renderTexture.bind(state.renderTexture, state.sourceFrame);// /, state.destinationFrame);
+	        renderer.renderTexture.clear();
+	    };
+
+	    /**
+	     * Pops off the filter and applies it.
+	     *
+	     */
+	    FilterSystem.prototype.pop = function pop ()
+	    {
+	        var filterStack = this.defaultFilterStack;
+	        var state = filterStack.pop();
+	        var filters = state.filters;
+
+	        this.activeState = state;
+
+	        var globalUniforms = this.globalUniforms.uniforms;
+
+	        globalUniforms.outputFrame = state.sourceFrame;
+	        globalUniforms.resolution = state.resolution;
+
+	        var inputSize = globalUniforms.inputSize;
+	        var inputPixel = globalUniforms.inputPixel;
+	        var inputClamp = globalUniforms.inputClamp;
+
+	        inputSize[0] = state.destinationFrame.width;
+	        inputSize[1] = state.destinationFrame.height;
+	        inputSize[2] = 1.0 / inputSize[0];
+	        inputSize[3] = 1.0 / inputSize[1];
+
+	        inputPixel[0] = inputSize[0] * state.resolution;
+	        inputPixel[1] = inputSize[1] * state.resolution;
+	        inputPixel[2] = 1.0 / inputPixel[0];
+	        inputPixel[3] = 1.0 / inputPixel[1];
+
+	        inputClamp[0] = 0.5 * inputPixel[2];
+	        inputClamp[1] = 0.5 * inputPixel[3];
+	        inputClamp[2] = (state.sourceFrame.width * inputSize[2]) - (0.5 * inputPixel[2]);
+	        inputClamp[3] = (state.sourceFrame.height * inputSize[3]) - (0.5 * inputPixel[3]);
+
+	        // only update the rect if its legacy..
+	        if (state.legacy)
+	        {
+	            var filterArea = globalUniforms.filterArea;
+
+	            filterArea[0] = state.destinationFrame.width;
+	            filterArea[1] = state.destinationFrame.height;
+	            filterArea[2] = state.sourceFrame.x;
+	            filterArea[3] = state.sourceFrame.y;
+
+	            globalUniforms.filterClamp = globalUniforms.inputClamp;
+	        }
+
+	        this.globalUniforms.update();
+
+	        var lastState = filterStack[filterStack.length - 1];
+
+	        if (filters.length === 1)
+	        {
+	            filters[0].apply(this, state.renderTexture, lastState.renderTexture, false, state);
+
+	            this.returnFilterTexture(state.renderTexture);
+	        }
+	        else
+	        {
+	            var flip = state.renderTexture;
+	            var flop = this.getOptimalFilterTexture(
+	                flip.width,
+	                flip.height,
+	                state.resolution
+	            );
+
+	            flop.filterFrame = flip.filterFrame;
+
+	            var i = 0;
+
+	            for (i = 0; i < filters.length - 1; ++i)
+	            {
+	                filters[i].apply(this, flip, flop, true, state);
+
+	                var t = flip;
+
+	                flip = flop;
+	                flop = t;
+	            }
+
+	            filters[i].apply(this, flip, lastState.renderTexture, false, state);
+
+	            this.returnFilterTexture(flip);
+	            this.returnFilterTexture(flop);
+	        }
+
+	        state.clear();
+	        this.statePool.push(state);
+	    };
+
+	    /**
+	     * Draws a filter.
+	     *
+	     * @param {PIXI.Filter} filter - The filter to draw.
+	     * @param {PIXI.RenderTexture} input - The input render target.
+	     * @param {PIXI.RenderTexture} output - The target to output to.
+	     * @param {boolean} clear - Should the output be cleared before rendering to it
+	     */
+	    FilterSystem.prototype.applyFilter = function applyFilter (filter, input, output, clear)
+	    {
+	        var renderer = this.renderer;
+
+	        renderer.renderTexture.bind(output, output ? output.filterFrame : null);
+
+	        if (clear)
+	        {
+	            // gl.disable(gl.SCISSOR_TEST);
+	            renderer.renderTexture.clear();
+	            // gl.enable(gl.SCISSOR_TEST);
+	        }
+
+	        // set the uniforms..
+	        filter.uniforms.uSampler = input;
+	        filter.uniforms.filterGlobals = this.globalUniforms;
+
+	        // TODO make it so that the order of this does not matter..
+	        // because it does at the moment cos of global uniforms.
+	        // they need to get resynced
+
+	        renderer.state.set(filter.state);
+	        renderer.shader.bind(filter);
+
+	        if (filter.legacy)
+	        {
+	            this.quadUv.map(input._frame, input.filterFrame);
+
+	            renderer.geometry.bind(this.quadUv);
+	            renderer.geometry.draw(DRAW_MODES.TRIANGLES);
+	        }
+	        else
+	        {
+	            renderer.geometry.bind(this.quad);
+	            renderer.geometry.draw(DRAW_MODES.TRIANGLE_STRIP);
+	        }
+	    };
+
+	    /**
+	     * Multiply _input normalized coordinates_ to this matrix to get _sprite texture normalized coordinates_.
+	     *
+	     * Use `outputMatrix * vTextureCoord` in the shader.
+	     *
+	     * @param {PIXI.Matrix} outputMatrix - The matrix to output to.
+	     * @param {PIXI.Sprite} sprite - The sprite to map to.
+	     * @return {PIXI.Matrix} The mapped matrix.
+	     */
+	    FilterSystem.prototype.calculateSpriteMatrix = function calculateSpriteMatrix (outputMatrix, sprite)
+	    {
+	        var ref = this.activeState;
+	        var sourceFrame = ref.sourceFrame;
+	        var destinationFrame = ref.destinationFrame;
+	        var ref$1 = sprite._texture;
+	        var orig = ref$1.orig;
+	        var mappedMatrix = outputMatrix.set(destinationFrame.width, 0, 0,
+	            destinationFrame.height, sourceFrame.x, sourceFrame.y);
+	        var worldTransform = sprite.worldTransform.copyTo(Matrix.TEMP_MATRIX);
+
+	        worldTransform.invert();
+	        mappedMatrix.prepend(worldTransform);
+	        mappedMatrix.scale(1.0 / orig.width, 1.0 / orig.height);
+	        mappedMatrix.translate(sprite.anchor.x, sprite.anchor.y);
+
+	        return mappedMatrix;
+	    };
+
+	    /**
+	     * Destroys this Filter System.
+	     */
+	    FilterSystem.prototype.destroy = function destroy ()
+	    {
+	        // Those textures has to be destroyed by RenderTextureSystem or FramebufferSystem
+	        this.texturePool.clear(false);
+	    };
+
+	    /**
+	     * Gets a Power-of-Two render texture or fullScreen texture
+	     *
+	     * @protected
+	     * @param {number} minWidth - The minimum width of the render texture in real pixels.
+	     * @param {number} minHeight - The minimum height of the render texture in real pixels.
+	     * @param {number} [resolution=1] - The resolution of the render texture.
+	     * @return {PIXI.RenderTexture} The new render texture.
+	     */
+	    FilterSystem.prototype.getOptimalFilterTexture = function getOptimalFilterTexture (minWidth, minHeight, resolution)
+	    {
+	        if ( resolution === void 0 ) { resolution = 1; }
+
+	        return this.texturePool.getOptimalTexture(minWidth, minHeight, resolution);
+	    };
+
+	    /**
+	     * Gets extra render texture to use inside current filter
+	     * To be compliant with older filters, you can use params in any order
+	     *
+	     * @param {PIXI.RenderTexture} [input] renderTexture from which size and resolution will be copied
+	     * @param {number} [resolution] override resolution of the renderTexture
+	     * @returns {PIXI.RenderTexture}
+	     */
+	    FilterSystem.prototype.getFilterTexture = function getFilterTexture (input, resolution)
+	    {
+	        if (typeof input === 'number')
+	        {
+	            var swap = input;
+
+	            input = resolution;
+	            resolution = swap;
+	        }
+
+	        input = input || this.activeState.renderTexture;
+
+	        var filterTexture = this.texturePool.getOptimalTexture(input.width, input.height, resolution || input.resolution);
+
+	        filterTexture.filterFrame = input.filterFrame;
+
+	        return filterTexture;
+	    };
+
+	    /**
+	     * Frees a render texture back into the pool.
+	     *
+	     * @param {PIXI.RenderTexture} renderTexture - The renderTarget to free
+	     */
+	    FilterSystem.prototype.returnFilterTexture = function returnFilterTexture (renderTexture)
+	    {
+	        this.texturePool.returnTexture(renderTexture);
+	    };
+
+	    /**
+	     * Empties the texture pool.
+	     */
+	    FilterSystem.prototype.emptyPool = function emptyPool ()
+	    {
+	        this.texturePool.clear(true);
+	    };
+
+	    /**
+	     * calls `texturePool.resize()`, affects fullScreen renderTextures
+	     */
+	    FilterSystem.prototype.resize = function resize ()
+	    {
+	        this.texturePool.setScreenSize(this.renderer.view);
+	    };
+
+	    return FilterSystem;
+	}(System));
+
+	/**
+	 * Base for a common object renderer that can be used as a
+	 * system renderer plugin.
+	 *
+	 * @class
+	 * @extends PIXI.System
+	 * @memberof PIXI
+	 */
+	var ObjectRenderer = function ObjectRenderer(renderer)
+	{
+	    /**
+	     * The renderer this manager works for.
+	     *
+	     * @member {PIXI.Renderer}
+	     */
+	    this.renderer = renderer;
+	};
+
+	/**
+	 * Stub method that should be used to empty the current
+	 * batch by rendering objects now.
+	 */
+	ObjectRenderer.prototype.flush = function flush ()
+	{
+	    // flush!
+	};
+
+	/**
+	 * Generic destruction method that frees all resources. This
+	 * should be called by subclasses.
+	 */
+	ObjectRenderer.prototype.destroy = function destroy ()
+	{
+	    this.renderer = null;
+	};
+
+	/**
+	 * Stub method that initializes any state required before
+	 * rendering starts. It is different from the `prerender`
+	 * signal, which occurs every frame, in that it is called
+	 * whenever an object requests _this_ renderer specifically.
+	 */
+	ObjectRenderer.prototype.start = function start ()
+	{
+	    // set the shader..
+	};
+
+	/**
+	 * Stops the renderer. It should free up any state and
+	 * become dormant.
+	 */
+	ObjectRenderer.prototype.stop = function stop ()
+	{
+	    this.flush();
+	};
+
+	/**
+	 * Keeps the object to render. It doesn't have to be
+	 * rendered immediately.
+	 *
+	 * @param {PIXI.DisplayObject} object - The object to render.
+	 */
+	ObjectRenderer.prototype.render = function render (object) // eslint-disable-line no-unused-vars
+	{
+	    // render the object
+	};
+
+	/**
+	 * System plugin to the renderer to manage batching.
+	 *
+	 * @class
+	 * @extends PIXI.System
+	 * @memberof PIXI.systems
+	 */
+	var BatchSystem = /*@__PURE__*/(function (System) {
+	    function BatchSystem(renderer)
+	    {
+	        System.call(this, renderer);
+
+	        /**
+	         * An empty renderer.
+	         *
+	         * @member {PIXI.ObjectRenderer}
+	         */
+	        this.emptyRenderer = new ObjectRenderer(renderer);
+
+	        /**
+	         * The currently active ObjectRenderer.
+	         *
+	         * @member {PIXI.ObjectRenderer}
+	         */
+	        this.currentRenderer = this.emptyRenderer;
+	    }
+
+	    if ( System ) { BatchSystem.__proto__ = System; }
+	    BatchSystem.prototype = Object.create( System && System.prototype );
+	    BatchSystem.prototype.constructor = BatchSystem;
+
+	    /**
+	     * Changes the current renderer to the one given in parameter
+	     *
+	     * @param {PIXI.ObjectRenderer} objectRenderer - The object renderer to use.
+	     */
+	    BatchSystem.prototype.setObjectRenderer = function setObjectRenderer (objectRenderer)
+	    {
+	        if (this.currentRenderer === objectRenderer)
+	        {
+	            return;
+	        }
+
+	        this.currentRenderer.stop();
+	        this.currentRenderer = objectRenderer;
+
+	        this.currentRenderer.start();
+	    };
+
+	    /**
+	     * This should be called if you wish to do some custom rendering
+	     * It will basically render anything that may be batched up such as sprites
+	     */
+	    BatchSystem.prototype.flush = function flush ()
+	    {
+	        this.setObjectRenderer(this.emptyRenderer);
+	    };
+
+	    /**
+	     * Reset the system to an empty renderer
+	     */
+	    BatchSystem.prototype.reset = function reset ()
+	    {
+	        this.setObjectRenderer(this.emptyRenderer);
+	    };
+
+	    return BatchSystem;
+	}(System));
+
+	/**
+	 * The maximum support for using WebGL. If a device does not
+	 * support WebGL version, for instance WebGL 2, it will still
+	 * attempt to fallback support to WebGL 1. If you want to
+	 * explicitly remove feature support to target a more stable
+	 * baseline, prefer a lower environment.
+	 *
+	 * Due to {@link https://bugs.chromium.org/p/chromium/issues/detail?id=934823|bug in chromium}
+	 * we disable webgl2 by default for all non-apple mobile devices.
+	 *
+	 * @static
+	 * @name PREFER_ENV
+	 * @memberof PIXI.settings
+	 * @type {number}
+	 * @default PIXI.ENV.WEBGL2
+	 */
+	settings.PREFER_ENV = isMobile_min.any ? ENV.WEBGL : ENV.WEBGL2;
+
+	var CONTEXT_UID = 0;
+
+	/**
+	 * System plugin to the renderer to manage the context.
+	 *
+	 * @class
+	 * @extends PIXI.System
+	 * @memberof PIXI.systems
+	 */
+	var ContextSystem = /*@__PURE__*/(function (System) {
+	    function ContextSystem(renderer)
+	    {
+	        System.call(this, renderer);
+
+	        /**
+	         * Either 1 or 2 to reflect the WebGL version being used
+	         * @member {number}
+	         * @readonly
+	         */
+	        this.webGLVersion = 1;
+
+	        /**
+	         * Extensions being used
+	         * @member {object}
+	         * @readonly
+	         * @property {WEBGL_draw_buffers} drawBuffers - WebGL v1 extension
+	         * @property {WEBGL_depth_texture} depthTexture - WebGL v1 extension
+	         * @property {OES_texture_float} floatTexture - WebGL v1 extension
+	         * @property {WEBGL_lose_context} loseContext - WebGL v1 extension
+	         * @property {OES_vertex_array_object} vertexArrayObject - WebGL v1 extension
+	         * @property {EXT_texture_filter_anisotropic} anisotropicFiltering - WebGL v1 and v2 extension
+	         */
+	        this.extensions = {};
+
+	        // Bind functions
+	        this.handleContextLost = this.handleContextLost.bind(this);
+	        this.handleContextRestored = this.handleContextRestored.bind(this);
+
+	        renderer.view.addEventListener('webglcontextlost', this.handleContextLost, false);
+	        renderer.view.addEventListener('webglcontextrestored', this.handleContextRestored, false);
+	    }
+
+	    if ( System ) { ContextSystem.__proto__ = System; }
+	    ContextSystem.prototype = Object.create( System && System.prototype );
+	    ContextSystem.prototype.constructor = ContextSystem;
+
+	    var prototypeAccessors = { isLost: { configurable: true } };
+
+	    /**
+	     * `true` if the context is lost
+	     * @member {boolean}
+	     * @readonly
+	     */
+	    prototypeAccessors.isLost.get = function ()
+	    {
+	        return (!this.gl || this.gl.isContextLost());
+	    };
+
+	    /**
+	     * Handle the context change event
+	     * @param {WebGLRenderingContext} gl new webgl context
+	     */
+	    ContextSystem.prototype.contextChange = function contextChange (gl)
+	    {
+	        this.gl = gl;
+	        this.renderer.gl = gl;
+	        this.renderer.CONTEXT_UID = CONTEXT_UID++;
+
+	        // restore a context if it was previously lost
+	        if (gl.isContextLost() && gl.getExtension('WEBGL_lose_context'))
+	        {
+	            gl.getExtension('WEBGL_lose_context').restoreContext();
+	        }
+	    };
+
+	    /**
+	     * Initialize the context
+	     *
+	     * @protected
+	     * @param {WebGLRenderingContext} gl - WebGL context
+	     */
+	    ContextSystem.prototype.initFromContext = function initFromContext (gl)
+	    {
+	        this.gl = gl;
+	        this.validateContext(gl);
+	        this.renderer.gl = gl;
+	        this.renderer.CONTEXT_UID = CONTEXT_UID++;
+	        this.renderer.runners.contextChange.run(gl);
+	    };
+
+	    /**
+	     * Initialize from context options
+	     *
+	     * @protected
+	     * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/getContext
+	     * @param {object} options - context attributes
+	     */
+	    ContextSystem.prototype.initFromOptions = function initFromOptions (options)
+	    {
+	        var gl = this.createContext(this.renderer.view, options);
+
+	        this.initFromContext(gl);
+	    };
+
+	    /**
+	     * Helper class to create a WebGL Context
+	     *
+	     * @param canvas {HTMLCanvasElement} the canvas element that we will get the context from
+	     * @param options {object} An options object that gets passed in to the canvas element containing the context attributes
+	     * @see https://developer.mozilla.org/en/docs/Web/API/HTMLCanvasElement/getContext
+	     * @return {WebGLRenderingContext} the WebGL context
+	     */
+	    ContextSystem.prototype.createContext = function createContext (canvas, options)
+	    {
+	        var gl;
+
+	        if (settings.PREFER_ENV >= ENV.WEBGL2)
+	        {
+	            gl = canvas.getContext('webgl2', options);
+	        }
+
+	        if (gl)
+	        {
+	            this.webGLVersion = 2;
+	        }
+	        else
+	        {
+	            this.webGLVersion = 1;
+
+	            gl = canvas.getContext('webgl', options)
+	            || canvas.getContext('experimental-webgl', options);
+
+	            if (!gl)
+	            {
+	                // fail, not able to get a context
+	                throw new Error('This browser does not support WebGL. Try using the canvas renderer');
+	            }
+	        }
+
+	        this.gl = gl;
+
+	        this.getExtensions();
+
+	        return gl;
+	    };
+
+	    /**
+	     * Auto-populate the extensions
+	     *
+	     * @protected
+	     */
+	    ContextSystem.prototype.getExtensions = function getExtensions ()
+	    {
+	        // time to set up default extensions that Pixi uses.
+	        var ref = this;
+	        var gl = ref.gl;
+
+	        if (this.webGLVersion === 1)
+	        {
+	            Object.assign(this.extensions, {
+	                drawBuffers: gl.getExtension('WEBGL_draw_buffers'),
+	                depthTexture: gl.getExtension('WEBKIT_WEBGL_depth_texture'),
+	                loseContext: gl.getExtension('WEBGL_lose_context'),
+	                vertexArrayObject: gl.getExtension('OES_vertex_array_object')
+	                    || gl.getExtension('MOZ_OES_vertex_array_object')
+	                    || gl.getExtension('WEBKIT_OES_vertex_array_object'),
+	                anisotropicFiltering: gl.getExtension('EXT_texture_filter_anisotropic'),
+	                uint32ElementIndex: gl.getExtension('OES_element_index_uint'),
+	                // Floats and half-floats
+	                floatTexture: gl.getExtension('OES_texture_float'),
+	                floatTextureLinear: gl.getExtension('OES_texture_float_linear'),
+	                textureHalfFloat: gl.getExtension('OES_texture_half_float'),
+	                textureHalfFloatLinear: gl.getExtension('OES_texture_half_float_linear'),
+	            });
+	        }
+	        else if (this.webGLVersion === 2)
+	        {
+	            Object.assign(this.extensions, {
+	                anisotropicFiltering: gl.getExtension('EXT_texture_filter_anisotropic'),
+	                // Floats and half-floats
+	                colorBufferFloat: gl.getExtension('EXT_color_buffer_float'),
+	                floatTextureLinear: gl.getExtension('OES_texture_float_linear'),
+	            });
+	        }
+	    };
+
+	    /**
+	     * Handles a lost webgl context
+	     *
+	     * @protected
+	     * @param {WebGLContextEvent} event - The context lost event.
+	     */
+	    ContextSystem.prototype.handleContextLost = function handleContextLost (event)
+	    {
+	        event.preventDefault();
+	    };
+
+	    /**
+	     * Handles a restored webgl context
+	     *
+	     * @protected
+	     */
+	    ContextSystem.prototype.handleContextRestored = function handleContextRestored ()
+	    {
+	        this.renderer.runners.contextChange.run(this.gl);
+	    };
+
+	    ContextSystem.prototype.destroy = function destroy ()
+	    {
+	        var view = this.renderer.view;
+
+	        // remove listeners
+	        view.removeEventListener('webglcontextlost', this.handleContextLost);
+	        view.removeEventListener('webglcontextrestored', this.handleContextRestored);
+
+	        this.gl.useProgram(null);
+
+	        if (this.extensions.loseContext)
+	        {
+	            this.extensions.loseContext.loseContext();
+	        }
+	    };
+
+	    /**
+	     * Handle the post-render runner event
+	     *
+	     * @protected
+	     */
+	    ContextSystem.prototype.postrender = function postrender ()
+	    {
+	        this.gl.flush();
+	    };
+
+	    /**
+	     * Validate context
+	     *
+	     * @protected
+	     * @param {WebGLRenderingContext} gl - Render context
+	     */
+	    ContextSystem.prototype.validateContext = function validateContext (gl)
+	    {
+	        var attributes = gl.getContextAttributes();
+
+	        // this is going to be fairly simple for now.. but at least we have room to grow!
+	        if (!attributes.stencil)
+	        {
+	            /* eslint-disable max-len */
+
+	            /* eslint-disable no-console */
+	            console.warn('Provided WebGL context does not have a stencil buffer, masks may not render correctly');
+	            /* eslint-enable no-console */
+
+	            /* eslint-enable max-len */
+	        }
+	    };
+
+	    Object.defineProperties( ContextSystem.prototype, prototypeAccessors );
+
+	    return ContextSystem;
+	}(System));
+
+	/**
+	 * System plugin to the renderer to manage framebuffers.
+	 *
+	 * @class
+	 * @extends PIXI.System
+	 * @memberof PIXI.systems
+	 */
+	var FramebufferSystem = /*@__PURE__*/(function (System) {
+	    function FramebufferSystem(renderer)
+	    {
+	        System.call(this, renderer);
+
+	        /**
+	         * A list of managed framebuffers
+	         * @member {PIXI.Framebuffer[]}
+	         * @readonly
+	         */
+	        this.managedFramebuffers = [];
+
+	        /**
+	         * Framebuffer value that shows that we don't know what is bound
+	         * @member {Framebuffer}
+	         * @readonly
+	         */
+	        this.unknownFramebuffer = new Framebuffer(10, 10);
+	    }
+
+	    if ( System ) { FramebufferSystem.__proto__ = System; }
+	    FramebufferSystem.prototype = Object.create( System && System.prototype );
+	    FramebufferSystem.prototype.constructor = FramebufferSystem;
+
+	    var prototypeAccessors = { size: { configurable: true } };
+
+	    /**
+	     * Sets up the renderer context and necessary buffers.
+	     */
+	    FramebufferSystem.prototype.contextChange = function contextChange ()
+	    {
+	        var gl = this.gl = this.renderer.gl;
+
+	        this.CONTEXT_UID = this.renderer.CONTEXT_UID;
+	        this.current = this.unknownFramebuffer;
+	        this.viewport = new Rectangle();
+	        this.hasMRT = true;
+	        this.writeDepthTexture = true;
+
+	        this.disposeAll(true);
+
+	        // webgl2
+	        if (this.renderer.context.webGLVersion === 1)
+	        {
+	            // webgl 1!
+	            var nativeDrawBuffersExtension = this.renderer.context.extensions.drawBuffers;
+	            var nativeDepthTextureExtension = this.renderer.context.extensions.depthTexture;
+
+	            if (settings.PREFER_ENV === ENV.WEBGL_LEGACY)
+	            {
+	                nativeDrawBuffersExtension = null;
+	                nativeDepthTextureExtension = null;
+	            }
+
+	            if (nativeDrawBuffersExtension)
+	            {
+	                gl.drawBuffers = function (activeTextures) { return nativeDrawBuffersExtension.drawBuffersWEBGL(activeTextures); };
+	            }
+	            else
+	            {
+	                this.hasMRT = false;
+	                gl.drawBuffers = function () {
+	                    // empty
+	                };
+	            }
+
+	            if (!nativeDepthTextureExtension)
+	            {
+	                this.writeDepthTexture = false;
+	            }
+	        }
+	    };
+
+	    /**
+	     * Bind a framebuffer
+	     *
+	     * @param {PIXI.Framebuffer} framebuffer
+	     * @param {PIXI.Rectangle} [frame] frame, default is framebuffer size
+	     */
+	    FramebufferSystem.prototype.bind = function bind (framebuffer, frame)
+	    {
+	        var ref = this;
+	        var gl = ref.gl;
+
+	        if (framebuffer)
+	        {
+	            // TODO caching layer!
+
+	            var fbo = framebuffer.glFramebuffers[this.CONTEXT_UID] || this.initFramebuffer(framebuffer);
+
+	            if (this.current !== framebuffer)
+	            {
+	                this.current = framebuffer;
+	                gl.bindFramebuffer(gl.FRAMEBUFFER, fbo.framebuffer);
+	            }
+	            // make sure all textures are unbound..
+
+	            // now check for updates...
+	            if (fbo.dirtyId !== framebuffer.dirtyId)
+	            {
+	                fbo.dirtyId = framebuffer.dirtyId;
+
+	                if (fbo.dirtyFormat !== framebuffer.dirtyFormat)
+	                {
+	                    fbo.dirtyFormat = framebuffer.dirtyFormat;
+	                    this.updateFramebuffer(framebuffer);
+	                }
+	                else if (fbo.dirtySize !== framebuffer.dirtySize)
+	                {
+	                    fbo.dirtySize = framebuffer.dirtySize;
+	                    this.resizeFramebuffer(framebuffer);
+	                }
+	            }
+
+	            for (var i = 0; i < framebuffer.colorTextures.length; i++)
+	            {
+	                if (framebuffer.colorTextures[i].texturePart)
+	                {
+	                    this.renderer.texture.unbind(framebuffer.colorTextures[i].texture);
+	                }
+	                else
+	                {
+	                    this.renderer.texture.unbind(framebuffer.colorTextures[i]);
+	                }
+	            }
+
+	            if (framebuffer.depthTexture)
+	            {
+	                this.renderer.texture.unbind(framebuffer.depthTexture);
+	            }
+
+	            if (frame)
+	            {
+	                this.setViewport(frame.x, frame.y, frame.width, frame.height);
+	            }
+	            else
+	            {
+	                this.setViewport(0, 0, framebuffer.width, framebuffer.height);
+	            }
+	        }
+	        else
+	        {
+	            if (this.current)
+	            {
+	                this.current = null;
+	                gl.bindFramebuffer(gl.FRAMEBUFFER, null);
+	            }
+
+	            if (frame)
+	            {
+	                this.setViewport(frame.x, frame.y, frame.width, frame.height);
+	            }
+	            else
+	            {
+	                this.setViewport(0, 0, this.renderer.width, this.renderer.height);
+	            }
+	        }
+	    };
+
+	    /**
+	     * Set the WebGLRenderingContext's viewport.
+	     *
+	     * @param {Number} x - X position of viewport
+	     * @param {Number} y - Y position of viewport
+	     * @param {Number} width - Width of viewport
+	     * @param {Number} height - Height of viewport
+	     */
+	    FramebufferSystem.prototype.setViewport = function setViewport (x, y, width, height)
+	    {
+	        var v = this.viewport;
+
+	        if (v.width !== width || v.height !== height || v.x !== x || v.y !== y)
+	        {
+	            v.x = x;
+	            v.y = y;
+	            v.width = width;
+	            v.height = height;
+
+	            this.gl.viewport(x, y, width, height);
+	        }
+	    };
+
+	    /**
+	     * Get the size of the current width and height. Returns object with `width` and `height` values.
+	     *
+	     * @member {object}
+	     * @readonly
+	     */
+	    prototypeAccessors.size.get = function ()
+	    {
+	        if (this.current)
+	        {
+	            // TODO store temp
+	            return { x: 0, y: 0, width: this.current.width, height: this.current.height };
+	        }
+
+	        return { x: 0, y: 0, width: this.renderer.width, height: this.renderer.height };
+	    };
+
+	    /**
+	     * Clear the color of the context
+	     *
+	     * @param {Number} r - Red value from 0 to 1
+	     * @param {Number} g - Green value from 0 to 1
+	     * @param {Number} b - Blue value from 0 to 1
+	     * @param {Number} a - Alpha value from 0 to 1
+	     */
+	    FramebufferSystem.prototype.clear = function clear (r, g, b, a)
+	    {
+	        var ref = this;
+	        var gl = ref.gl;
+
+	        // TODO clear color can be set only one right?
+	        gl.clearColor(r, g, b, a);
+	        gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+	    };
+
+	    /**
+	     * Initialize framebuffer
+	     *
+	     * @protected
+	     * @param {PIXI.Framebuffer} framebuffer
+	     */
+	    FramebufferSystem.prototype.initFramebuffer = function initFramebuffer (framebuffer)
+	    {
+	        var ref = this;
+	        var gl = ref.gl;
+
+	        // TODO - make this a class?
+	        var fbo = {
+	            framebuffer: gl.createFramebuffer(),
+	            stencil: null,
+	            dirtyId: 0,
+	            dirtyFormat: 0,
+	            dirtySize: 0,
+	        };
+
+	        framebuffer.glFramebuffers[this.CONTEXT_UID] = fbo;
+
+	        this.managedFramebuffers.push(framebuffer);
+	        framebuffer.disposeRunner.add(this);
+
+	        return fbo;
+	    };
+
+	    /**
+	     * Resize the framebuffer
+	     *
+	     * @protected
+	     * @param {PIXI.Framebuffer} framebuffer
+	     */
+	    FramebufferSystem.prototype.resizeFramebuffer = function resizeFramebuffer (framebuffer)
+	    {
+	        var ref = this;
+	        var gl = ref.gl;
+
+	        var fbo = framebuffer.glFramebuffers[this.CONTEXT_UID];
+
+	        if (fbo.stencil)
+	        {
+	            gl.bindRenderbuffer(gl.RENDERBUFFER, fbo.stencil);
+	            gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_STENCIL, framebuffer.width, framebuffer.height);
+	        }
+
+	        var colorTextures = framebuffer.colorTextures;
+
+	        for (var i = 0; i < colorTextures.length; i++)
+	        {
+	            this.renderer.texture.bind(colorTextures[i], 0);
+	        }
+
+	        if (framebuffer.depthTexture)
+	        {
+	            this.renderer.texture.bind(framebuffer.depthTexture, 0);
+	        }
+	    };
+
+	    /**
+	     * Update the framebuffer
+	     *
+	     * @protected
+	     * @param {PIXI.Framebuffer} framebuffer
+	     */
+	    FramebufferSystem.prototype.updateFramebuffer = function updateFramebuffer (framebuffer)
+	    {
+	        var ref = this;
+	        var gl = ref.gl;
+
+	        var fbo = framebuffer.glFramebuffers[this.CONTEXT_UID];
+
+	        // bind the color texture
+	        var colorTextures = framebuffer.colorTextures;
+
+	        var count = colorTextures.length;
+
+	        if (!gl.drawBuffers)
+	        {
+	            count = Math.min(count, 1);
+	        }
+
+	        var activeTextures = [];
+
+	        for (var i = 0; i < count; i++)
+	        {
+	            var texture = framebuffer.colorTextures[i];
+
+	            if (texture.texturePart)
+	            {
+	                this.renderer.texture.bind(texture.texture, 0);
+
+	                gl.framebufferTexture2D(gl.FRAMEBUFFER,
+	                    gl.COLOR_ATTACHMENT0 + i,
+	                    gl.TEXTURE_CUBE_MAP_NEGATIVE_X + texture.side,
+	                    texture.texture._glTextures[this.CONTEXT_UID].texture,
+	                    0);
+	            }
+	            else
+	            {
+	                this.renderer.texture.bind(texture, 0);
+
+	                gl.framebufferTexture2D(gl.FRAMEBUFFER,
+	                    gl.COLOR_ATTACHMENT0 + i,
+	                    gl.TEXTURE_2D,
+	                    texture._glTextures[this.CONTEXT_UID].texture,
+	                    0);
+	            }
+
+	            activeTextures.push(gl.COLOR_ATTACHMENT0 + i);
+	        }
+
+	        if (activeTextures.length > 1)
+	        {
+	            gl.drawBuffers(activeTextures);
+	        }
+
+	        if (framebuffer.depthTexture)
+	        {
+	            var writeDepthTexture = this.writeDepthTexture;
+
+	            if (writeDepthTexture)
+	            {
+	                var depthTexture = framebuffer.depthTexture;
+
+	                this.renderer.texture.bind(depthTexture, 0);
+
+	                gl.framebufferTexture2D(gl.FRAMEBUFFER,
+	                    gl.DEPTH_ATTACHMENT,
+	                    gl.TEXTURE_2D,
+	                    depthTexture._glTextures[this.CONTEXT_UID].texture,
+	                    0);
+	            }
+	        }
+
+	        if (!fbo.stencil && (framebuffer.stencil || framebuffer.depth))
+	        {
+	            fbo.stencil = gl.createRenderbuffer();
+
+	            gl.bindRenderbuffer(gl.RENDERBUFFER, fbo.stencil);
+
+	            gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_STENCIL, framebuffer.width, framebuffer.height);
+	            // TODO.. this is depth AND stencil?
+	            if (!framebuffer.depthTexture)
+	            { // you can't have both, so one should take priority if enabled
+	                gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_STENCIL_ATTACHMENT, gl.RENDERBUFFER, fbo.stencil);
+	            }
+	        }
+	    };
+
+	    /**
+	     * Disposes framebuffer
+	     * @param {PIXI.Framebuffer} framebuffer framebuffer that has to be disposed of
+	     * @param {boolean} [contextLost=false] If context was lost, we suppress all delete function calls
+	     */
+	    FramebufferSystem.prototype.disposeFramebuffer = function disposeFramebuffer (framebuffer, contextLost)
+	    {
+	        var fbo = framebuffer.glFramebuffers[this.CONTEXT_UID];
+	        var gl = this.gl;
+
+	        if (!fbo)
+	        {
+	            return;
+	        }
+
+	        delete framebuffer.glFramebuffers[this.CONTEXT_UID];
+
+	        var index = this.managedFramebuffers.indexOf(framebuffer);
+
+	        if (index >= 0)
+	        {
+	            this.managedFramebuffers.splice(index, 1);
+	        }
+
+	        framebuffer.disposeRunner.remove(this);
+
+	        if (!contextLost)
+	        {
+	            gl.deleteFramebuffer(fbo.framebuffer);
+	            if (fbo.stencil)
+	            {
+	                gl.deleteRenderbuffer(fbo.stencil);
+	            }
+	        }
+	    };
+
+	    /**
+	     * Disposes all framebuffers, but not textures bound to them
+	     * @param {boolean} [contextLost=false] If context was lost, we suppress all delete function calls
+	     */
+	    FramebufferSystem.prototype.disposeAll = function disposeAll (contextLost)
+	    {
+	        var list = this.managedFramebuffers;
+
+	        this.managedFramebuffers = [];
+
+	        for (var i = 0; i < list.length; i++)
+	        {
+	            this.disposeFramebuffer(list[i], contextLost);
+	        }
+	    };
+
+	    /**
+	     * Forcing creation of stencil buffer for current framebuffer, if it wasn't done before.
+	     * Used by MaskSystem, when its time to use stencil mask for Graphics element.
+	     *
+	     * Its an alternative for public lazy `framebuffer.enableStencil`, in case we need stencil without rebind.
+	     *
+	     * @private
+	     */
+	    FramebufferSystem.prototype.forceStencil = function forceStencil ()
+	    {
+	        var framebuffer = this.current;
+
+	        if (!framebuffer)
+	        {
+	            return;
+	        }
+
+	        var fbo = framebuffer.glFramebuffers[this.CONTEXT_UID];
+
+	        if (!fbo || fbo.stencil)
+	        {
+	            return;
+	        }
+	        framebuffer.enableStencil();
+
+	        var w = framebuffer.width;
+	        var h = framebuffer.height;
+	        var gl = this.gl;
+	        var stencil = gl.createRenderbuffer();
+
+	        gl.bindRenderbuffer(gl.RENDERBUFFER, stencil);
+	        gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_STENCIL, w, h);
+
+	        fbo.stencil = stencil;
+	        gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.STENCIL_ATTACHMENT, gl.RENDERBUFFER, stencil);
+	        gl.bindFramebuffer(gl.FRAMEBUFFER, fbo.framebuffer);
+	    };
+
+	    /**
+	     * resets framebuffer stored state, binds screen framebuffer
+	     *
+	     * should be called before renderTexture reset()
+	     */
+	    FramebufferSystem.prototype.reset = function reset ()
+	    {
+	        this.current = this.unknownFramebuffer;
+	        this.viewport = new Rectangle();
+	    };
+
+	    Object.defineProperties( FramebufferSystem.prototype, prototypeAccessors );
+
+	    return FramebufferSystem;
+	}(System));
+
+	var GLBuffer = function GLBuffer(buffer)
+	{
+	    this.buffer = buffer;
+	    this.updateID = -1;
+	    this.byteLength = -1;
+	    this.refCount = 0;
+	};
+
+	var byteSizeMap$1 = { 5126: 4, 5123: 2, 5121: 1 };
+
+	/**
+	 * System plugin to the renderer to manage geometry.
+	 *
+	 * @class
+	 * @extends PIXI.System
+	 * @memberof PIXI.systems
+	 */
+	var GeometrySystem = /*@__PURE__*/(function (System) {
+	    function GeometrySystem(renderer)
+	    {
+	        System.call(this, renderer);
+
+	        this._activeGeometry = null;
+	        this._activeVao = null;
+
+	        /**
+	         * `true` if we has `*_vertex_array_object` extension
+	         * @member {boolean}
+	         * @readonly
+	         */
+	        this.hasVao = true;
+
+	        /**
+	         * `true` if has `ANGLE_instanced_arrays` extension
+	         * @member {boolean}
+	         * @readonly
+	         */
+	        this.hasInstance = true;
+
+	        /**
+	         * `true` if support `gl.UNSIGNED_INT` in `gl.drawElements` or `gl.drawElementsInstanced`
+	         * @member {boolean}
+	         * @readonly
+	         */
+	        this.canUseUInt32ElementIndex = false;
+
+	        /**
+	         * A cache of currently bound buffer,
+	         * contains only two members with keys ARRAY_BUFFER and ELEMENT_ARRAY_BUFFER
+	         * @member {Object.<number, PIXI.Buffer>}
+	         * @readonly
+	         */
+	        this.boundBuffers = {};
+
+	        /**
+	         * Cache for all geometries by id, used in case renderer gets destroyed or for profiling
+	         * @member {object}
+	         * @readonly
+	         */
+	        this.managedGeometries = {};
+
+	        /**
+	         * Cache for all buffers by id, used in case renderer gets destroyed or for profiling
+	         * @member {object}
+	         * @readonly
+	         */
+	        this.managedBuffers = {};
+	    }
+
+	    if ( System ) { GeometrySystem.__proto__ = System; }
+	    GeometrySystem.prototype = Object.create( System && System.prototype );
+	    GeometrySystem.prototype.constructor = GeometrySystem;
+
+	    /**
+	     * Sets up the renderer context and necessary buffers.
+	     */
+	    GeometrySystem.prototype.contextChange = function contextChange ()
+	    {
+	        this.disposeAll(true);
+
+	        var gl = this.gl = this.renderer.gl;
+	        var context = this.renderer.context;
+
+	        this.CONTEXT_UID = this.renderer.CONTEXT_UID;
+
+	        // webgl2
+	        if (!gl.createVertexArray)
+	        {
+	            // webgl 1!
+	            var nativeVaoExtension = this.renderer.context.extensions.vertexArrayObject;
+
+	            if (settings.PREFER_ENV === ENV.WEBGL_LEGACY)
+	            {
+	                nativeVaoExtension = null;
+	            }
+
+	            if (nativeVaoExtension)
+	            {
+	                gl.createVertexArray = function () { return nativeVaoExtension.createVertexArrayOES(); };
+
+	                gl.bindVertexArray = function (vao) { return nativeVaoExtension.bindVertexArrayOES(vao); };
+
+	                gl.deleteVertexArray = function (vao) { return nativeVaoExtension.deleteVertexArrayOES(vao); };
+	            }
+	            else
+	            {
+	                this.hasVao = false;
+	                gl.createVertexArray = function () {
+	                    // empty
+	                };
+
+	                gl.bindVertexArray = function () {
+	                    // empty
+	                };
+
+	                gl.deleteVertexArray = function () {
+	                    // empty
+	                };
+	            }
+	        }
+
+	        if (!gl.vertexAttribDivisor)
+	        {
+	            var instanceExt = gl.getExtension('ANGLE_instanced_arrays');
+
+	            if (instanceExt)
+	            {
+	                gl.vertexAttribDivisor = function (a, b) { return instanceExt.vertexAttribDivisorANGLE(a, b); };
+
+	                gl.drawElementsInstanced = function (a, b, c, d, e) { return instanceExt.drawElementsInstancedANGLE(a, b, c, d, e); };
+
+	                gl.drawArraysInstanced = function (a, b, c, d) { return instanceExt.drawArraysInstancedANGLE(a, b, c, d); };
+	            }
+	            else
+	            {
+	                this.hasInstance = false;
+	            }
+	        }
+
+	        this.canUseUInt32ElementIndex = context.webGLVersion === 2 || !!context.extensions.uint32ElementIndex;
+	    };
+
+	    /**
+	     * Binds geometry so that is can be drawn. Creating a Vao if required
+	     *
+	     * @param {PIXI.Geometry} geometry instance of geometry to bind
+	     * @param {PIXI.Shader} [shader] instance of shader to use vao for
+	     */
+	    GeometrySystem.prototype.bind = function bind (geometry, shader)
+	    {
+	        shader = shader || this.renderer.shader.shader;
+
+	        var ref = this;
+	        var gl = ref.gl;
+
+	        // not sure the best way to address this..
+	        // currently different shaders require different VAOs for the same geometry
+	        // Still mulling over the best way to solve this one..
+	        // will likely need to modify the shader attribute locations at run time!
+	        var vaos = geometry.glVertexArrayObjects[this.CONTEXT_UID];
+
+	        if (!vaos)
+	        {
+	            this.managedGeometries[geometry.id] = geometry;
+	            geometry.disposeRunner.add(this);
+	            geometry.glVertexArrayObjects[this.CONTEXT_UID] = vaos = {};
+	        }
+
+	        var vao = vaos[shader.program.id] || this.initGeometryVao(geometry, shader.program);
+
+	        this._activeGeometry = geometry;
+
+	        if (this._activeVao !== vao)
+	        {
+	            this._activeVao = vao;
+
+	            if (this.hasVao)
+	            {
+	                gl.bindVertexArray(vao);
+	            }
+	            else
+	            {
+	                this.activateVao(geometry, shader.program);
+	            }
+	        }
+
+	        // TODO - optimise later!
+	        // don't need to loop through if nothing changed!
+	        // maybe look to add an 'autoupdate' to geometry?
+	        this.updateBuffers();
+	    };
+
+	    /**
+	     * Reset and unbind any active VAO and geometry
+	     */
+	    GeometrySystem.prototype.reset = function reset ()
+	    {
+	        this.unbind();
+	    };
+
+	    /**
+	     * Update buffers
+	     * @protected
+	     */
+	    GeometrySystem.prototype.updateBuffers = function updateBuffers ()
+	    {
+	        var geometry = this._activeGeometry;
+	        var ref = this;
+	        var gl = ref.gl;
+
+	        for (var i = 0; i < geometry.buffers.length; i++)
+	        {
+	            var buffer = geometry.buffers[i];
+
+	            var glBuffer = buffer._glBuffers[this.CONTEXT_UID];
+
+	            if (buffer._updateID !== glBuffer.updateID)
+	            {
+	                glBuffer.updateID = buffer._updateID;
+
+	                // TODO can cache this on buffer! maybe added a getter / setter?
+	                var type = buffer.index ? gl.ELEMENT_ARRAY_BUFFER : gl.ARRAY_BUFFER;
+
+	                // TODO this could change if the VAO changes...
+	                // need to come up with a better way to cache..
+	                // if (this.boundBuffers[type] !== glBuffer)
+	                // {
+	                // this.boundBuffers[type] = glBuffer;
+	                gl.bindBuffer(type, glBuffer.buffer);
+	                // }
+
+	                this._boundBuffer = glBuffer;
+
+	                if (glBuffer.byteLength >= buffer.data.byteLength)
+	                {
+	                    // offset is always zero for now!
+	                    gl.bufferSubData(type, 0, buffer.data);
+	                }
+	                else
+	                {
+	                    var drawType = buffer.static ? gl.STATIC_DRAW : gl.DYNAMIC_DRAW;
+
+	                    glBuffer.byteLength = buffer.data.byteLength;
+	                    gl.bufferData(type, buffer.data, drawType);
+	                }
+	            }
+	        }
+	    };
+
+	    /**
+	     * Check compability between a geometry and a program
+	     * @protected
+	     * @param {PIXI.Geometry} geometry - Geometry instance
+	     * @param {PIXI.Program} program - Program instance
+	     */
+	    GeometrySystem.prototype.checkCompatibility = function checkCompatibility (geometry, program)
+	    {
+	        // geometry must have at least all the attributes that the shader requires.
+	        var geometryAttributes = geometry.attributes;
+	        var shaderAttributes = program.attributeData;
+
+	        for (var j in shaderAttributes)
+	        {
+	            if (!geometryAttributes[j])
+	            {
+	                throw new Error(("shader and geometry incompatible, geometry missing the \"" + j + "\" attribute"));
+	            }
+	        }
+	    };
+
+	    /**
+	     * Takes a geometry and program and generates a unique signature for them.
+	     *
+	     * @param {PIXI.Geometry} geometry to get signature from
+	     * @param {PIXI.Program} program to test geometry against
+	     * @returns {String} Unique signature of the geometry and program
+	     * @protected
+	     */
+	    GeometrySystem.prototype.getSignature = function getSignature (geometry, program)
+	    {
+	        var attribs = geometry.attributes;
+	        var shaderAttributes = program.attributeData;
+
+	        var strings = ['g', geometry.id];
+
+	        for (var i in attribs)
+	        {
+	            if (shaderAttributes[i])
+	            {
+	                strings.push(i);
+	            }
+	        }
+
+	        return strings.join('-');
+	    };
+
+	    /**
+	     * Creates or gets Vao with the same structure as the geometry and stores it on the geometry.
+	     * If vao is created, it is bound automatically.
+	     *
+	     * @protected
+	     * @param {PIXI.Geometry} geometry - Instance of geometry to to generate Vao for
+	     * @param {PIXI.Program} program - Instance of program
+	     */
+	    GeometrySystem.prototype.initGeometryVao = function initGeometryVao (geometry, program)
+	    {
+	        this.checkCompatibility(geometry, program);
+
+	        var gl = this.gl;
+	        var CONTEXT_UID = this.CONTEXT_UID;
+
+	        var signature = this.getSignature(geometry, program);
+
+	        var vaoObjectHash = geometry.glVertexArrayObjects[this.CONTEXT_UID];
+
+	        var vao = vaoObjectHash[signature];
+
+	        if (vao)
+	        {
+	            // this will give us easy access to the vao
+	            vaoObjectHash[program.id] = vao;
+
+	            return vao;
+	        }
+
+	        var buffers = geometry.buffers;
+	        var attributes = geometry.attributes;
+	        var tempStride = {};
+	        var tempStart = {};
+
+	        for (var j in buffers)
+	        {
+	            tempStride[j] = 0;
+	            tempStart[j] = 0;
+	        }
+
+	        for (var j$1 in attributes)
+	        {
+	            if (!attributes[j$1].size && program.attributeData[j$1])
+	            {
+	                attributes[j$1].size = program.attributeData[j$1].size;
+	            }
+	            else if (!attributes[j$1].size)
+	            {
+	                console.warn(("PIXI Geometry attribute '" + j$1 + "' size cannot be determined (likely the bound shader does not have the attribute)"));  // eslint-disable-line
+	            }
+
+	            tempStride[attributes[j$1].buffer] += attributes[j$1].size * byteSizeMap$1[attributes[j$1].type];
+	        }
+
+	        for (var j$2 in attributes)
+	        {
+	            var attribute = attributes[j$2];
+	            var attribSize = attribute.size;
+
+	            if (attribute.stride === undefined)
+	            {
+	                if (tempStride[attribute.buffer] === attribSize * byteSizeMap$1[attribute.type])
+	                {
+	                    attribute.stride = 0;
+	                }
+	                else
+	                {
+	                    attribute.stride = tempStride[attribute.buffer];
+	                }
+	            }
+
+	            if (attribute.start === undefined)
+	            {
+	                attribute.start = tempStart[attribute.buffer];
+
+	                tempStart[attribute.buffer] += attribSize * byteSizeMap$1[attribute.type];
+	            }
+	        }
+
+	        vao = gl.createVertexArray();
+
+	        gl.bindVertexArray(vao);
+
+	        // first update - and create the buffers!
+	        // only create a gl buffer if it actually gets
+	        for (var i = 0; i < buffers.length; i++)
+	        {
+	            var buffer = buffers[i];
+
+	            if (!buffer._glBuffers[CONTEXT_UID])
+	            {
+	                buffer._glBuffers[CONTEXT_UID] = new GLBuffer(gl.createBuffer());
+	                this.managedBuffers[buffer.id] = buffer;
+	                buffer.disposeRunner.add(this);
+	            }
+
+	            buffer._glBuffers[CONTEXT_UID].refCount++;
+	        }
+
+	        // TODO - maybe make this a data object?
+	        // lets wait to see if we need to first!
+
+	        this.activateVao(geometry, program);
+
+	        this._activeVao = vao;
+
+	        // add it to the cache!
+	        vaoObjectHash[program.id] = vao;
+	        vaoObjectHash[signature] = vao;
+
+	        return vao;
+	    };
+
+	    /**
+	     * Disposes buffer
+	     * @param {PIXI.Buffer} buffer buffer with data
+	     * @param {boolean} [contextLost=false] If context was lost, we suppress deleteVertexArray
+	     */
+	    GeometrySystem.prototype.disposeBuffer = function disposeBuffer (buffer, contextLost)
+	    {
+	        if (!this.managedBuffers[buffer.id])
+	        {
+	            return;
+	        }
+
+	        delete this.managedBuffers[buffer.id];
+
+	        var glBuffer = buffer._glBuffers[this.CONTEXT_UID];
+	        var gl = this.gl;
+
+	        buffer.disposeRunner.remove(this);
+
+	        if (!glBuffer)
+	        {
+	            return;
+	        }
+
+	        if (!contextLost)
+	        {
+	            gl.deleteBuffer(glBuffer.buffer);
+	        }
+
+	        delete buffer._glBuffers[this.CONTEXT_UID];
+	    };
+
+	    /**
+	     * Disposes geometry
+	     * @param {PIXI.Geometry} geometry Geometry with buffers. Only VAO will be disposed
+	     * @param {boolean} [contextLost=false] If context was lost, we suppress deleteVertexArray
+	     */
+	    GeometrySystem.prototype.disposeGeometry = function disposeGeometry (geometry, contextLost)
+	    {
+	        if (!this.managedGeometries[geometry.id])
+	        {
+	            return;
+	        }
+
+	        delete this.managedGeometries[geometry.id];
+
+	        var vaos = geometry.glVertexArrayObjects[this.CONTEXT_UID];
+	        var gl = this.gl;
+	        var buffers = geometry.buffers;
+
+	        geometry.disposeRunner.remove(this);
+
+	        if (!vaos)
+	        {
+	            return;
+	        }
+
+	        for (var i = 0; i < buffers.length; i++)
+	        {
+	            var buf = buffers[i]._glBuffers[this.CONTEXT_UID];
+
+	            buf.refCount--;
+	            if (buf.refCount === 0 && !contextLost)
+	            {
+	                this.disposeBuffer(buffers[i], contextLost);
+	            }
+	        }
+
+	        if (!contextLost)
+	        {
+	            for (var vaoId in vaos)
+	            {
+	                // delete only signatures, everything else are copies
+	                if (vaoId[0] === 'g')
+	                {
+	                    var vao = vaos[vaoId];
+
+	                    if (this._activeVao === vao)
+	                    {
+	                        this.unbind();
+	                    }
+	                    gl.deleteVertexArray(vao);
+	                }
+	            }
+	        }
+
+	        delete geometry.glVertexArrayObjects[this.CONTEXT_UID];
+	    };
+
+	    /**
+	     * dispose all WebGL resources of all managed geometries and buffers
+	     * @param {boolean} [contextLost=false] If context was lost, we suppress `gl.delete` calls
+	     */
+	    GeometrySystem.prototype.disposeAll = function disposeAll (contextLost)
+	    {
+	        var all = Object.keys(this.managedGeometries);
+
+	        for (var i = 0; i < all.length; i++)
+	        {
+	            this.disposeGeometry(this.managedGeometries[all[i]], contextLost);
+	        }
+	        all = Object.keys(this.managedBuffers);
+	        for (var i$1 = 0; i$1 < all.length; i$1++)
+	        {
+	            this.disposeBuffer(this.managedBuffers[all[i$1]], contextLost);
+	        }
+	    };
+
+	    /**
+	     * Activate vertex array object
+	     *
+	     * @protected
+	     * @param {PIXI.Geometry} geometry - Geometry instance
+	     * @param {PIXI.Program} program - Shader program instance
+	     */
+	    GeometrySystem.prototype.activateVao = function activateVao (geometry, program)
+	    {
+	        var gl = this.gl;
+	        var CONTEXT_UID = this.CONTEXT_UID;
+	        var buffers = geometry.buffers;
+	        var attributes = geometry.attributes;
+
+	        if (geometry.indexBuffer)
+	        {
+	            // first update the index buffer if we have one..
+	            gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, geometry.indexBuffer._glBuffers[CONTEXT_UID].buffer);
+	        }
+
+	        var lastBuffer = null;
+
+	        // add a new one!
+	        for (var j in attributes)
+	        {
+	            var attribute = attributes[j];
+	            var buffer = buffers[attribute.buffer];
+	            var glBuffer = buffer._glBuffers[CONTEXT_UID];
+
+	            if (program.attributeData[j])
+	            {
+	                if (lastBuffer !== glBuffer)
+	                {
+	                    gl.bindBuffer(gl.ARRAY_BUFFER, glBuffer.buffer);
+
+	                    lastBuffer = glBuffer;
+	                }
+
+	                var location = program.attributeData[j].location;
+
+	                // TODO introduce state again
+	                // we can optimise this for older devices that have no VAOs
+	                gl.enableVertexAttribArray(location);
+
+	                gl.vertexAttribPointer(location,
+	                    attribute.size,
+	                    attribute.type || gl.FLOAT,
+	                    attribute.normalized,
+	                    attribute.stride,
+	                    attribute.start);
+
+	                if (attribute.instance)
+	                {
+	                    // TODO calculate instance count based of this...
+	                    if (this.hasInstance)
+	                    {
+	                        gl.vertexAttribDivisor(location, 1);
+	                    }
+	                    else
+	                    {
+	                        throw new Error('geometry error, GPU Instancing is not supported on this device');
+	                    }
+	                }
+	            }
+	        }
+	    };
+
+	    /**
+	     * Draw the geometry
+	     *
+	     * @param {Number} type - the type primitive to render
+	     * @param {Number} [size] - the number of elements to be rendered
+	     * @param {Number} [start] - Starting index
+	     * @param {Number} [instanceCount] - the number of instances of the set of elements to execute
+	     */
+	    GeometrySystem.prototype.draw = function draw (type, size, start, instanceCount)
+	    {
+	        var ref = this;
+	        var gl = ref.gl;
+	        var geometry = this._activeGeometry;
+
+	        // TODO.. this should not change so maybe cache the function?
+
+	        if (geometry.indexBuffer)
+	        {
+	            var byteSize = geometry.indexBuffer.data.BYTES_PER_ELEMENT;
+	            var glType = byteSize === 2 ? gl.UNSIGNED_SHORT : gl.UNSIGNED_INT;
+
+	            if (byteSize === 2 || (byteSize === 4 && this.canUseUInt32ElementIndex))
+	            {
+	                if (geometry.instanced)
+	                {
+	                    /* eslint-disable max-len */
+	                    gl.drawElementsInstanced(type, size || geometry.indexBuffer.data.length, glType, (start || 0) * byteSize, instanceCount || 1);
+	                    /* eslint-enable max-len */
+	                }
+	                else
+	                {
+	                    /* eslint-disable max-len */
+	                    gl.drawElements(type, size || geometry.indexBuffer.data.length, glType, (start || 0) * byteSize);
+	                    /* eslint-enable max-len */
+	                }
+	            }
+	            else
+	            {
+	                console.warn('unsupported index buffer type: uint32');
+	            }
+	        }
+	        else if (geometry.instanced)
+	        {
+	            // TODO need a better way to calculate size..
+	            gl.drawArraysInstanced(type, start, size || geometry.getSize(), instanceCount || 1);
+	        }
+	        else
+	        {
+	            gl.drawArrays(type, start, size || geometry.getSize());
+	        }
+
+	        return this;
+	    };
+
+	    /**
+	     * Unbind/reset everything
+	     * @protected
+	     */
+	    GeometrySystem.prototype.unbind = function unbind ()
+	    {
+	        this.gl.bindVertexArray(null);
+	        this._activeVao = null;
+	        this._activeGeometry = null;
+	    };
+
+	    return GeometrySystem;
+	}(System));
+
+	/**
+	 * @method compileProgram
+	 * @private
+	 * @memberof PIXI.glCore.shader
+	 * @param gl {WebGLRenderingContext} The current WebGL context {WebGLProgram}
+	 * @param vertexSrc {string|string[]} The vertex shader source as an array of strings.
+	 * @param fragmentSrc {string|string[]} The fragment shader source as an array of strings.
+	 * @param attributeLocations {Object} An attribute location map that lets you manually set the attribute locations
+	 * @return {WebGLProgram} the shader program
+	 */
+	function compileProgram(gl, vertexSrc, fragmentSrc, attributeLocations)
+	{
+	    var glVertShader = compileShader(gl, gl.VERTEX_SHADER, vertexSrc);
+	    var glFragShader = compileShader(gl, gl.FRAGMENT_SHADER, fragmentSrc);
+
+	    var program = gl.createProgram();
+
+	    gl.attachShader(program, glVertShader);
+	    gl.attachShader(program, glFragShader);
+
+	    // optionally, set the attributes manually for the program rather than letting WebGL decide..
+	    if (attributeLocations)
+	    {
+	        for (var i in attributeLocations)
+	        {
+	            gl.bindAttribLocation(program, attributeLocations[i], i);
+	        }
+	    }
+
+	    gl.linkProgram(program);
+
+	    // if linking fails, then log and cleanup
+	    if (!gl.getProgramParameter(program, gl.LINK_STATUS))
+	    {
+	        console.error('Pixi.js Error: Could not initialize shader.');
+	        console.error('gl.VALIDATE_STATUS', gl.getProgramParameter(program, gl.VALIDATE_STATUS));
+	        console.error('gl.getError()', gl.getError());
+
+	        // if there is a program info log, log it
+	        if (gl.getProgramInfoLog(program) !== '')
+	        {
+	            console.warn('Pixi.js Warning: gl.getProgramInfoLog()', gl.getProgramInfoLog(program));
+	        }
+
+	        gl.deleteProgram(program);
+	        program = null;
+	    }
+
+	    // clean up some shaders
+	    gl.deleteShader(glVertShader);
+	    gl.deleteShader(glFragShader);
+
+	    return program;
+	}
+
+	/**
+	 * @private
+	 * @param gl {WebGLRenderingContext} The current WebGL context {WebGLProgram}
+	 * @param type {Number} the type, can be either VERTEX_SHADER or FRAGMENT_SHADER
+	 * @param vertexSrc {string|string[]} The vertex shader source as an array of strings.
+	 * @return {WebGLShader} the shader
+	 */
+	function compileShader(gl, type, src)
+	{
+	    var shader = gl.createShader(type);
+
+	    gl.shaderSource(shader, src);
+	    gl.compileShader(shader);
+
+	    if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS))
+	    {
+	        console.warn(src);
+	        console.error(gl.getShaderInfoLog(shader));
+
+	        return null;
+	    }
+
+	    return shader;
+	}
+
+	/**
+	 * @method defaultValue
+	 * @memberof PIXI.glCore.shader
+	 * @param type {String} Type of value
+	 * @param size {Number}
+	 * @private
+	 */
+	function defaultValue(type, size)
+	{
+	    switch (type)
+	    {
+	        case 'float':
+	            return 0;
+
+	        case 'vec2':
+	            return new Float32Array(2 * size);
+
+	        case 'vec3':
+	            return new Float32Array(3 * size);
+
+	        case 'vec4':
+	            return new Float32Array(4 * size);
+
+	        case 'int':
+	        case 'sampler2D':
+	        case 'sampler2DArray':
+	            return 0;
+
+	        case 'ivec2':
+	            return new Int32Array(2 * size);
+
+	        case 'ivec3':
+	            return new Int32Array(3 * size);
+
+	        case 'ivec4':
+	            return new Int32Array(4 * size);
+
+	        case 'bool':
+	            return false;
+
+	        case 'bvec2':
+
+	            return booleanArray(2 * size);
+
+	        case 'bvec3':
+	            return booleanArray(3 * size);
+
+	        case 'bvec4':
+	            return booleanArray(4 * size);
+
+	        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]);
+	    }
+
+	    return null;
+	}
+
+	function booleanArray(size)
+	{
+	    var array = new Array(size);
+
+	    for (var i = 0; i < array.length; i++)
+	    {
+	        array[i] = false;
+	    }
+
+	    return array;
+	}
+
+	var unknownContext = {};
+	var context = unknownContext;
+
+	/**
+	 * returns a little WebGL context to use for program inspection.
+	 *
+	 * @static
+	 * @private
+	 * @returns {webGL-context} a gl context to test with
+	 */
+	function getTestContext()
+	{
+	    if (context === unknownContext)
+	    {
+	        var canvas = document.createElement('canvas');
+
+	        var gl;
+
+	        if (settings.PREFER_ENV >= ENV.WEBGL2)
+	        {
+	            gl = canvas.getContext('webgl2', {});
+	        }
+
+	        if (!gl)
+	        {
+	            gl = canvas.getContext('webgl', {})
+	            || canvas.getContext('experimental-webgl', {});
+
+	            if (!gl)
+	            {
+	                // fail, not able to get a context
+	                gl = null;
+	            }
+	            else
+	            {
+	                // for shader testing..
+	                gl.getExtension('WEBGL_draw_buffers');
+	            }
+	        }
+
+	        context = gl;
+	    }
+
+	    return context;
+	}
+
+	var maxFragmentPrecision;
+
+	function getMaxFragmentPrecision()
+	{
+	    if (!maxFragmentPrecision)
+	    {
+	        maxFragmentPrecision = PRECISION.MEDIUM;
+	        var gl = getTestContext();
+
+	        if (gl)
+	        {
+	            if (gl.getShaderPrecisionFormat)
+	            {
+	                var shaderFragment = gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.HIGH_FLOAT);
+
+	                maxFragmentPrecision = shaderFragment.precision ? PRECISION.HIGH : PRECISION.MEDIUM;
+	            }
+	        }
+	    }
+
+	    return maxFragmentPrecision;
+	}
+
+	/**
+	 * Sets the float precision on the shader, ensuring the device supports the request precision.
+	 * If the precision is already present, it just ensures that the device is able to handle it.
+	 *
+	 * @private
+	 * @param {string} src - The shader source
+	 * @param {string} requestedPrecision - The request float precision of the shader. Options are 'lowp', 'mediump' or 'highp'.
+	 * @param {string} maxSupportedPrecision - The maximum precision the shader supports.
+	 *
+	 * @return {string} modified shader source
+	 */
+	function setPrecision(src, requestedPrecision, maxSupportedPrecision)
+	{
+	    if (src.substring(0, 9) !== 'precision')
+	    {
+	        // no precision supplied, so PixiJS will add the requested level.
+	        var precision = requestedPrecision;
+
+	        // If highp is requested but not supported, downgrade precision to a level all devices support.
+	        if (requestedPrecision === PRECISION.HIGH && maxSupportedPrecision !== PRECISION.HIGH)
+	        {
+	            precision = PRECISION.MEDIUM;
+	        }
+
+	        return ("precision " + precision + " float;\n" + src);
+	    }
+	    else if (maxSupportedPrecision !== PRECISION.HIGH && src.substring(0, 15) === 'precision highp')
+	    {
+	        // precision was supplied, but at a level this device does not support, so downgrading to mediump.
+	        return src.replace('precision highp', 'precision mediump');
+	    }
+
+	    return src;
+	}
+
+	var GLSL_TO_SIZE = {
+	    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,
+	};
+
+	/**
+	 * @private
+	 * @method mapSize
+	 * @memberof PIXI.glCore.shader
+	 * @param type {String}
+	 * @return {Number}
+	 */
+	function mapSize(type)
+	{
+	    return GLSL_TO_SIZE[type];
+	}
+
+	var GL_TABLE = null;
+
+	var GL_TO_GLSL_TYPES = {
+	    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',
+	    SAMPLER_CUBE:  'samplerCube',
+	    SAMPLER_2D_ARRAY:  'sampler2DArray',
+	};
+
+	function mapType(gl, type)
+	{
+	    if (!GL_TABLE)
+	    {
+	        var typeNames = Object.keys(GL_TO_GLSL_TYPES);
+
+	        GL_TABLE = {};
+
+	        for (var i = 0; i < typeNames.length; ++i)
+	        {
+	            var tn = typeNames[i];
+
+	            GL_TABLE[gl[tn]] = GL_TO_GLSL_TYPES[tn];
+	        }
+	    }
+
+	    return GL_TABLE[type];
+	}
+
+	// cv = CachedValue
+	// v = value
+	// ud = uniformData
+	// uv = uniformValue
+	// l = location
+	var GLSL_TO_SINGLE_SETTERS_CACHED = {
+
+	    float: "\n    if(cv !== v)\n    {\n        cv.v = v;\n        gl.uniform1f(location, v)\n    }",
+
+	    vec2: "\n    if(cv[0] !== v[0] || cv[1] !== v[1])\n    {\n        cv[0] = v[0];\n        cv[1] = v[1];\n        gl.uniform2f(location, v[0], v[1])\n    }",
+
+	    vec3: "\n    if(cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])\n    {\n        cv[0] = v[0];\n        cv[1] = v[1];\n        cv[2] = v[2];\n\n        gl.uniform3f(location, v[0], v[1], v[2])\n    }",
+
+	    vec4:     'gl.uniform4f(location, v[0], v[1], v[2], v[3])',
+
+	    int:      'gl.uniform1i(location, v)',
+	    ivec2:    'gl.uniform2i(location, v[0], v[1])',
+	    ivec3:    'gl.uniform3i(location, v[0], v[1], v[2])',
+	    ivec4:    'gl.uniform4i(location, v[0], v[1], v[2], v[3])',
+
+	    bool:     'gl.uniform1i(location, v)',
+	    bvec2:    'gl.uniform2i(location, v[0], v[1])',
+	    bvec3:    'gl.uniform3i(location, v[0], v[1], v[2])',
+	    bvec4:    'gl.uniform4i(location, v[0], v[1], v[2], v[3])',
+
+	    mat2:     'gl.uniformMatrix2fv(location, false, v)',
+	    mat3:     'gl.uniformMatrix3fv(location, false, v)',
+	    mat4:     'gl.uniformMatrix4fv(location, false, v)',
+
+	    sampler2D:      'gl.uniform1i(location, v)',
+	    samplerCube:    'gl.uniform1i(location, v)',
+	    sampler2DArray: 'gl.uniform1i(location, v)',
+	};
+
+	var GLSL_TO_ARRAY_SETTERS = {
+
+	    float:    "gl.uniform1fv(location, v)",
+
+	    vec2:     "gl.uniform2fv(location, v)",
+	    vec3:     "gl.uniform3fv(location, v)",
+	    vec4:     'gl.uniform4fv(location, v)',
+
+	    mat4:     'gl.uniformMatrix4fv(location, false, v)',
+	    mat3:     'gl.uniformMatrix3fv(location, false, v)',
+	    mat2:     'gl.uniformMatrix2fv(location, false, v)',
+
+	    int:      'gl.uniform1iv(location, v)',
+	    ivec2:    'gl.uniform2iv(location, v)',
+	    ivec3:    'gl.uniform3iv(location, v)',
+	    ivec4:    'gl.uniform4iv(location, v)',
+
+	    bool:     'gl.uniform1iv(location, v)',
+	    bvec2:    'gl.uniform2iv(location, v)',
+	    bvec3:    'gl.uniform3iv(location, v)',
+	    bvec4:    'gl.uniform4iv(location, v)',
+
+	    sampler2D:      'gl.uniform1iv(location, v)',
+	    samplerCube:    'gl.uniform1iv(location, v)',
+	    sampler2DArray: 'gl.uniform1iv(location, v)',
+	};
+
+	function generateUniformsSync(group, uniformData)
+	{
+	    var textureCount = 0;
+	    var func = "var v = null;\n    var cv = null\n    var gl = renderer.gl";
+
+	    for (var i in group.uniforms)
+	    {
+	        var data = uniformData[i];
+
+	        if (!data)
+	        {
+	            if (group.uniforms[i].group)
+	            {
+	                func += "\n                    renderer.shader.syncUniformGroup(uv." + i + ");\n                ";
+	            }
+
+	            continue;
+	        }
+
+	        // TODO && uniformData[i].value !== 0 <-- do we still need this?
+	        if (data.type === 'float' && data.size === 1)
+	        {
+	            func += "\n            if(uv." + i + " !== ud." + i + ".value)\n            {\n                ud." + i + ".value = uv." + i + "\n                gl.uniform1f(ud." + i + ".location, uv." + i + ")\n            }\n";
+	        }
+	        /* eslint-disable max-len */
+	        else if ((data.type === 'sampler2D' || data.type === 'samplerCube' || data.type === 'sampler2DArray') && data.size === 1 && !data.isArray)
+	        /* eslint-disable max-len */
+	        {
+	            func += "\n            renderer.texture.bind(uv." + i + ", " + textureCount + ");\n\n            if(ud." + i + ".value !== " + textureCount + ")\n            {\n                ud." + i + ".value = " + textureCount + ";\n                gl.uniform1i(ud." + i + ".location, " + textureCount + ");\n; // eslint-disable-line max-len\n            }\n";
+
+	            textureCount++;
+	        }
+	        else if (data.type === 'mat3' && data.size === 1)
+	        {
+	            if (group.uniforms[i].a !== undefined)
+	            {
+	                // TODO and some smart caching dirty ids here!
+	                func += "\n                gl.uniformMatrix3fv(ud." + i + ".location, false, uv." + i + ".toArray(true));\n                \n";
+	            }
+	            else
+	            {
+	                func += "\n                gl.uniformMatrix3fv(ud." + i + ".location, false, uv." + i + ");\n                \n";
+	            }
+	        }
+	        else if (data.type === 'vec2' && data.size === 1)
+	        {
+	            // TODO - do we need both here?
+	            // maybe we can get away with only using points?
+	            if (group.uniforms[i].x !== undefined)
+	            {
+	                func += "\n                cv = ud." + i + ".value;\n                v = uv." + i + ";\n\n                if(cv[0] !== v.x || cv[1] !== v.y)\n                {\n                    cv[0] = v.x;\n                    cv[1] = v.y;\n                    gl.uniform2f(ud." + i + ".location, v.x, v.y);\n                }\n";
+	            }
+	            else
+	            {
+	                func += "\n                cv = ud." + i + ".value;\n                v = uv." + i + ";\n\n                if(cv[0] !== v[0] || cv[1] !== v[1])\n                {\n                    cv[0] = v[0];\n                    cv[1] = v[1];\n                    gl.uniform2f(ud." + i + ".location, v[0], v[1]);\n                }\n                \n";
+	            }
+	        }
+	        else if (data.type === 'vec4' && data.size === 1)
+	        {
+	            // TODO - do we need both here?
+	            // maybe we can get away with only using points?
+	            if (group.uniforms[i].width !== undefined)
+	            {
+	                func += "\n                cv = ud." + i + ".value;\n                v = uv." + i + ";\n\n                if(cv[0] !== v.x || cv[1] !== v.y || cv[2] !== v.width || cv[3] !== v.height)\n                {\n                    cv[0] = v.x;\n                    cv[1] = v.y;\n                    cv[2] = v.width;\n                    cv[3] = v.height;\n                    gl.uniform4f(ud." + i + ".location, v.x, v.y, v.width, v.height)\n                }\n";
+	            }
+	            else
+	            {
+	                func += "\n                cv = ud." + i + ".value;\n                v = uv." + i + ";\n\n                if(cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])\n                {\n                    cv[0] = v[0];\n                    cv[1] = v[1];\n                    cv[2] = v[2];\n                    cv[3] = v[3];\n\n                    gl.uniform4f(ud." + i + ".location, v[0], v[1], v[2], v[3])\n                }\n                \n";
+	            }
+	        }
+	        else
+	        {
+	            var templateType = (data.size === 1) ? GLSL_TO_SINGLE_SETTERS_CACHED : GLSL_TO_ARRAY_SETTERS;
+
+	            var template =  templateType[data.type].replace('location', ("ud." + i + ".location"));
+
+	            func += "\n            cv = ud." + i + ".value;\n            v = uv." + i + ";\n            " + template + ";\n";
+	        }
+	    }
+
+	    return new Function('ud', 'uv', 'renderer', func); // eslint-disable-line no-new-func
+	}
+
+	var fragTemplate = [
+	    'precision mediump float;',
+	    'void main(void){',
+	    'float test = 0.1;',
+	    '%forloop%',
+	    'gl_FragColor = vec4(0.0);',
+	    '}' ].join('\n');
+
+	function checkMaxIfStatementsInShader(maxIfs, gl)
+	{
+	    if (maxIfs === 0)
+	    {
+	        throw new Error('Invalid value of `0` passed to `checkMaxIfStatementsInShader`');
+	    }
+
+	    var shader = gl.createShader(gl.FRAGMENT_SHADER);
+
+	    while (true) // eslint-disable-line no-constant-condition
+	    {
+	        var fragmentSrc = fragTemplate.replace(/%forloop%/gi, generateIfTestSrc(maxIfs));
+
+	        gl.shaderSource(shader, fragmentSrc);
+	        gl.compileShader(shader);
+
+	        if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS))
+	        {
+	            maxIfs = (maxIfs / 2) | 0;
+	        }
+	        else
+	        {
+	            // valid!
+	            break;
+	        }
+	    }
+
+	    return maxIfs;
+	}
+
+	function generateIfTestSrc(maxIfs)
+	{
+	    var src = '';
+
+	    for (var i = 0; i < maxIfs; ++i)
+	    {
+	        if (i > 0)
+	        {
+	            src += '\nelse ';
+	        }
+
+	        if (i < maxIfs - 1)
+	        {
+	            src += "if(test == " + i + ".0){}";
+	        }
+	    }
+
+	    return src;
+	}
+
+	// Cache the result to prevent running this over and over
+	var unsafeEval;
+
+	/**
+	 * Not all platforms allow to generate function code (e.g., `new Function`).
+	 * this provides the platform-level detection.
+	 *
+	 * @private
+	 * @returns {boolean}
+	 */
+	function unsafeEvalSupported()
+	{
+	    if (typeof unsafeEval === 'boolean')
+	    {
+	        return unsafeEval;
+	    }
+
+	    try
+	    {
+	        /* eslint-disable no-new-func */
+	        var func = new Function('param1', 'param2', 'param3', 'return param1[param2] === param3;');
+	        /* eslint-enable no-new-func */
+
+	        unsafeEval = func({ a: 'b' }, 'a', 'b') === true;
+	    }
+	    catch (e)
+	    {
+	        unsafeEval = false;
+	    }
+
+	    return unsafeEval;
+	}
+
+	var defaultFragment = "varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\n\nvoid main(void){\n   gl_FragColor *= texture2D(uSampler, vTextureCoord);\n}";
+
+	var defaultVertex = "attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void){\n   gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n   vTextureCoord = aTextureCoord;\n}\n";
+
+	// import * as from '../systems/shader/shader';
+
+	var UID$3 = 0;
+
+	var nameCache = {};
+
+	/**
+	 * Helper class to create a shader program.
+	 *
+	 * @class
+	 * @memberof PIXI
+	 */
+	var Program = function Program(vertexSrc, fragmentSrc, name)
+	{
+	    if ( name === void 0 ) { name = 'pixi-shader'; }
+
+	    this.id = UID$3++;
+
+	    /**
+	     * The vertex shader.
+	     *
+	     * @member {string}
+	     */
+	    this.vertexSrc = vertexSrc || Program.defaultVertexSrc;
+
+	    /**
+	     * The fragment shader.
+	     *
+	     * @member {string}
+	     */
+	    this.fragmentSrc = fragmentSrc || Program.defaultFragmentSrc;
+
+	    this.vertexSrc = this.vertexSrc.trim();
+	    this.fragmentSrc = this.fragmentSrc.trim();
+
+	    if (this.vertexSrc.substring(0, 8) !== '#version')
+	    {
+	        name = name.replace(/\s+/g, '-');
+
+	        if (nameCache[name])
+	        {
+	            nameCache[name]++;
+	            name += "-" + (nameCache[name]);
+	        }
+	        else
+	        {
+	            nameCache[name] = 1;
+	        }
+
+	        this.vertexSrc = "#define SHADER_NAME " + name + "\n" + (this.vertexSrc);
+	        this.fragmentSrc = "#define SHADER_NAME " + name + "\n" + (this.fragmentSrc);
+
+	        this.vertexSrc = setPrecision(this.vertexSrc, settings.PRECISION_VERTEX, PRECISION.HIGH);
+	        this.fragmentSrc = setPrecision(this.fragmentSrc, settings.PRECISION_FRAGMENT, getMaxFragmentPrecision());
+	    }
+
+	    // currently this does not extract structs only default types
+	    this.extractData(this.vertexSrc, this.fragmentSrc);
+
+	    // this is where we store shader references..
+	    this.glPrograms = {};
+
+	    this.syncUniforms = null;
+	};
+
+	var staticAccessors$3 = { defaultVertexSrc: { configurable: true },defaultFragmentSrc: { configurable: true } };
+
+	/**
+	 * Extracts the data for a buy creating a small test program
+	 * or reading the src directly.
+	 * @protected
+	 *
+	 * @param {string} [vertexSrc] - The source of the vertex shader.
+	 * @param {string} [fragmentSrc] - The source of the fragment shader.
+	 */
+	Program.prototype.extractData = function extractData (vertexSrc, fragmentSrc)
+	{
+	    var gl = getTestContext();
+
+	    if (gl)
+	    {
+	        var program = compileProgram(gl, vertexSrc, fragmentSrc);
+
+	        this.attributeData = this.getAttributeData(program, gl);
+	        this.uniformData = this.getUniformData(program, gl);
+
+	        gl.deleteProgram(program);
+	    }
+	    else
+	    {
+	        this.uniformData = {};
+	        this.attributeData = {};
+	    }
+	};
+
+	/**
+	 * returns the attribute data from the program
+	 * @private
+	 *
+	 * @param {WebGLProgram} [program] - the WebGL program
+	 * @param {WebGLRenderingContext} [gl] - the WebGL context
+	 *
+	 * @returns {object} the attribute data for this program
+	 */
+	Program.prototype.getAttributeData = function getAttributeData (program, gl)
+	{
+	    var attributes = {};
+	    var attributesArray = [];
+
+	    var totalAttributes = gl.getProgramParameter(program, gl.ACTIVE_ATTRIBUTES);
+
+	    for (var i = 0; i < totalAttributes; i++)
+	    {
+	        var attribData = gl.getActiveAttrib(program, i);
+	        var type = mapType(gl, attribData.type);
+
+	        /*eslint-disable */
+	        var data = {
+	            type: type,
+	            name: attribData.name,
+	            size: mapSize(type),
+	            location: 0,
+	        };
+	        /* eslint-enable */
+
+	        attributes[attribData.name] = data;
+	        attributesArray.push(data);
+	    }
+
+	    attributesArray.sort(function (a, b) { return (a.name > b.name) ? 1 : -1; }); // eslint-disable-line no-confusing-arrow
+
+	    for (var i$1 = 0; i$1 < attributesArray.length; i$1++)
+	    {
+	        attributesArray[i$1].location = i$1;
+	    }
+
+	    return attributes;
+	};
+
+	/**
+	 * returns the uniform data from the program
+	 * @private
+	 *
+	 * @param {webGL-program} [program] - the webgl program
+	 * @param {context} [gl] - the WebGL context
+	 *
+	 * @returns {object} the uniform data for this program
+	 */
+	Program.prototype.getUniformData = function getUniformData (program, gl)
+	{
+	    var uniforms = {};
+
+	    var totalUniforms = gl.getProgramParameter(program, gl.ACTIVE_UNIFORMS);
+
+	    // TODO expose this as a prop?
+	    // const maskRegex = new RegExp('^(projectionMatrix|uSampler|translationMatrix)$');
+	    // const maskRegex = new RegExp('^(projectionMatrix|uSampler|translationMatrix)$');
+
+	    for (var i = 0; i < totalUniforms; i++)
+	    {
+	        var uniformData = gl.getActiveUniform(program, i);
+	        var name = uniformData.name.replace(/\[.*?\]/, '');
+
+	        var isArray = uniformData.name.match(/\[.*?\]/, '');
+	        var type = mapType(gl, uniformData.type);
+
+	        /*eslint-disable */
+	        uniforms[name] = {
+	            type: type,
+	            size: uniformData.size,
+	            isArray:isArray,
+	            value: defaultValue(type, uniformData.size),
+	        };
+	        /* eslint-enable */
+	    }
+
+	    return uniforms;
+	};
+
+	/**
+	 * The default vertex shader source
+	 *
+	 * @static
+	 * @constant
+	 * @member {string}
+	 */
+	staticAccessors$3.defaultVertexSrc.get = function ()
+	{
+	    return defaultVertex;
+	};
+
+	/**
+	 * The default fragment shader source
+	 *
+	 * @static
+	 * @constant
+	 * @member {string}
+	 */
+	staticAccessors$3.defaultFragmentSrc.get = function ()
+	{
+	    return defaultFragment;
+	};
+
+	/**
+	 * A short hand function to create a program based of a vertex and fragment shader
+	 * this method will also check to see if there is a cached program.
+	 *
+	 * @param {string} [vertexSrc] - The source of the vertex shader.
+	 * @param {string} [fragmentSrc] - The source of the fragment shader.
+	 * @param {object} [uniforms] - Custom uniforms to use to augment the built-in ones.
+	 *
+	 * @returns {PIXI.Program} an shiny new Pixi shader!
+	 */
+	Program.from = function from (vertexSrc, fragmentSrc, name)
+	{
+	    var key = vertexSrc + fragmentSrc;
+
+	    var program = ProgramCache[key];
+
+	    if (!program)
+	    {
+	        ProgramCache[key] = program = new Program(vertexSrc, fragmentSrc, name);
+	    }
+
+	    return program;
+	};
+
+	Object.defineProperties( Program, staticAccessors$3 );
+
+	/**
+	 * A helper class for shaders
+	 *
+	 * @class
+	 * @memberof PIXI
+	 */
+	var Shader = function Shader(program, uniforms)
+	{
+	    /**
+	     * Program that the shader uses
+	     *
+	     * @member {PIXI.Program}
+	     */
+	    this.program = program;
+
+	    // lets see whats been passed in
+	    // uniforms should be converted to a uniform group
+	    if (uniforms)
+	    {
+	        if (uniforms instanceof UniformGroup)
+	        {
+	            this.uniformGroup = uniforms;
+	        }
+	        else
+	        {
+	            this.uniformGroup = new UniformGroup(uniforms);
+	        }
+	    }
+	    else
+	    {
+	        this.uniformGroup = new UniformGroup({});
+	    }
+
+	    // time to build some getters and setters!
+	    // I guess down the line this could sort of generate an instruction list rather than use dirty ids?
+	    // does the trick for now though!
+	    for (var i in program.uniformData)
+	    {
+	        if (this.uniformGroup.uniforms[i] instanceof Array)
+	        {
+	            this.uniformGroup.uniforms[i] = new Float32Array(this.uniformGroup.uniforms[i]);
+	        }
+	    }
+	};
+
+	var prototypeAccessors$2$1 = { uniforms: { configurable: true } };
+
+	// TODO move to shader system..
+	Shader.prototype.checkUniformExists = function checkUniformExists (name, group)
+	{
+	    if (group.uniforms[name])
+	    {
+	        return true;
+	    }
+
+	    for (var i in group.uniforms)
+	    {
+	        var uniform = group.uniforms[i];
+
+	        if (uniform.group)
+	        {
+	            if (this.checkUniformExists(name, uniform))
+	            {
+	                return true;
+	            }
+	        }
+	    }
+
+	    return false;
+	};
+
+	Shader.prototype.destroy = function destroy ()
+	{
+	    // usage count on programs?
+	    // remove if not used!
+	    this.uniformGroup = null;
+	};
+
+	/**
+	 * Shader uniform values, shortcut for `uniformGroup.uniforms`
+	 * @readonly
+	 * @member {object}
+	 */
+	prototypeAccessors$2$1.uniforms.get = function ()
+	{
+	    return this.uniformGroup.uniforms;
+	};
+
+	/**
+	 * A short hand function to create a shader based of a vertex and fragment shader
+	 *
+	 * @param {string} [vertexSrc] - The source of the vertex shader.
+	 * @param {string} [fragmentSrc] - The source of the fragment shader.
+	 * @param {object} [uniforms] - Custom uniforms to use to augment the built-in ones.
+	 *
+	 * @returns {PIXI.Shader} an shiny new Pixi shader!
+	 */
+	Shader.from = function from (vertexSrc, fragmentSrc, uniforms)
+	{
+	    var program = Program.from(vertexSrc, fragmentSrc);
+
+	    return new Shader(program, uniforms);
+	};
+
+	Object.defineProperties( Shader.prototype, prototypeAccessors$2$1 );
+
+	/* eslint-disable max-len */
+
+	var BLEND = 0;
+	var OFFSET = 1;
+	var CULLING = 2;
+	var DEPTH_TEST = 3;
+	var WINDING = 4;
+
+	/**
+	 * This is a WebGL state, and is is passed The WebGL StateManager.
+	 *
+	 * Each mesh rendered may require WebGL to be in a different state.
+	 * For example you may want different blend mode or to enable polygon offsets
+	 *
+	 * @class
+	 * @memberof PIXI
+	 */
+	var State = function State()
+	{
+	    this.data = 0;
+
+	    this.blendMode = BLEND_MODES.NORMAL;
+	    this.polygonOffset = 0;
+
+	    this.blend = true;
+	    //  this.depthTest = true;
+	};
+
+	var prototypeAccessors$3$1 = { blend: { configurable: true },offsets: { configurable: true },culling: { configurable: true },depthTest: { configurable: true },clockwiseFrontFace: { configurable: true },blendMode: { configurable: true },polygonOffset: { configurable: true } };
+
+	/**
+	 * Activates blending of the computed fragment color values
+	 *
+	 * @member {boolean}
+	 */
+	prototypeAccessors$3$1.blend.get = function ()
+	{
+	    return !!(this.data & (1 << BLEND));
+	};
+
+	prototypeAccessors$3$1.blend.set = function (value) // eslint-disable-line require-jsdoc
+	{
+	    if (!!(this.data & (1 << BLEND)) !== value)
+	    {
+	        this.data ^= (1 << BLEND);
+	    }
+	};
+
+	/**
+	 * Activates adding an offset to depth values of polygon's fragments
+	 *
+	 * @member {boolean}
+	 * @default false
+	 */
+	prototypeAccessors$3$1.offsets.get = function ()
+	{
+	    return !!(this.data & (1 << OFFSET));
+	};
+
+	prototypeAccessors$3$1.offsets.set = function (value) // eslint-disable-line require-jsdoc
+	{
+	    if (!!(this.data & (1 << OFFSET)) !== value)
+	    {
+	        this.data ^= (1 << OFFSET);
+	    }
+	};
+
+	/**
+	 * Activates culling of polygons.
+	 *
+	 * @member {boolean}
+	 * @default false
+	 */
+	prototypeAccessors$3$1.culling.get = function ()
+	{
+	    return !!(this.data & (1 << CULLING));
+	};
+
+	prototypeAccessors$3$1.culling.set = function (value) // eslint-disable-line require-jsdoc
+	{
+	    if (!!(this.data & (1 << CULLING)) !== value)
+	    {
+	        this.data ^= (1 << CULLING);
+	    }
+	};
+
+	/**
+	 * Activates depth comparisons and updates to the depth buffer.
+	 *
+	 * @member {boolean}
+	 * @default false
+	 */
+	prototypeAccessors$3$1.depthTest.get = function ()
+	{
+	    return !!(this.data & (1 << DEPTH_TEST));
+	};
+
+	prototypeAccessors$3$1.depthTest.set = function (value) // eslint-disable-line require-jsdoc
+	{
+	    if (!!(this.data & (1 << DEPTH_TEST)) !== value)
+	    {
+	        this.data ^= (1 << DEPTH_TEST);
+	    }
+	};
+
+	/**
+	 * Specifies whether or not front or back-facing polygons can be culled.
+	 * @member {boolean}
+	 * @default false
+	 */
+	prototypeAccessors$3$1.clockwiseFrontFace.get = function ()
+	{
+	    return !!(this.data & (1 << WINDING));
+	};
+
+	prototypeAccessors$3$1.clockwiseFrontFace.set = function (value) // eslint-disable-line require-jsdoc
+	{
+	    if (!!(this.data & (1 << WINDING)) !== value)
+	    {
+	        this.data ^= (1 << WINDING);
+	    }
+	};
+
+	/**
+	 * The blend mode to be applied when this state is set. Apply a value of `PIXI.BLEND_MODES.NORMAL` to reset the blend mode.
+	 * Setting this mode to anything other than NO_BLEND will automatically switch blending on.
+	 *
+	 * @member {number}
+	 * @default PIXI.BLEND_MODES.NORMAL
+	 * @see PIXI.BLEND_MODES
+	 */
+	prototypeAccessors$3$1.blendMode.get = function ()
+	{
+	    return this._blendMode;
+	};
+
+	prototypeAccessors$3$1.blendMode.set = function (value) // eslint-disable-line require-jsdoc
+	{
+	    this.blend = (value !== BLEND_MODES.NONE);
+	    this._blendMode = value;
+	};
+
+	/**
+	 * The polygon offset. Setting this property to anything other than 0 will automatically enable polygon offset fill.
+	 *
+	 * @member {number}
+	 * @default 0
+	 */
+	prototypeAccessors$3$1.polygonOffset.get = function ()
+	{
+	    return this._polygonOffset;
+	};
+
+	prototypeAccessors$3$1.polygonOffset.set = function (value) // eslint-disable-line require-jsdoc
+	{
+	    this.offsets = !!value;
+	    this._polygonOffset = value;
+	};
+
+	State.for2d = function for2d ()
+	{
+	    var state = new State();
+
+	    state.depthTest = false;
+	    state.blend = true;
+
+	    return state;
+	};
+
+	Object.defineProperties( State.prototype, prototypeAccessors$3$1 );
+
+	var defaultVertex$1 = "attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n    vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n    return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n    return aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\n\nvoid main(void)\n{\n    gl_Position = filterVertexPosition();\n    vTextureCoord = filterTextureCoord();\n}\n";
+
+	var defaultFragment$1 = "varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\n\nvoid main(void){\n   gl_FragColor = texture2D(uSampler, vTextureCoord);\n}\n";
+
+	/**
+	 * Filter is a special type of WebGL shader that is applied to the screen.
+	 *
+	 * {@link http://pixijs.io/examples/#/filters/blur-filter.js Example} of the
+	 * {@link PIXI.filters.BlurFilter BlurFilter}.
+	 *
+	 * ### Usage
+	 * Filters can be applied to any DisplayObject or Container.
+	 * PixiJS' `FilterSystem` renders the container into temporary Framebuffer,
+	 * then filter renders it to the screen.
+	 * Multiple filters can be added to the `filters` array property and stacked on each other.
+	 *
+	 * ```
+	 * const filter = new PIXI.Filter(myShaderVert, myShaderFrag, { myUniform: 0.5 });
+	 * const container = new PIXI.Container();
+	 * container.filters = [filter];
+	 * ```
+	 *
+	 * ### Previous Version Differences
+	 *
+	 * In PixiJS **v3**, a filter was always applied to _whole screen_.
+	 *
+	 * In PixiJS **v4**, a filter can be applied _only part of the screen_.
+	 * Developers had to create a set of uniforms to deal with coordinates.
+	 *
+	 * In PixiJS **v5** combines _both approaches_.
+	 * Developers can use normal coordinates of v3 and then allow filter to use partial Framebuffers,
+	 * bringing those extra uniforms into account.
+	 *
+	 * Also be aware that we have changed default vertex shader, please consult
+	 * {@link https://github.com/pixijs/pixi.js/wiki/v5-Creating-filters Wiki}.
+	 *
+	 * ### Built-in Uniforms
+	 *
+	 * PixiJS viewport uses screen (CSS) coordinates, `(0, 0, renderer.screen.width, renderer.screen.height)`,
+	 * and `projectionMatrix` uniform maps it to the gl viewport.
+	 *
+	 * **uSampler**
+	 *
+	 * The most important uniform is the input texture that container was rendered into.
+	 * _Important note: as with all Framebuffers in PixiJS, both input and output are
+	 * premultiplied by alpha._
+	 *
+	 * By default, input normalized coordinates are passed to fragment shader with `vTextureCoord`.
+	 * Use it to sample the input.
+	 *
+	 * ```
+	 * const fragment = `
+	 * varying vec2 vTextureCoord;
+	 * uniform sampler2D uSampler;
+	 * void main(void)
+	 * {
+	 *    gl_FragColor = texture2D(uSampler, vTextureCoord);
+	 * }
+	 * `;
+	 *
+	 * const myFilter = new PIXI.Filter(null, fragment);
+	 * ```
+	 *
+	 * This filter is just one uniform less than {@link PIXI.filters.AlphaFilter AlphaFilter}.
+	 *
+	 * **outputFrame**
+	 *
+	 * The `outputFrame` holds the rectangle where filter is applied in screen (CSS) coordinates.
+	 * It's the same as `renderer.screen` for a fullscreen filter.
+	 * Only a part of  `outputFrame.zw` size of temporary Framebuffer is used,
+	 * `(0, 0, outputFrame.width, outputFrame.height)`,
+	 *
+	 * Filters uses this quad to normalized (0-1) space, its passed into `aVertexPosition` attribute.
+	 * To calculate vertex position in screen space using normalized (0-1) space:
+	 *
+	 * ```
+	 * vec4 filterVertexPosition( void )
+	 * {
+	 *     vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;
+	 *     return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);
+	 * }
+	 * ```
+	 *
+	 * **inputSize**
+	 *
+	 * Temporary framebuffer is different, it can be either the size of screen, either power-of-two.
+	 * The `inputSize.xy` are size of temporary framebuffer that holds input.
+	 * The `inputSize.zw` is inverted, it's a shortcut to evade division inside the shader.
+	 *
+	 * Set `inputSize.xy = outputFrame.zw` for a fullscreen filter.
+	 *
+	 * To calculate input normalized coordinate, you have to map it to filter normalized space.
+	 * Multiply by `outputFrame.zw` to get input coordinate.
+	 * Divide by `inputSize.xy` to get input normalized coordinate.
+	 *
+	 * ```
+	 * vec2 filterTextureCoord( void )
+	 * {
+	 *     return aVertexPosition * (outputFrame.zw * inputSize.zw); // same as /inputSize.xy
+	 * }
+	 * ```
+	 * **resolution**
+	 *
+	 * The `resolution` is the ratio of screen (CSS) pixels to real pixels.
+	 *
+	 * **inputPixel**
+	 *
+	 * `inputPixel.xy` is the size of framebuffer in real pixels, same as `inputSize.xy * resolution`
+	 * `inputPixel.zw` is inverted `inputPixel.xy`.
+	 *
+	 * It's handy for filters that use neighbour pixels, like {@link PIXI.filters.FXAAFilter FXAAFilter}.
+	 *
+	 * **inputClamp**
+	 *
+	 * If you try to get info from outside of used part of Framebuffer - you'll get undefined behaviour.
+	 * For displacements, coordinates has to be clamped.
+	 *
+	 * The `inputClamp.xy` is left-top pixel center, you may ignore it, because we use left-top part of Framebuffer
+	 * `inputClamp.zw` is bottom-right pixel center.
+	 *
+	 * ```
+	 * vec4 color = texture2D(uSampler, clamp(modifigedTextureCoord, inputClamp.xy, inputClamp.zw))
+	 * ```
+	 * OR
+	 * ```
+	 * vec4 color = texture2D(uSampler, min(modifigedTextureCoord, inputClamp.zw))
+	 * ```
+	 *
+	 * ### Additional Information
+	 *
+	 * Complete documentation on Filter usage is located in the
+	 * {@link https://github.com/pixijs/pixi.js/wiki/v5-Creating-filters Wiki}.
+	 *
+	 * Since PixiJS only had a handful of built-in filters, additional filters can be downloaded
+	 * {@link https://github.com/pixijs/pixi-filters here} from the PixiJS Filters repository.
+	 *
+	 * @class
+	 * @memberof PIXI
+	 * @extends PIXI.Shader
+	 */
+	var Filter = /*@__PURE__*/(function (Shader) {
+	    function Filter(vertexSrc, fragmentSrc, uniforms)
+	    {
+	        var program = Program.from(vertexSrc || Filter.defaultVertexSrc,
+	            fragmentSrc || Filter.defaultFragmentSrc);
+
+	        Shader.call(this, program, uniforms);
+
+	        /**
+	         * The padding of the filter. Some filters require extra space to breath such as a blur.
+	         * Increasing this will add extra width and height to the bounds of the object that the
+	         * filter is applied to.
+	         *
+	         * @member {number}
+	         */
+	        this.padding = 0;
+
+	        /**
+	         * The resolution of the filter. Setting this to be lower will lower the quality but
+	         * increase the performance of the filter.
+	         *
+	         * @member {number}
+	         */
+	        this.resolution = settings.FILTER_RESOLUTION;
+
+	        /**
+	         * If enabled is true the filter is applied, if false it will not.
+	         *
+	         * @member {boolean}
+	         */
+	        this.enabled = true;
+
+	        /**
+	         * If enabled, PixiJS will fit the filter area into boundaries for better performance.
+	         * Switch it off if it does not work for specific shader.
+	         *
+	         * @member {boolean}
+	         */
+	        this.autoFit = true;
+
+	        /**
+	         * Legacy filters use position and uvs from attributes
+	         * @member {boolean}
+	         * @readonly
+	         */
+	        this.legacy = !!this.program.attributeData.aTextureCoord;
+
+	        /**
+	         * The WebGL state the filter requires to render
+	         * @member {PIXI.State}
+	         */
+	        this.state = new State();
+	    }
+
+	    if ( Shader ) { Filter.__proto__ = Shader; }
+	    Filter.prototype = Object.create( Shader && Shader.prototype );
+	    Filter.prototype.constructor = Filter;
+
+	    var prototypeAccessors = { blendMode: { configurable: true } };
+	    var staticAccessors = { defaultVertexSrc: { configurable: true },defaultFragmentSrc: { configurable: true } };
+
+	    /**
+	     * Applies the filter
+	     *
+	     * @param {PIXI.systems.FilterSystem} filterManager - The renderer to retrieve the filter from
+	     * @param {PIXI.RenderTexture} input - The input render target.
+	     * @param {PIXI.RenderTexture} output - The target to output to.
+	     * @param {boolean} clear - Should the output be cleared before rendering to it
+	     * @param {object} [currentState] - It's current state of filter.
+	     *        There are some useful properties in the currentState :
+	     *        target, filters, sourceFrame, destinationFrame, renderTarget, resolution
+	     */
+	    Filter.prototype.apply = function apply (filterManager, input, output, clear, currentState)
+	    {
+	        // do as you please!
+
+	        filterManager.applyFilter(this, input, output, clear, currentState);
+
+	        // or just do a regular render..
+	    };
+
+	    /**
+	     * Sets the blendmode of the filter
+	     *
+	     * @member {number}
+	     * @default PIXI.BLEND_MODES.NORMAL
+	     */
+	    prototypeAccessors.blendMode.get = function ()
+	    {
+	        return this.state.blendMode;
+	    };
+
+	    prototypeAccessors.blendMode.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        this.state.blendMode = value;
+	    };
+
+	    /**
+	     * The default vertex shader source
+	     *
+	     * @static
+	     * @type {string}
+	     * @constant
+	     */
+	    staticAccessors.defaultVertexSrc.get = function ()
+	    {
+	        return defaultVertex$1;
+	    };
+
+	    /**
+	     * The default fragment shader source
+	     *
+	     * @static
+	     * @type {string}
+	     * @constant
+	     */
+	    staticAccessors.defaultFragmentSrc.get = function ()
+	    {
+	        return defaultFragment$1;
+	    };
+
+	    Object.defineProperties( Filter.prototype, prototypeAccessors );
+	    Object.defineProperties( Filter, staticAccessors );
+
+	    return Filter;
+	}(Shader));
+
+	/**
+	 * Used for caching shader IDs
+	 *
+	 * @static
+	 * @type {object}
+	 * @protected
+	 */
+	Filter.SOURCE_KEY_MAP = {};
+
+	var vertex = "attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 otherMatrix;\n\nvarying vec2 vMaskCoord;\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n    gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n    vTextureCoord = aTextureCoord;\n    vMaskCoord = ( otherMatrix * vec3( aTextureCoord, 1.0)  ).xy;\n}\n";
+
+	var fragment = "varying vec2 vMaskCoord;\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform sampler2D mask;\nuniform float alpha;\nuniform float npmAlpha;\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    float alphaMul = 1.0 - npmAlpha * (1.0 - masky.a);\n\n    original *= (alphaMul * masky.r * alpha * clip);\n\n    gl_FragColor = original;\n}\n";
+
+	var tempMat = new Matrix();
+
+	/**
+	 * Class controls uv mapping from Texture normal space to BaseTexture normal space.
+	 *
+	 * Takes `trim` and `rotate` into account. May contain clamp settings for Meshes and TilingSprite.
+	 *
+	 * Can be used in Texture `uvMatrix` field, or separately, you can use different clamp settings on the same texture.
+	 * If you want to add support for texture region of certain feature or filter, that's what you're looking for.
+	 *
+	 * Takes track of Texture changes through `_lastTextureID` private field.
+	 * Use `update()` method call to track it from outside.
+	 *
+	 * @see PIXI.Texture
+	 * @see PIXI.Mesh
+	 * @see PIXI.TilingSprite
+	 * @class
+	 * @memberof PIXI
+	 */
+	var TextureMatrix = function TextureMatrix(texture, clampMargin)
+	{
+	    this._texture = texture;
+
+	    /**
+	     * Matrix operation that converts texture region coords to texture coords
+	     * @member {PIXI.Matrix}
+	     * @readonly
+	     */
+	    this.mapCoord = new Matrix();
+
+	    /**
+	     * Clamp region for normalized coords, left-top pixel center in xy , bottom-right in zw.
+	     * Calculated based on clampOffset.
+	     * @member {Float32Array}
+	     * @readonly
+	     */
+	    this.uClampFrame = new Float32Array(4);
+
+	    /**
+	     * Normalized clamp offset.
+	     * Calculated based on clampOffset.
+	     * @member {Float32Array}
+	     * @readonly
+	     */
+	    this.uClampOffset = new Float32Array(2);
+
+	    /**
+	     * Tracks Texture frame changes
+	     * @member {number}
+	     * @protected
+	     */
+	    this._updateID = -1;
+
+	    /**
+	     * Changes frame clamping
+	     * Works with TilingSprite and Mesh
+	     * Change to 1.5 if you texture has repeated right and bottom lines, that leads to smoother borders
+	     *
+	     * @default 0
+	     * @member {number}
+	     */
+	    this.clampOffset = 0;
+
+	    /**
+	     * Changes frame clamping
+	     * Works with TilingSprite and Mesh
+	     * Change to -0.5 to add a pixel to the edge, recommended for transparent trimmed textures in atlas
+	     *
+	     * @default 0.5
+	     * @member {number}
+	     */
+	    this.clampMargin = (typeof clampMargin === 'undefined') ? 0.5 : clampMargin;
+
+	    /**
+	     * If texture size is the same as baseTexture
+	     * @member {boolean}
+	     * @default false
+	     * @readonly
+	     */
+	    this.isSimple = false;
+	};
+
+	var prototypeAccessors$4$1 = { texture: { configurable: true } };
+
+	/**
+	 * texture property
+	 * @member {PIXI.Texture}
+	 */
+	prototypeAccessors$4$1.texture.get = function ()
+	{
+	    return this._texture;
+	};
+
+	prototypeAccessors$4$1.texture.set = function (value) // eslint-disable-line require-jsdoc
+	{
+	    this._texture = value;
+	    this._updateID = -1;
+	};
+
+	/**
+	 * Multiplies uvs array to transform
+	 * @param {Float32Array} uvs mesh uvs
+	 * @param {Float32Array} [out=uvs] output
+	 * @returns {Float32Array} output
+	 */
+	TextureMatrix.prototype.multiplyUvs = function multiplyUvs (uvs, out)
+	{
+	    if (out === undefined)
+	    {
+	        out = uvs;
+	    }
+
+	    var mat = this.mapCoord;
+
+	    for (var i = 0; i < uvs.length; i += 2)
+	    {
+	        var x = uvs[i];
+	        var y = uvs[i + 1];
+
+	        out[i] = (x * mat.a) + (y * mat.c) + mat.tx;
+	        out[i + 1] = (x * mat.b) + (y * mat.d) + mat.ty;
+	    }
+
+	    return out;
+	};
+
+	/**
+	 * updates matrices if texture was changed
+	 * @param {boolean} [forceUpdate=false] if true, matrices will be updated any case
+	 * @returns {boolean} whether or not it was updated
+	 */
+	TextureMatrix.prototype.update = function update (forceUpdate)
+	{
+	    var tex = this._texture;
+
+	    if (!tex || !tex.valid)
+	    {
+	        return false;
+	    }
+
+	    if (!forceUpdate
+	        && this._updateID === tex._updateID)
+	    {
+	        return false;
+	    }
+
+	    this._updateID = tex._updateID;
+
+	    var uvs = tex._uvs;
+
+	    this.mapCoord.set(uvs.x1 - uvs.x0, uvs.y1 - uvs.y0, uvs.x3 - uvs.x0, uvs.y3 - uvs.y0, uvs.x0, uvs.y0);
+
+	    var orig = tex.orig;
+	    var trim = tex.trim;
+
+	    if (trim)
+	    {
+	        tempMat.set(orig.width / trim.width, 0, 0, orig.height / trim.height,
+	            -trim.x / trim.width, -trim.y / trim.height);
+	        this.mapCoord.append(tempMat);
+	    }
+
+	    var texBase = tex.baseTexture;
+	    var frame = this.uClampFrame;
+	    var margin = this.clampMargin / texBase.resolution;
+	    var offset = this.clampOffset;
+
+	    frame[0] = (tex._frame.x + margin + offset) / texBase.width;
+	    frame[1] = (tex._frame.y + margin + offset) / texBase.height;
+	    frame[2] = (tex._frame.x + tex._frame.width - margin + offset) / texBase.width;
+	    frame[3] = (tex._frame.y + tex._frame.height - margin + offset) / texBase.height;
+	    this.uClampOffset[0] = offset / texBase.realWidth;
+	    this.uClampOffset[1] = offset / texBase.realHeight;
+
+	    this.isSimple = tex._frame.width === texBase.width
+	        && tex._frame.height === texBase.height
+	        && tex.rotate === 0;
+
+	    return true;
+	};
+
+	Object.defineProperties( TextureMatrix.prototype, prototypeAccessors$4$1 );
+
+	/**
+	 * This handles a Sprite acting as a mask, as opposed to a Graphic.
+	 *
+	 * WebGL only.
+	 *
+	 * @class
+	 * @extends PIXI.Filter
+	 * @memberof PIXI
+	 */
+	var SpriteMaskFilter = /*@__PURE__*/(function (Filter) {
+	    function SpriteMaskFilter(sprite)
+	    {
+	        var maskMatrix = new Matrix();
+
+	        Filter.call(this, vertex, fragment);
+
+	        sprite.renderable = false;
+
+	        /**
+	         * Sprite mask
+	         * @member {PIXI.Sprite}
+	         */
+	        this.maskSprite = sprite;
+
+	        /**
+	         * Mask matrix
+	         * @member {PIXI.Matrix}
+	         */
+	        this.maskMatrix = maskMatrix;
+	    }
+
+	    if ( Filter ) { SpriteMaskFilter.__proto__ = Filter; }
+	    SpriteMaskFilter.prototype = Object.create( Filter && Filter.prototype );
+	    SpriteMaskFilter.prototype.constructor = SpriteMaskFilter;
+
+	    /**
+	     * Applies the filter
+	     *
+	     * @param {PIXI.systems.FilterSystem} filterManager - The renderer to retrieve the filter from
+	     * @param {PIXI.RenderTexture} input - The input render target.
+	     * @param {PIXI.RenderTexture} output - The target to output to.
+	     * @param {boolean} clear - Should the output be cleared before rendering to it.
+	     */
+	    SpriteMaskFilter.prototype.apply = function apply (filterManager, input, output, clear)
+	    {
+	        var maskSprite = this.maskSprite;
+	        var tex = this.maskSprite.texture;
+
+	        if (!tex.valid)
+	        {
+	            return;
+	        }
+	        if (!tex.transform)
+	        {
+	            // margin = 0.0, let it bleed a bit, shader code becomes easier
+	            // assuming that atlas textures were made with 1-pixel padding
+	            tex.transform = new TextureMatrix(tex, 0.0);
+	        }
+	        tex.transform.update();
+
+	        this.uniforms.npmAlpha = tex.baseTexture.premultiplyAlpha ? 0.0 : 1.0;
+	        this.uniforms.mask = tex;
+	        // get _normalized sprite texture coords_ and convert them to _normalized atlas texture coords_ with `prepend`
+	        this.uniforms.otherMatrix = filterManager.calculateSpriteMatrix(this.maskMatrix, maskSprite)
+	            .prepend(tex.transform.mapCoord);
+	        this.uniforms.alpha = maskSprite.worldAlpha;
+	        this.uniforms.maskClamp = tex.transform.uClampFrame;
+
+	        filterManager.applyFilter(this, input, output, clear);
+	    };
+
+	    return SpriteMaskFilter;
+	}(Filter));
+
+	/**
+	 * System plugin to the renderer to manage masks.
+	 *
+	 * @class
+	 * @extends PIXI.System
+	 * @memberof PIXI.systems
+	 */
+	var MaskSystem = /*@__PURE__*/(function (System) {
+	    function MaskSystem(renderer)
+	    {
+	        System.call(this, renderer);
+
+	        // TODO - we don't need both!
+	        /**
+	         * `true` if current pushed masked is scissor
+	         * @member {boolean}
+	         * @readonly
+	         */
+	        this.scissor = false;
+
+	        /**
+	         * Mask data
+	         * @member {PIXI.Graphics}
+	         * @readonly
+	         */
+	        this.scissorData = null;
+
+	        /**
+	         * Target to mask
+	         * @member {PIXI.DisplayObject}
+	         * @readonly
+	         */
+	        this.scissorRenderTarget = null;
+
+	        /**
+	         * Enable scissor
+	         * @member {boolean}
+	         * @readonly
+	         */
+	        this.enableScissor = false;
+
+	        /**
+	         * Pool of used sprite mask filters
+	         * @member {PIXI.SpriteMaskFilter[]}
+	         * @readonly
+	         */
+	        this.alphaMaskPool = [];
+
+	        /**
+	         * Current index of alpha mask pool
+	         * @member {number}
+	         * @default 0
+	         * @readonly
+	         */
+	        this.alphaMaskIndex = 0;
+	    }
+
+	    if ( System ) { MaskSystem.__proto__ = System; }
+	    MaskSystem.prototype = Object.create( System && System.prototype );
+	    MaskSystem.prototype.constructor = MaskSystem;
+
+	    /**
+	     * Applies the Mask and adds it to the current filter stack.
+	     *
+	     * @param {PIXI.DisplayObject} target - Display Object to push the mask to
+	     * @param {PIXI.Sprite|PIXI.Graphics} maskData - The masking data.
+	     */
+	    MaskSystem.prototype.push = function push (target, maskData)
+	    {
+	        // TODO the root check means scissor rect will not
+	        // be used on render textures more info here:
+	        // https://github.com/pixijs/pixi.js/pull/3545
+
+	        if (maskData.isSprite)
+	        {
+	            this.pushSpriteMask(target, maskData);
+	        }
+	        else if (this.enableScissor
+	            && !this.scissor
+	            && this.renderer._activeRenderTarget.root
+	            && !this.renderer.stencil.stencilMaskStack.length
+	            && maskData.isFastRect())
+	        {
+	            var matrix = maskData.worldTransform;
+
+	            var rot = Math.atan2(matrix.b, matrix.a);
+
+	            // use the nearest degree!
+	            rot = Math.round(rot * (180 / Math.PI));
+
+	            if (rot % 90)
+	            {
+	                this.pushStencilMask(maskData);
+	            }
+	            else
+	            {
+	                this.pushScissorMask(target, maskData);
+	            }
+	        }
+	        else
+	        {
+	            this.pushStencilMask(maskData);
+	        }
+	    };
+
+	    /**
+	     * Removes the last mask from the mask stack and doesn't return it.
+	     *
+	     * @param {PIXI.DisplayObject} target - Display Object to pop the mask from
+	     * @param {PIXI.Sprite|PIXI.Graphics} maskData - The masking data.
+	     */
+	    MaskSystem.prototype.pop = function pop (target, maskData)
+	    {
+	        if (maskData.isSprite)
+	        {
+	            this.popSpriteMask(target, maskData);
+	        }
+	        else if (this.enableScissor && !this.renderer.stencil.stencilMaskStack.length)
+	        {
+	            this.popScissorMask(target, maskData);
+	        }
+	        else
+	        {
+	            this.popStencilMask(target, maskData);
+	        }
+	    };
+
+	    /**
+	     * Applies the Mask and adds it to the current filter stack.
+	     *
+	     * @param {PIXI.RenderTexture} target - Display Object to push the sprite mask to
+	     * @param {PIXI.Sprite} maskData - Sprite to be used as the mask
+	     */
+	    MaskSystem.prototype.pushSpriteMask = function pushSpriteMask (target, maskData)
+	    {
+	        var alphaMaskFilter = this.alphaMaskPool[this.alphaMaskIndex];
+
+	        if (!alphaMaskFilter)
+	        {
+	            alphaMaskFilter = this.alphaMaskPool[this.alphaMaskIndex] = [new SpriteMaskFilter(maskData)];
+	        }
+
+	        alphaMaskFilter[0].resolution = this.renderer.resolution;
+	        alphaMaskFilter[0].maskSprite = maskData;
+
+	        var stashFilterArea = target.filterArea;
+
+	        target.filterArea = maskData.getBounds(true);
+	        this.renderer.filter.push(target, alphaMaskFilter);
+	        target.filterArea = stashFilterArea;
+
+	        this.alphaMaskIndex++;
+	    };
+
+	    /**
+	     * Removes the last filter from the filter stack and doesn't return it.
+	     *
+	     */
+	    MaskSystem.prototype.popSpriteMask = function popSpriteMask ()
+	    {
+	        this.renderer.filter.pop();
+	        this.alphaMaskIndex--;
+	    };
+
+	    /**
+	     * Applies the Mask and adds it to the current filter stack.
+	     *
+	     * @param {PIXI.Sprite|PIXI.Graphics} maskData - The masking data.
+	     */
+	    MaskSystem.prototype.pushStencilMask = function pushStencilMask (maskData)
+	    {
+	        this.renderer.batch.flush();
+	        this.renderer.stencil.pushStencil(maskData);
+	    };
+
+	    /**
+	     * Removes the last filter from the filter stack and doesn't return it.
+	     *
+	     */
+	    MaskSystem.prototype.popStencilMask = function popStencilMask ()
+	    {
+	        // this.renderer.currentRenderer.stop();
+	        this.renderer.stencil.popStencil();
+	    };
+
+	    /**
+	     *
+	     * @param {PIXI.DisplayObject} target - Display Object to push the mask to
+	     * @param {PIXI.Graphics} maskData - The masking data.
+	     */
+	    MaskSystem.prototype.pushScissorMask = function pushScissorMask (target, maskData)
+	    {
+	        maskData.renderable = true;
+
+	        var renderTarget = this.renderer._activeRenderTarget;
+
+	        var bounds = maskData.getBounds();
+
+	        bounds.fit(renderTarget.size);
+	        maskData.renderable = false;
+
+	        this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST);
+
+	        var resolution = this.renderer.resolution;
+
+	        this.renderer.gl.scissor(
+	            bounds.x * resolution,
+	            (renderTarget.root ? renderTarget.size.height - bounds.y - bounds.height : bounds.y) * resolution,
+	            bounds.width * resolution,
+	            bounds.height * resolution
+	        );
+
+	        this.scissorRenderTarget = renderTarget;
+	        this.scissorData = maskData;
+	        this.scissor = true;
+	    };
+
+	    /**
+	     * Pop scissor mask
+	     *
+	     */
+	    MaskSystem.prototype.popScissorMask = function popScissorMask ()
+	    {
+	        this.scissorRenderTarget = null;
+	        this.scissorData = null;
+	        this.scissor = false;
+
+	        // must be scissor!
+	        var ref = this.renderer;
+	        var gl = ref.gl;
+
+	        gl.disable(gl.SCISSOR_TEST);
+	    };
+
+	    return MaskSystem;
+	}(System));
+
+	/**
+	 * System plugin to the renderer to manage stencils (used for masks).
+	 *
+	 * @class
+	 * @extends PIXI.System
+	 * @memberof PIXI.systems
+	 */
+	var StencilSystem = /*@__PURE__*/(function (System) {
+	    function StencilSystem(renderer)
+	    {
+	        System.call(this, renderer);
+
+	        /**
+	         * The mask stack
+	         * @member {PIXI.Graphics[]}
+	         */
+	        this.stencilMaskStack = [];
+	    }
+
+	    if ( System ) { StencilSystem.__proto__ = System; }
+	    StencilSystem.prototype = Object.create( System && System.prototype );
+	    StencilSystem.prototype.constructor = StencilSystem;
+
+	    /**
+	     * Changes the mask stack that is used by this System.
+	     *
+	     * @param {PIXI.Graphics[]} stencilMaskStack - The mask stack
+	     */
+	    StencilSystem.prototype.setMaskStack = function setMaskStack (stencilMaskStack)
+	    {
+	        var gl = this.renderer.gl;
+	        var curStackLen = this.stencilMaskStack.length;
+
+	        this.stencilMaskStack = stencilMaskStack;
+	        if (stencilMaskStack.length !== curStackLen)
+	        {
+	            if (stencilMaskStack.length === 0)
+	            {
+	                gl.disable(gl.STENCIL_TEST);
+	            }
+	            else
+	            {
+	                gl.enable(gl.STENCIL_TEST);
+	                this._useCurrent();
+	            }
+	        }
+	    };
+
+	    /**
+	     * Applies the Mask and adds it to the current stencil stack. @alvin
+	     *
+	     * @param {PIXI.Graphics} graphics - The mask
+	     */
+	    StencilSystem.prototype.pushStencil = function pushStencil (graphics)
+	    {
+	        var gl = this.renderer.gl;
+	        var prevMaskCount = this.stencilMaskStack.length;
+
+	        if (prevMaskCount === 0)
+	        {
+	            // force use stencil texture in current framebuffer
+	            this.renderer.framebuffer.forceStencil();
+	            gl.enable(gl.STENCIL_TEST);
+	        }
+
+	        this.stencilMaskStack.push(graphics);
+
+	        // Increment the reference stencil value where the new mask overlaps with the old ones.
+	        gl.colorMask(false, false, false, false);
+	        gl.stencilFunc(gl.EQUAL, prevMaskCount, this._getBitwiseMask());
+	        gl.stencilOp(gl.KEEP, gl.KEEP, gl.INCR);
+
+	        graphics.renderable = true;
+	        graphics.render(this.renderer);
+	        this.renderer.batch.flush();
+	        graphics.renderable = false;
+
+	        this._useCurrent();
+	    };
+
+	    /**
+	     * Removes the last mask from the stencil stack. @alvin
+	     */
+	    StencilSystem.prototype.popStencil = function popStencil ()
+	    {
+	        var gl = this.renderer.gl;
+	        var graphics = this.stencilMaskStack.pop();
+
+	        if (this.stencilMaskStack.length === 0)
+	        {
+	            // the stack is empty!
+	            gl.disable(gl.STENCIL_TEST);
+	            gl.clear(gl.STENCIL_BUFFER_BIT);
+	            gl.clearStencil(0);
+	        }
+	        else
+	        {
+	            // Decrement the reference stencil value where the popped mask overlaps with the other ones
+	            gl.colorMask(false, false, false, false);
+	            gl.stencilOp(gl.KEEP, gl.KEEP, gl.DECR);
+
+	            graphics.renderable = true;
+	            graphics.render(this.renderer);
+	            this.renderer.batch.flush();
+	            graphics.renderable = false;
+
+	            this._useCurrent();
+	        }
+	    };
+
+	    /**
+	     * Setup renderer to use the current stencil data.
+	     * @private
+	     */
+	    StencilSystem.prototype._useCurrent = function _useCurrent ()
+	    {
+	        var gl = this.renderer.gl;
+
+	        gl.colorMask(true, true, true, true);
+	        gl.stencilFunc(gl.EQUAL, this.stencilMaskStack.length, this._getBitwiseMask());
+	        gl.stencilOp(gl.KEEP, gl.KEEP, gl.KEEP);
+	    };
+
+	    /**
+	     * Fill 1s equal to the number of acitve stencil masks.
+	     * @private
+	     * @return {number} The bitwise mask.
+	     */
+	    StencilSystem.prototype._getBitwiseMask = function _getBitwiseMask ()
+	    {
+	        return (1 << this.stencilMaskStack.length) - 1;
+	    };
+
+	    /**
+	     * Destroys the mask stack.
+	     *
+	     */
+	    StencilSystem.prototype.destroy = function destroy ()
+	    {
+	        System.prototype.destroy.call(this, this);
+
+	        this.stencilMaskStack = null;
+	    };
+
+	    return StencilSystem;
+	}(System));
+
+	/**
+	 * System plugin to the renderer to manage the projection matrix.
+	 *
+	 * @class
+	 * @extends PIXI.System
+	 * @memberof PIXI.systems
+	 */
+
+	var ProjectionSystem = /*@__PURE__*/(function (System) {
+	    function ProjectionSystem(renderer)
+	    {
+	        System.call(this, renderer);
+
+	        /**
+	         * Destination frame
+	         * @member {PIXI.Rectangle}
+	         * @readonly
+	         */
+	        this.destinationFrame = null;
+
+	        /**
+	         * Source frame
+	         * @member {PIXI.Rectangle}
+	         * @readonly
+	         */
+	        this.sourceFrame = null;
+
+	        /**
+	         * Default destination frame
+	         * @member {PIXI.Rectangle}
+	         * @readonly
+	         */
+	        this.defaultFrame = null;
+
+	        /**
+	         * Project matrix
+	         * @member {PIXI.Matrix}
+	         * @readonly
+	         */
+	        this.projectionMatrix = new Matrix();
+
+	        /**
+	         * A transform that will be appended to the projection matrix
+	         * if null, nothing will be applied
+	         * @member {PIXI.Matrix}
+	         */
+	        this.transform = null;
+	    }
+
+	    if ( System ) { ProjectionSystem.__proto__ = System; }
+	    ProjectionSystem.prototype = Object.create( System && System.prototype );
+	    ProjectionSystem.prototype.constructor = ProjectionSystem;
+
+	    /**
+	     * Updates the projection matrix based on a projection frame (which is a rectangle)
+	     *
+	     * @param {PIXI.Rectangle} destinationFrame - The destination frame.
+	     * @param {PIXI.Rectangle} sourceFrame - The source frame.
+	     * @param {Number} resolution - Resolution
+	     * @param {boolean} root - If is root
+	     */
+	    ProjectionSystem.prototype.update = function update (destinationFrame, sourceFrame, resolution, root)
+	    {
+	        this.destinationFrame = destinationFrame || this.destinationFrame || this.defaultFrame;
+	        this.sourceFrame = sourceFrame || this.sourceFrame || destinationFrame;
+
+	        this.calculateProjection(this.destinationFrame, this.sourceFrame, resolution, root);
+
+	        if (this.transform)
+	        {
+	            this.projectionMatrix.append(this.transform);
+	        }
+
+	        var renderer =  this.renderer;
+
+	        renderer.globalUniforms.uniforms.projectionMatrix = this.projectionMatrix;
+	        renderer.globalUniforms.update();
+
+	        // this will work for now
+	        // but would be sweet to stick and even on the global uniforms..
+	        if (renderer.shader.shader)
+	        {
+	            renderer.shader.syncUniformGroup(renderer.shader.shader.uniforms.globals);
+	        }
+	    };
+
+	    /**
+	     * Updates the projection matrix based on a projection frame (which is a rectangle)
+	     *
+	     * @param {PIXI.Rectangle} destinationFrame - The destination frame.
+	     * @param {PIXI.Rectangle} sourceFrame - The source frame.
+	     * @param {Number} resolution - Resolution
+	     * @param {boolean} root - If is root
+	     */
+	    ProjectionSystem.prototype.calculateProjection = function calculateProjection (destinationFrame, sourceFrame, resolution, root)
+	    {
+	        var pm = this.projectionMatrix;
+
+	        // I don't think we will need this line..
+	        // pm.identity();
+
+	        if (!root)
+	        {
+	            pm.a = (1 / destinationFrame.width * 2) * resolution;
+	            pm.d = (1 / destinationFrame.height * 2) * resolution;
+
+	            pm.tx = -1 - (sourceFrame.x * pm.a);
+	            pm.ty = -1 - (sourceFrame.y * pm.d);
+	        }
+	        else
+	        {
+	            pm.a = (1 / destinationFrame.width * 2) * resolution;
+	            pm.d = (-1 / destinationFrame.height * 2) * resolution;
+
+	            pm.tx = -1 - (sourceFrame.x * pm.a);
+	            pm.ty = 1 - (sourceFrame.y * pm.d);
+	        }
+	    };
+
+	    /**
+	     * Sets the transform of the active render target to the given matrix
+	     *
+	     * @param {PIXI.Matrix} matrix - The transformation matrix
+	     */
+	    ProjectionSystem.prototype.setTransform = function setTransform ()// matrix)
+	    {
+	        // this._activeRenderTarget.transform = matrix;
+	    };
+
+	    return ProjectionSystem;
+	}(System));
+
+	var tempRect = new Rectangle();
+
+	/**
+	 * System plugin to the renderer to manage render textures.
+	 *
+	 * Should be added after FramebufferSystem
+	 *
+	 * @class
+	 * @extends PIXI.System
+	 * @memberof PIXI.systems
+	 */
+
+	var RenderTextureSystem = /*@__PURE__*/(function (System) {
+	    function RenderTextureSystem(renderer)
+	    {
+	        System.call(this, renderer);
+
+	        /**
+	         * The clear background color as rgba
+	         * @member {number[]}
+	         */
+	        this.clearColor = renderer._backgroundColorRgba;
+
+	        // TODO move this property somewhere else!
+	        /**
+	         * List of masks for the StencilSystem
+	         * @member {PIXI.Graphics[]}
+	         * @readonly
+	         */
+	        this.defaultMaskStack = [];
+
+	        // empty render texture?
+	        /**
+	         * Render texture
+	         * @member {PIXI.RenderTexture}
+	         * @readonly
+	         */
+	        this.current = null;
+
+	        /**
+	         * Source frame
+	         * @member {PIXI.Rectangle}
+	         * @readonly
+	         */
+	        this.sourceFrame = new Rectangle();
+
+	        /**
+	         * Destination frame
+	         * @member {PIXI.Rectangle}
+	         * @readonly
+	         */
+	        this.destinationFrame = new Rectangle();
+	    }
+
+	    if ( System ) { RenderTextureSystem.__proto__ = System; }
+	    RenderTextureSystem.prototype = Object.create( System && System.prototype );
+	    RenderTextureSystem.prototype.constructor = RenderTextureSystem;
+
+	    /**
+	     * Bind the current render texture
+	     * @param {PIXI.RenderTexture} [renderTexture] - RenderTexture to bind, by default its `null`, the screen
+	     * @param {PIXI.Rectangle} [sourceFrame] - part of screen that is mapped to the renderTexture
+	     * @param {PIXI.Rectangle} [destinationFrame] - part of renderTexture, by default it has the same size as sourceFrame
+	     */
+	    RenderTextureSystem.prototype.bind = function bind (renderTexture, sourceFrame, destinationFrame)
+	    {
+	        if ( renderTexture === void 0 ) { renderTexture = null; }
+
+	        this.current = renderTexture;
+
+	        var renderer = this.renderer;
+
+	        var resolution;
+
+	        if (renderTexture)
+	        {
+	            var baseTexture = renderTexture.baseTexture;
+
+	            resolution = baseTexture.resolution;
+
+	            if (!destinationFrame)
+	            {
+	                tempRect.width = baseTexture.realWidth;
+	                tempRect.height = baseTexture.realHeight;
+
+	                destinationFrame = tempRect;
+	            }
+
+	            if (!sourceFrame)
+	            {
+	                sourceFrame = destinationFrame;
+	            }
+
+	            this.renderer.framebuffer.bind(baseTexture.framebuffer, destinationFrame);
+
+	            this.renderer.projection.update(destinationFrame, sourceFrame, resolution, false);
+	            this.renderer.stencil.setMaskStack(baseTexture.stencilMaskStack);
+	        }
+	        else
+	        {
+	            resolution = this.renderer.resolution;
+
+	            // TODO these validation checks happen deeper down..
+	            // thing they can be avoided..
+	            if (!destinationFrame)
+	            {
+	                tempRect.width = renderer.width;
+	                tempRect.height = renderer.height;
+
+	                destinationFrame = tempRect;
+	            }
+
+	            if (!sourceFrame)
+	            {
+	                sourceFrame = destinationFrame;
+	            }
+
+	            renderer.framebuffer.bind(null, destinationFrame);
+
+	            // TODO store this..
+	            this.renderer.projection.update(destinationFrame, sourceFrame, resolution, true);
+	            this.renderer.stencil.setMaskStack(this.defaultMaskStack);
+	        }
+
+	        this.sourceFrame.copyFrom(sourceFrame);
+
+	        this.destinationFrame.x = destinationFrame.x / resolution;
+	        this.destinationFrame.y = destinationFrame.y / resolution;
+
+	        this.destinationFrame.width = destinationFrame.width / resolution;
+	        this.destinationFrame.height = destinationFrame.height / resolution;
+
+	        if (sourceFrame === destinationFrame)
+	        {
+	            this.sourceFrame.copyFrom(this.destinationFrame);
+	        }
+	    };
+
+	    /**
+	     * Erases the render texture and fills the drawing area with a colour
+	     *
+	     * @param {number[]} [clearColor] - The color as rgba, default to use the renderer backgroundColor
+	     * @return {PIXI.Renderer} Returns itself.
+	     */
+	    RenderTextureSystem.prototype.clear = function clear (clearColor)
+	    {
+	        if (this.current)
+	        {
+	            clearColor = clearColor || this.current.baseTexture.clearColor;
+	        }
+	        else
+	        {
+	            clearColor = clearColor || this.clearColor;
+	        }
+
+	        this.renderer.framebuffer.clear(clearColor[0], clearColor[1], clearColor[2], clearColor[3]);
+	    };
+
+	    RenderTextureSystem.prototype.resize = function resize ()// screenWidth, screenHeight)
+	    {
+	        // resize the root only!
+	        this.bind(null);
+	    };
+
+	    /**
+	     * Resets renderTexture state
+	     */
+	    RenderTextureSystem.prototype.reset = function reset ()
+	    {
+	        this.bind(null);
+	    };
+
+	    return RenderTextureSystem;
+	}(System));
+
+	/**
+	 * Helper class to create a WebGL Program
+	 *
+	 * @class
+	 * @memberof PIXI
+	 */
+	var GLProgram = function GLProgram(program, uniformData)
+	{
+	    /**
+	     * The shader program
+	     *
+	     * @member {WebGLProgram}
+	     */
+	    this.program = program;
+
+	    /**
+	     * holds the uniform data which contains uniform locations
+	     * and current uniform values used for caching and preventing unneeded GPU commands
+	     * @member {Object}
+	     */
+	    this.uniformData = uniformData;
+
+	    /**
+	     * uniformGroups holds the various upload functions for the shader. Each uniform group
+	     * and program have a unique upload function generated.
+	     * @member {Object}
+	     */
+	    this.uniformGroups = {};
+	};
+
+	/**
+	 * Destroys this program
+	 */
+	GLProgram.prototype.destroy = function destroy ()
+	{
+	    this.uniformData = null;
+	    this.uniformGroups = null;
+	    this.program = null;
+	};
+
+	var UID$4 = 0;
+
+	/**
+	 * System plugin to the renderer to manage shaders.
+	 *
+	 * @class
+	 * @memberof PIXI.systems
+	 * @extends PIXI.System
+	 */
+	var ShaderSystem = /*@__PURE__*/(function (System) {
+	    function ShaderSystem(renderer)
+	    {
+	        System.call(this, renderer);
+
+	        // Validation check that this environment support `new Function`
+	        this.systemCheck();
+
+	        /**
+	         * The current WebGL rendering context
+	         *
+	         * @member {WebGLRenderingContext}
+	         */
+	        this.gl = null;
+
+	        this.shader = null;
+	        this.program = null;
+
+	        /**
+	         * Cache to holds the generated functions. Stored against UniformObjects unique signature
+	         * @type {Object}
+	         * @private
+	         */
+	        this.cache = {};
+
+	        this.id = UID$4++;
+	    }
+
+	    if ( System ) { ShaderSystem.__proto__ = System; }
+	    ShaderSystem.prototype = Object.create( System && System.prototype );
+	    ShaderSystem.prototype.constructor = ShaderSystem;
+
+	    /**
+	     * Overrideable function by `@pixi/unsafe-eval` to silence
+	     * throwing an error if platform doesn't support unsafe-evals.
+	     *
+	     * @private
+	     */
+	    ShaderSystem.prototype.systemCheck = function systemCheck ()
+	    {
+	        if (!unsafeEvalSupported())
+	        {
+	            throw new Error('Current environment does not allow unsafe-eval, '
+	                + 'please use @pixi/unsafe-eval module to enable support.');
+	        }
+	    };
+
+	    ShaderSystem.prototype.contextChange = function contextChange (gl)
+	    {
+	        this.gl = gl;
+	        this.reset();
+	    };
+
+	    /**
+	     * Changes the current shader to the one given in parameter
+	     *
+	     * @param {PIXI.Shader} shader - the new shader
+	     * @param {boolean} dontSync - false if the shader should automatically sync its uniforms.
+	     * @returns {PIXI.GLProgram} the glProgram that belongs to the shader.
+	     */
+	    ShaderSystem.prototype.bind = function bind (shader, dontSync)
+	    {
+	        shader.uniforms.globals = this.renderer.globalUniforms;
+
+	        var program = shader.program;
+	        var glProgram = program.glPrograms[this.renderer.CONTEXT_UID] || this.generateShader(shader);
+
+	        this.shader = shader;
+
+	        // TODO - some current Pixi plugins bypass this.. so it not safe to use yet..
+	        if (this.program !== program)
+	        {
+	            this.program = program;
+	            this.gl.useProgram(glProgram.program);
+	        }
+
+	        if (!dontSync)
+	        {
+	            this.syncUniformGroup(shader.uniformGroup);
+	        }
+
+	        return glProgram;
+	    };
+
+	    /**
+	     * Uploads the uniforms values to the currently bound shader.
+	     *
+	     * @param {object} uniforms - the uniforms values that be applied to the current shader
+	     */
+	    ShaderSystem.prototype.setUniforms = function setUniforms (uniforms)
+	    {
+	        var shader = this.shader.program;
+	        var glProgram = shader.glPrograms[this.renderer.CONTEXT_UID];
+
+	        shader.syncUniforms(glProgram.uniformData, uniforms, this.renderer);
+	    };
+
+	    ShaderSystem.prototype.syncUniformGroup = function syncUniformGroup (group)
+	    {
+	        var glProgram = this.getglProgram();
+
+	        if (!group.static || group.dirtyId !== glProgram.uniformGroups[group.id])
+	        {
+	            glProgram.uniformGroups[group.id] = group.dirtyId;
+
+	            this.syncUniforms(group, glProgram);
+	        }
+	    };
+
+	    /**
+	     * Overrideable by the @pixi/unsafe-eval package to use static
+	     * syncUnforms instead.
+	     *
+	     * @private
+	     */
+	    ShaderSystem.prototype.syncUniforms = function syncUniforms (group, glProgram)
+	    {
+	        var syncFunc = group.syncUniforms[this.shader.program.id] || this.createSyncGroups(group);
+
+	        syncFunc(glProgram.uniformData, group.uniforms, this.renderer);
+	    };
+
+	    ShaderSystem.prototype.createSyncGroups = function createSyncGroups (group)
+	    {
+	        var id = this.getSignature(group, this.shader.program.uniformData);
+
+	        if (!this.cache[id])
+	        {
+	            this.cache[id] = generateUniformsSync(group, this.shader.program.uniformData);
+	        }
+
+	        group.syncUniforms[this.shader.program.id] = this.cache[id];
+
+	        return group.syncUniforms[this.shader.program.id];
+	    };
+
+	    /**
+	     * Takes a uniform group and data and generates a unique signature for them.
+	     *
+	     * @param {PIXI.UniformGroup} group the uniform group to get signature of
+	     * @param {Object} uniformData uniform information generated by the shader
+	     * @returns {String} Unique signature of the uniform group
+	     * @private
+	     */
+	    ShaderSystem.prototype.getSignature = function getSignature (group, uniformData)
+	    {
+	        var uniforms = group.uniforms;
+
+	        var strings = [];
+
+	        for (var i in uniforms)
+	        {
+	            strings.push(i);
+
+	            if (uniformData[i])
+	            {
+	                strings.push(uniformData[i].type);
+	            }
+	        }
+
+	        return strings.join('-');
+	    };
+
+	    /**
+	     * Returns the underlying GLShade rof the currently bound shader.
+	     * This can be handy for when you to have a little more control over the setting of your uniforms.
+	     *
+	     * @return {PIXI.GLProgram} the glProgram for the currently bound Shader for this context
+	     */
+	    ShaderSystem.prototype.getglProgram = function getglProgram ()
+	    {
+	        if (this.shader)
+	        {
+	            return this.shader.program.glPrograms[this.renderer.CONTEXT_UID];
+	        }
+
+	        return null;
+	    };
+
+	    /**
+	     * Generates a glProgram version of the Shader provided.
+	     *
+	     * @private
+	     * @param {PIXI.Shader} shader the shader that the glProgram will be based on.
+	     * @return {PIXI.GLProgram} A shiny new glProgram!
+	     */
+	    ShaderSystem.prototype.generateShader = function generateShader (shader)
+	    {
+	        var gl = this.gl;
+
+	        var program = shader.program;
+
+	        var attribMap = {};
+
+	        for (var i in program.attributeData)
+	        {
+	            attribMap[i] = program.attributeData[i].location;
+	        }
+
+	        var shaderProgram = compileProgram(gl, program.vertexSrc, program.fragmentSrc, attribMap);
+	        var uniformData = {};
+
+	        for (var i$1 in program.uniformData)
+	        {
+	            var data = program.uniformData[i$1];
+
+	            uniformData[i$1] = {
+	                location: gl.getUniformLocation(shaderProgram, i$1),
+	                value: defaultValue(data.type, data.size),
+	            };
+	        }
+
+	        var glProgram = new GLProgram(shaderProgram, uniformData);
+
+	        program.glPrograms[this.renderer.CONTEXT_UID] = glProgram;
+
+	        return glProgram;
+	    };
+
+	    /**
+	     * Resets ShaderSystem state, does not affect WebGL state
+	     */
+	    ShaderSystem.prototype.reset = function reset ()
+	    {
+	        this.program = null;
+	        this.shader = null;
+	    };
+
+	    /**
+	     * Destroys this System and removes all its textures
+	     */
+	    ShaderSystem.prototype.destroy = function destroy ()
+	    {
+	        // TODO implement destroy method for ShaderSystem
+	        this.destroyed = true;
+	    };
+
+	    return ShaderSystem;
+	}(System));
+
+	/**
+	 * Maps gl blend combinations to WebGL.
+	 *
+	 * @memberof PIXI
+	 * @function mapWebGLBlendModesToPixi
+	 * @private
+	 * @param {WebGLRenderingContext} gl - The rendering context.
+	 * @param {number[][]} [array=[]] - The array to output into.
+	 * @return {number[][]} Mapped modes.
+	 */
+	function mapWebGLBlendModesToPixi(gl, array)
+	{
+	    if ( array === void 0 ) { array = []; }
+
+	    // TODO - premultiply alpha would be different.
+	    // add a boolean for that!
+	    array[BLEND_MODES.NORMAL] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];
+	    array[BLEND_MODES.ADD] = [gl.ONE, gl.ONE];
+	    array[BLEND_MODES.MULTIPLY] = [gl.DST_COLOR, gl.ONE_MINUS_SRC_ALPHA, gl.ONE, gl.ONE_MINUS_SRC_ALPHA];
+	    array[BLEND_MODES.SCREEN] = [gl.ONE, gl.ONE_MINUS_SRC_COLOR, gl.ONE, gl.ONE_MINUS_SRC_ALPHA];
+	    array[BLEND_MODES.OVERLAY] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];
+	    array[BLEND_MODES.DARKEN] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];
+	    array[BLEND_MODES.LIGHTEN] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];
+	    array[BLEND_MODES.COLOR_DODGE] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];
+	    array[BLEND_MODES.COLOR_BURN] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];
+	    array[BLEND_MODES.HARD_LIGHT] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];
+	    array[BLEND_MODES.SOFT_LIGHT] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];
+	    array[BLEND_MODES.DIFFERENCE] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];
+	    array[BLEND_MODES.EXCLUSION] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];
+	    array[BLEND_MODES.HUE] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];
+	    array[BLEND_MODES.SATURATION] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];
+	    array[BLEND_MODES.COLOR] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];
+	    array[BLEND_MODES.LUMINOSITY] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];
+	    array[BLEND_MODES.NONE] = [0, 0];
+
+	    // not-premultiplied blend modes
+	    array[BLEND_MODES.NORMAL_NPM] = [gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA, gl.ONE, gl.ONE_MINUS_SRC_ALPHA];
+	    array[BLEND_MODES.ADD_NPM] = [gl.SRC_ALPHA, gl.ONE, gl.ONE, gl.ONE];
+	    array[BLEND_MODES.SCREEN_NPM] = [gl.SRC_ALPHA, gl.ONE_MINUS_SRC_COLOR, gl.ONE, gl.ONE_MINUS_SRC_ALPHA];
+
+	    // composite operations
+	    array[BLEND_MODES.SRC_IN] = [gl.DST_ALPHA, gl.ZERO];
+	    array[BLEND_MODES.SRC_OUT] = [gl.ONE_MINUS_DST_ALPHA, gl.ZERO];
+	    array[BLEND_MODES.SRC_ATOP] = [gl.DST_ALPHA, gl.ONE_MINUS_SRC_ALPHA];
+	    array[BLEND_MODES.DST_OVER] = [gl.ONE_MINUS_DST_ALPHA, gl.ONE];
+	    array[BLEND_MODES.DST_IN] = [gl.ZERO, gl.SRC_ALPHA];
+	    array[BLEND_MODES.DST_OUT] = [gl.ZERO, gl.ONE_MINUS_SRC_ALPHA];
+	    array[BLEND_MODES.DST_ATOP] = [gl.ONE_MINUS_DST_ALPHA, gl.SRC_ALPHA];
+
+	    // SUBTRACT from flash
+	    array[BLEND_MODES.SUBTRACT] = [gl.ONE, gl.ONE, gl.ONE, gl.ONE, gl.FUNC_REVERSE_SUBTRACT, gl.FUNC_ADD];
+
+	    return array;
+	}
+
+	var BLEND$1 = 0;
+	var OFFSET$1 = 1;
+	var CULLING$1 = 2;
+	var DEPTH_TEST$1 = 3;
+	var WINDING$1 = 4;
+
+	/**
+	 * System plugin to the renderer to manage WebGL state machines.
+	 *
+	 * @class
+	 * @extends PIXI.System
+	 * @memberof PIXI.systems
+	 */
+	var StateSystem = /*@__PURE__*/(function (System) {
+	    function StateSystem(renderer)
+	    {
+	        System.call(this, renderer);
+
+	        /**
+	         * GL context
+	         * @member {WebGLRenderingContext}
+	         * @readonly
+	         */
+	        this.gl = null;
+
+	        /**
+	         * State ID
+	         * @member {number}
+	         * @readonly
+	         */
+	        this.stateId = 0;
+
+	        /**
+	         * Polygon offset
+	         * @member {number}
+	         * @readonly
+	         */
+	        this.polygonOffset = 0;
+
+	        /**
+	         * Blend mode
+	         * @member {number}
+	         * @default PIXI.BLEND_MODES.NONE
+	         * @readonly
+	         */
+	        this.blendMode = BLEND_MODES.NONE;
+
+	        /**
+	         * Whether current blend equation is different
+	         * @member {boolean}
+	         * @protected
+	         */
+	        this._blendEq = false;
+
+	        /**
+	         * Collection of calls
+	         * @member {function[]}
+	         * @readonly
+	         */
+	        this.map = [];
+
+	        // map functions for when we set state..
+	        this.map[BLEND$1] = this.setBlend;
+	        this.map[OFFSET$1] = this.setOffset;
+	        this.map[CULLING$1] = this.setCullFace;
+	        this.map[DEPTH_TEST$1] = this.setDepthTest;
+	        this.map[WINDING$1] = this.setFrontFace;
+
+	        /**
+	         * Collection of check calls
+	         * @member {function[]}
+	         * @readonly
+	         */
+	        this.checks = [];
+
+	        /**
+	         * Default WebGL State
+	         * @member {PIXI.State}
+	         * @readonly
+	         */
+	        this.defaultState = new State();
+	        this.defaultState.blend = true;
+	        this.defaultState.depth = true;
+	    }
+
+	    if ( System ) { StateSystem.__proto__ = System; }
+	    StateSystem.prototype = Object.create( System && System.prototype );
+	    StateSystem.prototype.constructor = StateSystem;
+
+	    StateSystem.prototype.contextChange = function contextChange (gl)
+	    {
+	        this.gl = gl;
+
+	        this.blendModes = mapWebGLBlendModesToPixi(gl);
+
+	        this.set(this.defaultState);
+
+	        this.reset();
+	    };
+
+	    /**
+	     * Sets the current state
+	     *
+	     * @param {*} state - The state to set.
+	     */
+	    StateSystem.prototype.set = function set (state)
+	    {
+	        state = state || this.defaultState;
+
+	        // TODO maybe to an object check? ( this.state === state )?
+	        if (this.stateId !== state.data)
+	        {
+	            var diff = this.stateId ^ state.data;
+	            var i = 0;
+
+	            // order from least to most common
+	            while (diff)
+	            {
+	                if (diff & 1)
+	                {
+	                    // state change!
+	                    this.map[i].call(this, !!(state.data & (1 << i)));
+	                }
+
+	                diff = diff >> 1;
+	                i++;
+	            }
+
+	            this.stateId = state.data;
+	        }
+
+	        // based on the above settings we check for specific modes..
+	        // for example if blend is active we check and set the blend modes
+	        // or of polygon offset is active we check the poly depth.
+	        for (var i$1 = 0; i$1 < this.checks.length; i$1++)
+	        {
+	            this.checks[i$1](this, state);
+	        }
+	    };
+
+	    /**
+	     * Sets the state, when previous state is unknown
+	     *
+	     * @param {*} state - The state to set
+	     */
+	    StateSystem.prototype.forceState = function forceState (state)
+	    {
+	        state = state || this.defaultState;
+	        for (var i = 0; i < this.map.length; i++)
+	        {
+	            this.map[i].call(this, !!(state.data & (1 << i)));
+	        }
+	        for (var i$1 = 0; i$1 < this.checks.length; i$1++)
+	        {
+	            this.checks[i$1](this, state);
+	        }
+
+	        this.stateId = state.data;
+	    };
+
+	    /**
+	     * Enables or disabled blending.
+	     *
+	     * @param {boolean} value - Turn on or off webgl blending.
+	     */
+	    StateSystem.prototype.setBlend = function setBlend (value)
+	    {
+	        this.updateCheck(StateSystem.checkBlendMode, value);
+
+	        this.gl[value ? 'enable' : 'disable'](this.gl.BLEND);
+	    };
+
+	    /**
+	     * Enables or disable polygon offset fill
+	     *
+	     * @param {boolean} value - Turn on or off webgl polygon offset testing.
+	     */
+	    StateSystem.prototype.setOffset = function setOffset (value)
+	    {
+	        this.updateCheck(StateSystem.checkPolygonOffset, value);
+
+	        this.gl[value ? 'enable' : 'disable'](this.gl.POLYGON_OFFSET_FILL);
+	    };
+
+	    /**
+	     * Sets whether to enable or disable depth test.
+	     *
+	     * @param {boolean} value - Turn on or off webgl depth testing.
+	     */
+	    StateSystem.prototype.setDepthTest = function setDepthTest (value)
+	    {
+	        this.gl[value ? 'enable' : 'disable'](this.gl.DEPTH_TEST);
+	    };
+
+	    /**
+	     * Sets whether to enable or disable cull face.
+	     *
+	     * @param {boolean} value - Turn on or off webgl cull face.
+	     */
+	    StateSystem.prototype.setCullFace = function setCullFace (value)
+	    {
+	        this.gl[value ? 'enable' : 'disable'](this.gl.CULL_FACE);
+	    };
+
+	    /**
+	     * Sets the gl front face.
+	     *
+	     * @param {boolean} value - true is clockwise and false is counter-clockwise
+	     */
+	    StateSystem.prototype.setFrontFace = function setFrontFace (value)
+	    {
+	        this.gl.frontFace(this.gl[value ? 'CW' : 'CCW']);
+	    };
+
+	    /**
+	     * Sets the blend mode.
+	     *
+	     * @param {number} value - The blend mode to set to.
+	     */
+	    StateSystem.prototype.setBlendMode = function setBlendMode (value)
+	    {
+	        if (value === this.blendMode)
+	        {
+	            return;
+	        }
+
+	        this.blendMode = value;
+
+	        var mode = this.blendModes[value];
+	        var gl = this.gl;
+
+	        if (mode.length === 2)
+	        {
+	            gl.blendFunc(mode[0], mode[1]);
+	        }
+	        else
+	        {
+	            gl.blendFuncSeparate(mode[0], mode[1], mode[2], mode[3]);
+	        }
+	        if (mode.length === 6)
+	        {
+	            this._blendEq = true;
+	            gl.blendEquationSeparate(mode[4], mode[5]);
+	        }
+	        else if (this._blendEq)
+	        {
+	            this._blendEq = false;
+	            gl.blendEquationSeparate(gl.FUNC_ADD, gl.FUNC_ADD);
+	        }
+	    };
+
+	    /**
+	     * Sets the polygon offset.
+	     *
+	     * @param {number} value - the polygon offset
+	     * @param {number} scale - the polygon offset scale
+	     */
+	    StateSystem.prototype.setPolygonOffset = function setPolygonOffset (value, scale)
+	    {
+	        this.gl.polygonOffset(value, scale);
+	    };
+
+	    // used
+	    /**
+	     * Resets all the logic and disables the vaos
+	     */
+	    StateSystem.prototype.reset = function reset ()
+	    {
+	        this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL, false);
+
+	        this.forceState(0);
+
+	        this._blendEq = true;
+	        this.blendMode = -1;
+	        this.setBlendMode(0);
+	    };
+
+	    /**
+	     * checks to see which updates should be checked based on which settings have been activated.
+	     * For example, if blend is enabled then we should check the blend modes each time the state is changed
+	     * or if polygon fill is activated then we need to check if the polygon offset changes.
+	     * The idea is that we only check what we have too.
+	     *
+	     * @param {Function} func  the checking function to add or remove
+	     * @param {boolean} value  should the check function be added or removed.
+	     */
+	    StateSystem.prototype.updateCheck = function updateCheck (func, value)
+	    {
+	        var index = this.checks.indexOf(func);
+
+	        if (value && index === -1)
+	        {
+	            this.checks.push(func);
+	        }
+	        else if (!value && index !== -1)
+	        {
+	            this.checks.splice(index, 1);
+	        }
+	    };
+
+	    /**
+	     * A private little wrapper function that we call to check the blend mode.
+	     *
+	     * @static
+	     * @private
+	     * @param {PIXI.StateSystem} System  the System to perform the state check on
+	     * @param {PIXI.State} state  the state that the blendMode will pulled from
+	     */
+	    StateSystem.checkBlendMode = function checkBlendMode (system, state)
+	    {
+	        system.setBlendMode(state.blendMode);
+	    };
+
+	    /**
+	     * A private little wrapper function that we call to check the polygon offset.
+	     *
+	     * @static
+	     * @private
+	     * @param {PIXI.StateSystem} System  the System to perform the state check on
+	     * @param {PIXI.State} state  the state that the blendMode will pulled from
+	     */
+	    StateSystem.checkPolygonOffset = function checkPolygonOffset (system, state)
+	    {
+	        system.setPolygonOffset(state.polygonOffset, 0);
+	    };
+
+	    return StateSystem;
+	}(System));
+
+	/**
+	 * System plugin to the renderer to manage texture garbage collection on the GPU,
+	 * ensuring that it does not get clogged up with textures that are no longer being used.
+	 *
+	 * @class
+	 * @memberof PIXI.systems
+	 * @extends PIXI.System
+	 */
+	var TextureGCSystem = /*@__PURE__*/(function (System) {
+	    function TextureGCSystem(renderer)
+	    {
+	        System.call(this, renderer);
+
+	        /**
+	         * Count
+	         * @member {number}
+	         * @readonly
+	         */
+	        this.count = 0;
+
+	        /**
+	         * Check count
+	         * @member {number}
+	         * @readonly
+	         */
+	        this.checkCount = 0;
+
+	        /**
+	         * Maximum idle time, in seconds
+	         * @member {number}
+	         * @see PIXI.settings.GC_MAX_IDLE
+	         */
+	        this.maxIdle = settings.GC_MAX_IDLE;
+
+	        /**
+	         * Maximum number of item to check
+	         * @member {number}
+	         * @see PIXI.settings.GC_MAX_CHECK_COUNT
+	         */
+	        this.checkCountMax = settings.GC_MAX_CHECK_COUNT;
+
+	        /**
+	         * Current garabage collection mode
+	         * @member {PIXI.GC_MODES}
+	         * @see PIXI.settings.GC_MODE
+	         */
+	        this.mode = settings.GC_MODE;
+	    }
+
+	    if ( System ) { TextureGCSystem.__proto__ = System; }
+	    TextureGCSystem.prototype = Object.create( System && System.prototype );
+	    TextureGCSystem.prototype.constructor = TextureGCSystem;
+
+	    /**
+	     * Checks to see when the last time a texture was used
+	     * if the texture has not been used for a specified amount of time it will be removed from the GPU
+	     */
+	    TextureGCSystem.prototype.postrender = function postrender ()
+	    {
+	        this.count++;
+
+	        if (this.mode === GC_MODES.MANUAL)
+	        {
+	            return;
+	        }
+
+	        this.checkCount++;
+
+	        if (this.checkCount > this.checkCountMax)
+	        {
+	            this.checkCount = 0;
+
+	            this.run();
+	        }
+	    };
+
+	    /**
+	     * Checks to see when the last time a texture was used
+	     * if the texture has not been used for a specified amount of time it will be removed from the GPU
+	     */
+	    TextureGCSystem.prototype.run = function run ()
+	    {
+	        var tm = this.renderer.texture;
+	        var managedTextures =  tm.managedTextures;
+	        var wasRemoved = false;
+
+	        for (var i = 0; i < managedTextures.length; i++)
+	        {
+	            var texture = managedTextures[i];
+
+	            // only supports non generated textures at the moment!
+	            if (!texture.framebuffer && this.count - texture.touched > this.maxIdle)
+	            {
+	                tm.destroyTexture(texture, true);
+	                managedTextures[i] = null;
+	                wasRemoved = true;
+	            }
+	        }
+
+	        if (wasRemoved)
+	        {
+	            var j = 0;
+
+	            for (var i$1 = 0; i$1 < managedTextures.length; i$1++)
+	            {
+	                if (managedTextures[i$1] !== null)
+	                {
+	                    managedTextures[j++] = managedTextures[i$1];
+	                }
+	            }
+
+	            managedTextures.length = j;
+	        }
+	    };
+
+	    /**
+	     * Removes all the textures within the specified displayObject and its children from the GPU
+	     *
+	     * @param {PIXI.DisplayObject} displayObject - the displayObject to remove the textures from.
+	     */
+	    TextureGCSystem.prototype.unload = function unload (displayObject)
+	    {
+	        var tm = this.renderer.textureSystem;
+
+	        // only destroy non generated textures
+	        if (displayObject._texture && displayObject._texture._glRenderTargets)
+	        {
+	            tm.destroyTexture(displayObject._texture);
+	        }
+
+	        for (var i = displayObject.children.length - 1; i >= 0; i--)
+	        {
+	            this.unload(displayObject.children[i]);
+	        }
+	    };
+
+	    return TextureGCSystem;
+	}(System));
+
+	/**
+	 * Internal texture for WebGL context
+	 * @class
+	 * @memberof PIXI
+	 */
+	var GLTexture = function GLTexture(texture)
+	{
+	    /**
+	     * The WebGL texture
+	     * @member {WebGLTexture}
+	     */
+	    this.texture = texture;
+
+	    /**
+	     * Width of texture that was used in texImage2D
+	     * @member {number}
+	     */
+	    this.width = -1;
+
+	    /**
+	     * Height of texture that was used in texImage2D
+	     * @member {number}
+	     */
+	    this.height = -1;
+
+	    /**
+	     * Texture contents dirty flag
+	     * @member {number}
+	     */
+	    this.dirtyId = -1;
+
+	    /**
+	     * Texture style dirty flag
+	     * @member {number}
+	     */
+	    this.dirtyStyleId = -1;
+
+	    /**
+	     * Whether mip levels has to be generated
+	     * @member {boolean}
+	     */
+	    this.mipmap = false;
+
+	    /**
+	     * WrapMode copied from baseTexture
+	     * @member {number}
+	     */
+	    this.wrapMode = 33071;
+
+	    /**
+	     * Type copied from baseTexture
+	     * @member {number}
+	     */
+	    this.type = 6408;
+
+	    /**
+	     * Type copied from baseTexture
+	     * @member {number}
+	     */
+	    this.internalFormat = 5121;
+	};
+
+	/**
+	 * System plugin to the renderer to manage textures.
+	 *
+	 * @class
+	 * @extends PIXI.System
+	 * @memberof PIXI.systems
+	 */
+	var TextureSystem = /*@__PURE__*/(function (System) {
+	    function TextureSystem(renderer)
+	    {
+	        System.call(this, renderer);
+
+	        // TODO set to max textures...
+	        /**
+	         * Bound textures
+	         * @member {PIXI.BaseTexture[]}
+	         * @readonly
+	         */
+	        this.boundTextures = [];
+	        /**
+	         * Current location
+	         * @member {number}
+	         * @readonly
+	         */
+	        this.currentLocation = -1;
+
+	        /**
+	         * List of managed textures
+	         * @member {PIXI.BaseTexture[]}
+	         * @readonly
+	         */
+	        this.managedTextures = [];
+
+	        /**
+	         * Did someone temper with textures state? We'll overwrite them when we need to unbind something.
+	         * @member {boolean}
+	         * @private
+	         */
+	        this._unknownBoundTextures = false;
+
+	        /**
+	         * BaseTexture value that shows that we don't know what is bound
+	         * @member {PIXI.BaseTexture}
+	         * @readonly
+	         */
+	        this.unknownTexture = new BaseTexture();
+	    }
+
+	    if ( System ) { TextureSystem.__proto__ = System; }
+	    TextureSystem.prototype = Object.create( System && System.prototype );
+	    TextureSystem.prototype.constructor = TextureSystem;
+
+	    /**
+	     * Sets up the renderer context and necessary buffers.
+	     */
+	    TextureSystem.prototype.contextChange = function contextChange ()
+	    {
+	        var gl = this.gl = this.renderer.gl;
+
+	        this.CONTEXT_UID = this.renderer.CONTEXT_UID;
+
+	        this.webGLVersion = this.renderer.context.webGLVersion;
+
+	        var maxTextures = gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS);
+
+	        this.boundTextures.length = maxTextures;
+
+	        for (var i = 0; i < maxTextures; i++)
+	        {
+	            this.boundTextures[i] = null;
+	        }
+
+	        // TODO move this.. to a nice make empty textures class..
+	        this.emptyTextures = {};
+
+	        var emptyTexture2D = new GLTexture(gl.createTexture());
+
+	        gl.bindTexture(gl.TEXTURE_2D, emptyTexture2D.texture);
+	        gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 1, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE, new Uint8Array(4));
+
+	        this.emptyTextures[gl.TEXTURE_2D] = emptyTexture2D;
+	        this.emptyTextures[gl.TEXTURE_CUBE_MAP] = new GLTexture(gl.createTexture());
+
+	        gl.bindTexture(gl.TEXTURE_CUBE_MAP, this.emptyTextures[gl.TEXTURE_CUBE_MAP].texture);
+
+	        for (var i$1 = 0; i$1 < 6; i$1++)
+	        {
+	            gl.texImage2D(gl.TEXTURE_CUBE_MAP_POSITIVE_X + i$1, 0, gl.RGBA, 1, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+	        }
+
+	        gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+	        gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+
+	        for (var i$2 = 0; i$2 < this.boundTextures.length; i$2++)
+	        {
+	            this.bind(null, i$2);
+	        }
+	    };
+
+	    /**
+	     * Bind a texture to a specific location
+	     *
+	     * If you want to unbind something, please use `unbind(texture)` instead of `bind(null, textureLocation)`
+	     *
+	     * @param {PIXI.Texture|PIXI.BaseTexture} texture - Texture to bind
+	     * @param {number} [location=0] - Location to bind at
+	     */
+	    TextureSystem.prototype.bind = function bind (texture, location)
+	    {
+	        if ( location === void 0 ) { location = 0; }
+
+	        var ref = this;
+	        var gl = ref.gl;
+
+	        if (texture)
+	        {
+	            texture = texture.baseTexture || texture;
+
+	            if (texture.valid)
+	            {
+	                texture.touched = this.renderer.textureGC.count;
+
+	                var glTexture = texture._glTextures[this.CONTEXT_UID] || this.initTexture(texture);
+
+	                if (this.currentLocation !== location)
+	                {
+	                    this.currentLocation = location;
+	                    gl.activeTexture(gl.TEXTURE0 + location);
+	                }
+
+	                if (this.boundTextures[location] !== texture)
+	                {
+	                    gl.bindTexture(texture.target, glTexture.texture);
+	                }
+
+	                if (glTexture.dirtyId !== texture.dirtyId)
+	                {
+	                    this.updateTexture(texture);
+	                }
+
+	                this.boundTextures[location] = texture;
+	            }
+	        }
+	        else
+	        {
+	            if (this.currentLocation !== location)
+	            {
+	                this.currentLocation = location;
+	                gl.activeTexture(gl.TEXTURE0 + location);
+	            }
+
+	            gl.bindTexture(gl.TEXTURE_2D, this.emptyTextures[gl.TEXTURE_2D].texture);
+	            this.boundTextures[location] = null;
+	        }
+	    };
+
+	    /**
+	     * Resets texture location and bound textures
+	     *
+	     * Actual `bind(null, i)` calls will be performed at next `unbind()` call
+	     */
+	    TextureSystem.prototype.reset = function reset ()
+	    {
+	        this._unknownBoundTextures = true;
+	        this.currentLocation = -1;
+
+	        for (var i = 0; i < this.boundTextures.length; i++)
+	        {
+	            this.boundTextures[i] = this.unknownTexture;
+	        }
+	    };
+
+	    /**
+	     * Unbind a texture
+	     * @param {PIXI.Texture|PIXI.BaseTexture} texture - Texture to bind
+	     */
+	    TextureSystem.prototype.unbind = function unbind (texture)
+	    {
+	        var ref = this;
+	        var gl = ref.gl;
+	        var boundTextures = ref.boundTextures;
+
+	        if (this._unknownBoundTextures)
+	        {
+	            this._unknownBoundTextures = false;
+	            // someone changed webGL state,
+	            // we have to be sure that our texture does not appear in multi-texture renderer samplers
+	            for (var i = 0; i < boundTextures.length; i++)
+	            {
+	                if (boundTextures[i] === this.unknownTexture)
+	                {
+	                    this.bind(null, i);
+	                }
+	            }
+	        }
+
+	        for (var i$1 = 0; i$1 < boundTextures.length; i$1++)
+	        {
+	            if (boundTextures[i$1] === texture)
+	            {
+	                if (this.currentLocation !== i$1)
+	                {
+	                    gl.activeTexture(gl.TEXTURE0 + i$1);
+	                    this.currentLocation = i$1;
+	                }
+
+	                gl.bindTexture(gl.TEXTURE_2D, this.emptyTextures[texture.target].texture);
+	                boundTextures[i$1] = null;
+	            }
+	        }
+	    };
+
+	    /**
+	     * Initialize a texture
+	     *
+	     * @private
+	     * @param {PIXI.BaseTexture} texture - Texture to initialize
+	     */
+	    TextureSystem.prototype.initTexture = function initTexture (texture)
+	    {
+	        var glTexture = new GLTexture(this.gl.createTexture());
+
+	        // guarantee an update..
+	        glTexture.dirtyId = -1;
+
+	        texture._glTextures[this.CONTEXT_UID] = glTexture;
+
+	        this.managedTextures.push(texture);
+	        texture.on('dispose', this.destroyTexture, this);
+
+	        return glTexture;
+	    };
+
+	    TextureSystem.prototype.initTextureType = function initTextureType (texture, glTexture)
+	    {
+	        glTexture.internalFormat = texture.format;
+	        glTexture.type = texture.type;
+	        if (this.webGLVersion !== 2)
+	        {
+	            return;
+	        }
+	        var gl = this.renderer.gl;
+
+	        if (texture.type === gl.FLOAT
+	            && texture.format === gl.RGBA)
+	        {
+	            glTexture.internalFormat = gl.RGBA32F;
+	        }
+	        // that's WebGL1 HALF_FLOAT_OES
+	        // we have to convert it to WebGL HALF_FLOAT
+	        if (texture.type === TYPES.HALF_FLOAT)
+	        {
+	            glTexture.type = gl.HALF_FLOAT;
+	        }
+	        if (glTexture.type === gl.HALF_FLOAT
+	            && texture.format === gl.RGBA)
+	        {
+	            glTexture.internalFormat = gl.RGBA16F;
+	        }
+	    };
+
+	    /**
+	     * Update a texture
+	     *
+	     * @private
+	     * @param {PIXI.BaseTexture} texture - Texture to initialize
+	     */
+	    TextureSystem.prototype.updateTexture = function updateTexture (texture)
+	    {
+	        var glTexture = texture._glTextures[this.CONTEXT_UID];
+
+	        if (!glTexture)
+	        {
+	            return;
+	        }
+
+	        var renderer = this.renderer;
+
+	        this.initTextureType(texture, glTexture);
+
+	        if (texture.resource && texture.resource.upload(renderer, texture, glTexture))
+	        { ; }
+	        else
+	        {
+	            // default, renderTexture-like logic
+	            var width = texture.realWidth;
+	            var height = texture.realHeight;
+	            var gl = renderer.gl;
+
+	            if (glTexture.width !== width
+	                || glTexture.height !== height
+	                || glTexture.dirtyId < 0)
+	            {
+	                glTexture.width = width;
+	                glTexture.height = height;
+
+	                gl.texImage2D(texture.target, 0,
+	                    glTexture.internalFormat,
+	                    width,
+	                    height,
+	                    0,
+	                    texture.format,
+	                    glTexture.type,
+	                    null);
+	            }
+	        }
+
+	        // lets only update what changes..
+	        if (texture.dirtyStyleId !== glTexture.dirtyStyleId)
+	        {
+	            this.updateTextureStyle(texture);
+	        }
+	        glTexture.dirtyId = texture.dirtyId;
+	    };
+
+	    /**
+	     * Deletes the texture from WebGL
+	     *
+	     * @private
+	     * @param {PIXI.BaseTexture|PIXI.Texture} texture - the texture to destroy
+	     * @param {boolean} [skipRemove=false] - Whether to skip removing the texture from the TextureManager.
+	     */
+	    TextureSystem.prototype.destroyTexture = function destroyTexture (texture, skipRemove)
+	    {
+	        var ref = this;
+	        var gl = ref.gl;
+
+	        texture = texture.baseTexture || texture;
+
+	        if (texture._glTextures[this.CONTEXT_UID])
+	        {
+	            this.unbind(texture);
+
+	            gl.deleteTexture(texture._glTextures[this.CONTEXT_UID].texture);
+	            texture.off('dispose', this.destroyTexture, this);
+
+	            delete texture._glTextures[this.CONTEXT_UID];
+
+	            if (!skipRemove)
+	            {
+	                var i = this.managedTextures.indexOf(texture);
+
+	                if (i !== -1)
+	                {
+	                    removeItems(this.managedTextures, i, 1);
+	                }
+	            }
+	        }
+	    };
+
+	    /**
+	     * Update texture style such as mipmap flag
+	     *
+	     * @private
+	     * @param {PIXI.BaseTexture} texture - Texture to update
+	     */
+	    TextureSystem.prototype.updateTextureStyle = function updateTextureStyle (texture)
+	    {
+	        var glTexture = texture._glTextures[this.CONTEXT_UID];
+
+	        if (!glTexture)
+	        {
+	            return;
+	        }
+
+	        if ((texture.mipmap === MIPMAP_MODES.POW2 || this.webGLVersion !== 2) && !texture.isPowerOfTwo)
+	        {
+	            glTexture.mipmap = 0;
+	            glTexture.wrapMode = WRAP_MODES.CLAMP;
+	        }
+	        else
+	        {
+	            glTexture.mipmap = texture.mipmap >= 1;
+	            glTexture.wrapMode = texture.wrapMode;
+	        }
+
+	        if (texture.resource && texture.resource.style(this.renderer, texture, glTexture))
+	        { ; }
+	        else
+	        {
+	            this.setStyle(texture, glTexture);
+	        }
+
+	        glTexture.dirtyStyleId = texture.dirtyStyleId;
+	    };
+
+	    /**
+	     * Set style for texture
+	     *
+	     * @private
+	     * @param {PIXI.BaseTexture} texture - Texture to update
+	     * @param {PIXI.GLTexture} glTexture
+	     */
+	    TextureSystem.prototype.setStyle = function setStyle (texture, glTexture)
+	    {
+	        var gl = this.gl;
+
+	        if (glTexture.mipmap)
+	        {
+	            gl.generateMipmap(texture.target);
+	        }
+
+	        gl.texParameteri(texture.target, gl.TEXTURE_WRAP_S, glTexture.wrapMode);
+	        gl.texParameteri(texture.target, gl.TEXTURE_WRAP_T, glTexture.wrapMode);
+
+	        if (glTexture.mipmap)
+	        {
+	            /* eslint-disable max-len */
+	            gl.texParameteri(texture.target, gl.TEXTURE_MIN_FILTER, texture.scaleMode ? gl.LINEAR_MIPMAP_LINEAR : gl.NEAREST_MIPMAP_NEAREST);
+	            /* eslint-disable max-len */
+
+	            var anisotropicExt = this.renderer.context.extensions.anisotropicFiltering;
+
+	            if (anisotropicExt && texture.anisotropicLevel > 0 && texture.scaleMode === SCALE_MODES.LINEAR)
+	            {
+	                var level = Math.min(texture.anisotropicLevel, gl.getParameter(anisotropicExt.MAX_TEXTURE_MAX_ANISOTROPY_EXT));
+
+	                gl.texParameterf(texture.target, anisotropicExt.TEXTURE_MAX_ANISOTROPY_EXT, level);
+	            }
+	        }
+	        else
+	        {
+	            gl.texParameteri(texture.target, gl.TEXTURE_MIN_FILTER, texture.scaleMode ? gl.LINEAR : gl.NEAREST);
+	        }
+
+	        gl.texParameteri(texture.target, gl.TEXTURE_MAG_FILTER, texture.scaleMode ? gl.LINEAR : gl.NEAREST);
+	    };
+
+	    return TextureSystem;
+	}(System));
+
+	/**
+	 * Systems are individual components to the Renderer pipeline.
+	 * @namespace PIXI.systems
+	 */
+
+	var systems = ({
+	    FilterSystem: FilterSystem,
+	    BatchSystem: BatchSystem,
+	    ContextSystem: ContextSystem,
+	    FramebufferSystem: FramebufferSystem,
+	    GeometrySystem: GeometrySystem,
+	    MaskSystem: MaskSystem,
+	    StencilSystem: StencilSystem,
+	    ProjectionSystem: ProjectionSystem,
+	    RenderTextureSystem: RenderTextureSystem,
+	    ShaderSystem: ShaderSystem,
+	    StateSystem: StateSystem,
+	    TextureGCSystem: TextureGCSystem,
+	    TextureSystem: TextureSystem
+	});
+
+	var tempMatrix = new Matrix();
+
+	/**
+	 * The AbstractRenderer is the base for a PixiJS Renderer. It is extended by the {@link PIXI.CanvasRenderer}
+	 * and {@link PIXI.Renderer} which can be used for rendering a PixiJS scene.
+	 *
+	 * @abstract
+	 * @class
+	 * @extends PIXI.utils.EventEmitter
+	 * @memberof PIXI
+	 */
+	var AbstractRenderer = /*@__PURE__*/(function (EventEmitter) {
+	    function AbstractRenderer(system, options)
+	    {
+	        EventEmitter.call(this);
+
+	        // Add the default render options
+	        options = Object.assign({}, settings.RENDER_OPTIONS, options);
+
+	        // Deprecation notice for renderer roundPixels option
+	        if (options.roundPixels)
+	        {
+	            settings.ROUND_PIXELS = options.roundPixels;
+	            deprecation('5.0.0', 'Renderer roundPixels option is deprecated, please use PIXI.settings.ROUND_PIXELS', 2);
+	        }
+
+	        /**
+	         * The supplied constructor options.
+	         *
+	         * @member {Object}
+	         * @readOnly
+	         */
+	        this.options = options;
+
+	        /**
+	         * The type of the renderer.
+	         *
+	         * @member {number}
+	         * @default PIXI.RENDERER_TYPE.UNKNOWN
+	         * @see PIXI.RENDERER_TYPE
+	         */
+	        this.type = RENDERER_TYPE.UNKNOWN;
+
+	        /**
+	         * Measurements of the screen. (0, 0, screenWidth, screenHeight).
+	         *
+	         * Its safe to use as filterArea or hitArea for the whole stage.
+	         *
+	         * @member {PIXI.Rectangle}
+	         */
+	        this.screen = new Rectangle(0, 0, options.width, options.height);
+
+	        /**
+	         * The canvas element that everything is drawn to.
+	         *
+	         * @member {HTMLCanvasElement}
+	         */
+	        this.view = options.view || document.createElement('canvas');
+
+	        /**
+	         * The resolution / device pixel ratio of the renderer.
+	         *
+	         * @member {number}
+	         * @default 1
+	         */
+	        this.resolution = options.resolution || settings.RESOLUTION;
+
+	        /**
+	         * Whether the render view is transparent.
+	         *
+	         * @member {boolean}
+	         */
+	        this.transparent = options.transparent;
+
+	        /**
+	         * Whether CSS dimensions of canvas view should be resized to screen dimensions automatically.
+	         *
+	         * @member {boolean}
+	         */
+	        this.autoDensity = options.autoDensity || options.autoResize || false;
+	        // autoResize is deprecated, provides fallback support
+
+	        /**
+	         * The value of the preserveDrawingBuffer flag affects whether or not the contents of
+	         * the stencil buffer is retained after rendering.
+	         *
+	         * @member {boolean}
+	         */
+	        this.preserveDrawingBuffer = options.preserveDrawingBuffer;
+
+	        /**
+	         * This sets if the CanvasRenderer will clear the canvas or not before the new render pass.
+	         * If the scene is NOT transparent PixiJS will use a canvas sized fillRect operation every
+	         * frame to set the canvas background color. If the scene is transparent PixiJS will use clearRect
+	         * to clear the canvas every frame. Disable this by setting this to false. For example, if
+	         * your game has a canvas filling background image you often don't need this set.
+	         *
+	         * @member {boolean}
+	         * @default
+	         */
+	        this.clearBeforeRender = options.clearBeforeRender;
+
+	        /**
+	         * The background color as a number.
+	         *
+	         * @member {number}
+	         * @protected
+	         */
+	        this._backgroundColor = 0x000000;
+
+	        /**
+	         * The background color as an [R, G, B] array.
+	         *
+	         * @member {number[]}
+	         * @protected
+	         */
+	        this._backgroundColorRgba = [0, 0, 0, 0];
+
+	        /**
+	         * The background color as a string.
+	         *
+	         * @member {string}
+	         * @protected
+	         */
+	        this._backgroundColorString = '#000000';
+
+	        this.backgroundColor = options.backgroundColor || this._backgroundColor; // run bg color setter
+
+	        /**
+	         * This temporary display object used as the parent of the currently being rendered item.
+	         *
+	         * @member {PIXI.DisplayObject}
+	         * @protected
+	         */
+	        this._tempDisplayObjectParent = new Container();
+
+	        /**
+	         * The last root object that the renderer tried to render.
+	         *
+	         * @member {PIXI.DisplayObject}
+	         * @protected
+	         */
+	        this._lastObjectRendered = this._tempDisplayObjectParent;
+
+	        /**
+	         * Collection of plugins.
+	         * @readonly
+	         * @member {object}
+	         */
+	        this.plugins = {};
+	    }
+
+	    if ( EventEmitter ) { AbstractRenderer.__proto__ = EventEmitter; }
+	    AbstractRenderer.prototype = Object.create( EventEmitter && EventEmitter.prototype );
+	    AbstractRenderer.prototype.constructor = AbstractRenderer;
+
+	    var prototypeAccessors = { width: { configurable: true },height: { configurable: true },backgroundColor: { configurable: true } };
+
+	    /**
+	     * Initialize the plugins.
+	     *
+	     * @protected
+	     * @param {object} staticMap - The dictionary of statically saved plugins.
+	     */
+	    AbstractRenderer.prototype.initPlugins = function initPlugins (staticMap)
+	    {
+	        for (var o in staticMap)
+	        {
+	            this.plugins[o] = new (staticMap[o])(this);
+	        }
+	    };
+
+	    /**
+	     * Same as view.width, actual number of pixels in the canvas by horizontal.
+	     *
+	     * @member {number}
+	     * @readonly
+	     * @default 800
+	     */
+	    prototypeAccessors.width.get = function ()
+	    {
+	        return this.view.width;
+	    };
+
+	    /**
+	     * Same as view.height, actual number of pixels in the canvas by vertical.
+	     *
+	     * @member {number}
+	     * @readonly
+	     * @default 600
+	     */
+	    prototypeAccessors.height.get = function ()
+	    {
+	        return this.view.height;
+	    };
+
+	    /**
+	     * Resizes the screen and canvas to the specified width and height.
+	     * Canvas dimensions are multiplied by resolution.
+	     *
+	     * @param {number} screenWidth - The new width of the screen.
+	     * @param {number} screenHeight - The new height of the screen.
+	     */
+	    AbstractRenderer.prototype.resize = function resize (screenWidth, screenHeight)
+	    {
+	        this.screen.width = screenWidth;
+	        this.screen.height = screenHeight;
+
+	        this.view.width = screenWidth * this.resolution;
+	        this.view.height = screenHeight * this.resolution;
+
+	        if (this.autoDensity)
+	        {
+	            this.view.style.width = screenWidth + "px";
+	            this.view.style.height = screenHeight + "px";
+	        }
+	    };
+
+	    /**
+	     * Useful function that returns a texture of the display object that can then be used to create sprites
+	     * This can be quite useful if your displayObject is complicated and needs to be reused multiple times.
+	     *
+	     * @param {PIXI.DisplayObject} displayObject - The displayObject the object will be generated from.
+	     * @param {number} scaleMode - Should be one of the scaleMode consts.
+	     * @param {number} resolution - The resolution / device pixel ratio of the texture being generated.
+	     * @param {PIXI.Rectangle} [region] - The region of the displayObject, that shall be rendered,
+	     *        if no region is specified, defaults to the local bounds of the displayObject.
+	     * @return {PIXI.RenderTexture} A texture of the graphics object.
+	     */
+	    AbstractRenderer.prototype.generateTexture = function generateTexture (displayObject, scaleMode, resolution, region)
+	    {
+	        region = region || displayObject.getLocalBounds();
+
+	        // minimum texture size is 1x1, 0x0 will throw an error
+	        if (region.width === 0) { region.width = 1; }
+	        if (region.height === 0) { region.height = 1; }
+
+	        var renderTexture = RenderTexture.create(region.width | 0, region.height | 0, scaleMode, resolution);
+
+	        tempMatrix.tx = -region.x;
+	        tempMatrix.ty = -region.y;
+
+	        this.render(displayObject, renderTexture, false, tempMatrix, !!displayObject.parent);
+
+	        return renderTexture;
+	    };
+
+	    /**
+	     * Removes everything from the renderer and optionally removes the Canvas DOM element.
+	     *
+	     * @param {boolean} [removeView=false] - Removes the Canvas element from the DOM.
+	     */
+	    AbstractRenderer.prototype.destroy = function destroy (removeView)
+	    {
+	        for (var o in this.plugins)
+	        {
+	            this.plugins[o].destroy();
+	            this.plugins[o] = null;
+	        }
+
+	        if (removeView && this.view.parentNode)
+	        {
+	            this.view.parentNode.removeChild(this.view);
+	        }
+
+	        this.plugins = null;
+
+	        this.type = RENDERER_TYPE.UNKNOWN;
+
+	        this.view = null;
+
+	        this.screen = null;
+
+	        this.resolution = 0;
+
+	        this.transparent = false;
+
+	        this.autoDensity = false;
+
+	        this.blendModes = null;
+
+	        this.options = null;
+
+	        this.preserveDrawingBuffer = false;
+	        this.clearBeforeRender = false;
+
+	        this._backgroundColor = 0;
+	        this._backgroundColorRgba = null;
+	        this._backgroundColorString = null;
+
+	        this._tempDisplayObjectParent = null;
+	        this._lastObjectRendered = null;
+	    };
+
+	    /**
+	     * The background color to fill if not transparent
+	     *
+	     * @member {number}
+	     */
+	    prototypeAccessors.backgroundColor.get = function ()
+	    {
+	        return this._backgroundColor;
+	    };
+
+	    prototypeAccessors.backgroundColor.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        this._backgroundColor = value;
+	        this._backgroundColorString = hex2string(value);
+	        hex2rgb(value, this._backgroundColorRgba);
+	    };
+
+	    Object.defineProperties( AbstractRenderer.prototype, prototypeAccessors );
+
+	    return AbstractRenderer;
+	}(eventemitter3));
+
+	/**
+	 * The Renderer draws the scene and all its content onto a WebGL enabled canvas.
+	 *
+	 * This renderer should be used for browsers that support WebGL.
+	 *
+	 * This renderer works by automatically managing WebGLBatchesm, so no need for Sprite Batches or Sprite Clouds.
+	 * Don't forget to add the view to your DOM or you will not see anything!
+	 *
+	 * @class
+	 * @memberof PIXI
+	 * @extends PIXI.AbstractRenderer
+	 */
+	var Renderer = /*@__PURE__*/(function (AbstractRenderer) {
+	    function Renderer(options)
+	    {
+	        if ( options === void 0 ) { options = {}; }
+
+	        AbstractRenderer.call(this, 'WebGL', options);
+
+	        // the options will have been modified here in the super constructor with pixi's default settings..
+	        options = this.options;
+
+	        /**
+	         * The type of this renderer as a standardized const
+	         *
+	         * @member {number}
+	         * @see PIXI.RENDERER_TYPE
+	         */
+	        this.type = RENDERER_TYPE.WEBGL;
+
+	        /**
+	         * WebGL context, set by the contextSystem (this.context)
+	         *
+	         * @readonly
+	         * @member {WebGLRenderingContext}
+	         */
+	        this.gl = null;
+
+	        this.CONTEXT_UID = 0;
+
+	        // TODO legacy!
+
+	        /**
+	         * Internal signal instances of **runner**, these
+	         * are assigned to each system created.
+	         * @see PIXI.Runner
+	         * @name PIXI.Renderer#runners
+	         * @private
+	         * @type {object}
+	         * @readonly
+	         * @property {PIXI.Runner} destroy - Destroy runner
+	         * @property {PIXI.Runner} contextChange - Context change runner
+	         * @property {PIXI.Runner} reset - Reset runner
+	         * @property {PIXI.Runner} update - Update runner
+	         * @property {PIXI.Runner} postrender - Post-render runner
+	         * @property {PIXI.Runner} prerender - Pre-render runner
+	         * @property {PIXI.Runner} resize - Resize runner
+	         */
+	        this.runners = {
+	            destroy: new Runner('destroy'),
+	            contextChange: new Runner('contextChange', 1),
+	            reset: new Runner('reset'),
+	            update: new Runner('update'),
+	            postrender: new Runner('postrender'),
+	            prerender: new Runner('prerender'),
+	            resize: new Runner('resize', 2),
+	        };
+
+	        /**
+	         * Global uniforms
+	         * @member {PIXI.UniformGroup}
+	         */
+	        this.globalUniforms = new UniformGroup({
+	            projectionMatrix: new Matrix(),
+	        }, true);
+
+	        /**
+	         * Mask system instance
+	         * @member {PIXI.systems.MaskSystem} mask
+	         * @memberof PIXI.Renderer#
+	         * @readonly
+	         */
+	        this.addSystem(MaskSystem, 'mask')
+	            /**
+	             * Context system instance
+	             * @member {PIXI.systems.ContextSystem} context
+	             * @memberof PIXI.Renderer#
+	             * @readonly
+	             */
+	            .addSystem(ContextSystem, 'context')
+	            /**
+	             * State system instance
+	             * @member {PIXI.systems.StateSystem} state
+	             * @memberof PIXI.Renderer#
+	             * @readonly
+	             */
+	            .addSystem(StateSystem, 'state')
+	            /**
+	             * Shader system instance
+	             * @member {PIXI.systems.ShaderSystem} shader
+	             * @memberof PIXI.Renderer#
+	             * @readonly
+	             */
+	            .addSystem(ShaderSystem, 'shader')
+	            /**
+	             * Texture system instance
+	             * @member {PIXI.systems.TextureSystem} texture
+	             * @memberof PIXI.Renderer#
+	             * @readonly
+	             */
+	            .addSystem(TextureSystem, 'texture')
+	            /**
+	             * Geometry system instance
+	             * @member {PIXI.systems.GeometrySystem} geometry
+	             * @memberof PIXI.Renderer#
+	             * @readonly
+	             */
+	            .addSystem(GeometrySystem, 'geometry')
+	            /**
+	             * Framebuffer system instance
+	             * @member {PIXI.systems.FramebufferSystem} framebuffer
+	             * @memberof PIXI.Renderer#
+	             * @readonly
+	             */
+	            .addSystem(FramebufferSystem, 'framebuffer')
+	            /**
+	             * Stencil system instance
+	             * @member {PIXI.systems.StencilSystem} stencil
+	             * @memberof PIXI.Renderer#
+	             * @readonly
+	             */
+	            .addSystem(StencilSystem, 'stencil')
+	            /**
+	             * Projection system instance
+	             * @member {PIXI.systems.ProjectionSystem} projection
+	             * @memberof PIXI.Renderer#
+	             * @readonly
+	             */
+	            .addSystem(ProjectionSystem, 'projection')
+	            /**
+	             * Texture garbage collector system instance
+	             * @member {PIXI.systems.TextureGCSystem} textureGC
+	             * @memberof PIXI.Renderer#
+	             * @readonly
+	             */
+	            .addSystem(TextureGCSystem, 'textureGC')
+	            /**
+	             * Filter system instance
+	             * @member {PIXI.systems.FilterSystem} filter
+	             * @memberof PIXI.Renderer#
+	             * @readonly
+	             */
+	            .addSystem(FilterSystem, 'filter')
+	            /**
+	             * RenderTexture system instance
+	             * @member {PIXI.systems.RenderTextureSystem} renderTexture
+	             * @memberof PIXI.Renderer#
+	             * @readonly
+	             */
+	            .addSystem(RenderTextureSystem, 'renderTexture')
+
+	            /**
+	             * Batch system instance
+	             * @member {PIXI.systems.BatchSystem} batch
+	             * @memberof PIXI.Renderer#
+	             * @readonly
+	             */
+	            .addSystem(BatchSystem, 'batch');
+
+	        this.initPlugins(Renderer.__plugins);
+
+	        /**
+	         * The options passed in to create a new WebGL context.
+	         */
+	        if (options.context)
+	        {
+	            this.context.initFromContext(options.context);
+	        }
+	        else
+	        {
+	            this.context.initFromOptions({
+	                alpha: this.transparent,
+	                antialias: options.antialias,
+	                premultipliedAlpha: this.transparent && this.transparent !== 'notMultiplied',
+	                stencil: true,
+	                preserveDrawingBuffer: options.preserveDrawingBuffer,
+	                powerPreference: this.options.powerPreference,
+	            });
+	        }
+
+	        /**
+	         * Flag if we are rendering to the screen vs renderTexture
+	         * @member {boolean}
+	         * @readonly
+	         * @default true
+	         */
+	        this.renderingToScreen = true;
+
+	        sayHello(this.context.webGLVersion === 2 ? 'WebGL 2' : 'WebGL 1');
+
+	        this.resize(this.options.width, this.options.height);
+	    }
+
+	    if ( AbstractRenderer ) { Renderer.__proto__ = AbstractRenderer; }
+	    Renderer.prototype = Object.create( AbstractRenderer && AbstractRenderer.prototype );
+	    Renderer.prototype.constructor = Renderer;
+
+	    /**
+	     * Add a new system to the renderer.
+	     * @param {Function} ClassRef - Class reference
+	     * @param {string} [name] - Property name for system, if not specified
+	     *        will use a static `name` property on the class itself. This
+	     *        name will be assigned as s property on the Renderer so make
+	     *        sure it doesn't collide with properties on Renderer.
+	     * @return {PIXI.Renderer} Return instance of renderer
+	     */
+	    Renderer.create = function create (options)
+	    {
+	        if (isWebGLSupported())
+	        {
+	            return new Renderer(options);
+	        }
+
+	        throw new Error('WebGL unsupported in this browser, use "pixi.js-legacy" for fallback canvas2d support.');
+	    };
+
+	    Renderer.prototype.addSystem = function addSystem (ClassRef, name)
+	    {
+	        if (!name)
+	        {
+	            name = ClassRef.name;
+	        }
+
+	        var system = new ClassRef(this);
+
+	        if (this[name])
+	        {
+	            throw new Error(("Whoops! The name \"" + name + "\" is already in use"));
+	        }
+
+	        this[name] = system;
+
+	        for (var i in this.runners)
+	        {
+	            this.runners[i].add(system);
+	        }
+
+	        /**
+	         * Fired after rendering finishes.
+	         *
+	         * @event PIXI.Renderer#postrender
+	         */
+
+	        /**
+	         * Fired before rendering starts.
+	         *
+	         * @event PIXI.Renderer#prerender
+	         */
+
+	        /**
+	         * Fired when the WebGL context is set.
+	         *
+	         * @event PIXI.Renderer#context
+	         * @param {WebGLRenderingContext} gl - WebGL context.
+	         */
+
+	        return this;
+	    };
+
+	    /**
+	     * Renders the object to its WebGL view
+	     *
+	     * @param {PIXI.DisplayObject} displayObject - The object to be rendered.
+	     * @param {PIXI.RenderTexture} [renderTexture] - The render texture to render to.
+	     * @param {boolean} [clear=true] - Should the canvas be cleared before the new render.
+	     * @param {PIXI.Matrix} [transform] - A transform to apply to the render texture before rendering.
+	     * @param {boolean} [skipUpdateTransform=false] - Should we skip the update transform pass?
+	     */
+	    Renderer.prototype.render = function render (displayObject, renderTexture, clear, transform, skipUpdateTransform)
+	    {
+	        // can be handy to know!
+	        this.renderingToScreen = !renderTexture;
+
+	        this.runners.prerender.run();
+	        this.emit('prerender');
+
+	        // apply a transform at a GPU level
+	        this.projection.transform = transform;
+
+	        // no point rendering if our context has been blown up!
+	        if (this.context.isLost)
+	        {
+	            return;
+	        }
+
+	        if (!renderTexture)
+	        {
+	            this._lastObjectRendered = displayObject;
+	        }
+
+	        if (!skipUpdateTransform)
+	        {
+	            // update the scene graph
+	            var cacheParent = displayObject.parent;
+
+	            displayObject.parent = this._tempDisplayObjectParent;
+	            displayObject.updateTransform();
+	            displayObject.parent = cacheParent;
+	            // displayObject.hitArea = //TODO add a temp hit area
+	        }
+
+	        this.renderTexture.bind(renderTexture);
+	        this.batch.currentRenderer.start();
+
+	        if (clear !== undefined ? clear : this.clearBeforeRender)
+	        {
+	            this.renderTexture.clear();
+	        }
+
+	        displayObject.render(this);
+
+	        // apply transform..
+	        this.batch.currentRenderer.flush();
+
+	        if (renderTexture)
+	        {
+	            renderTexture.baseTexture.update();
+	        }
+
+	        this.runners.postrender.run();
+
+	        // reset transform after render
+	        this.projection.transform = null;
+
+	        this.emit('postrender');
+	    };
+
+	    /**
+	     * Resizes the WebGL view to the specified width and height.
+	     *
+	     * @param {number} screenWidth - The new width of the screen.
+	     * @param {number} screenHeight - The new height of the screen.
+	     */
+	    Renderer.prototype.resize = function resize (screenWidth, screenHeight)
+	    {
+	        AbstractRenderer.prototype.resize.call(this, screenWidth, screenHeight);
+
+	        this.runners.resize.run(screenWidth, screenHeight);
+	    };
+
+	    /**
+	     * Resets the WebGL state so you can render things however you fancy!
+	     *
+	     * @return {PIXI.Renderer} Returns itself.
+	     */
+	    Renderer.prototype.reset = function reset ()
+	    {
+	        this.runners.reset.run();
+
+	        return this;
+	    };
+
+	    /**
+	     * Clear the frame buffer
+	     */
+	    Renderer.prototype.clear = function clear ()
+	    {
+	        this.framebuffer.bind();
+	        this.framebuffer.clear();
+	    };
+
+	    /**
+	     * Removes everything from the renderer (event listeners, spritebatch, etc...)
+	     *
+	     * @param {boolean} [removeView=false] - Removes the Canvas element from the DOM.
+	     *  See: https://github.com/pixijs/pixi.js/issues/2233
+	     */
+	    Renderer.prototype.destroy = function destroy (removeView)
+	    {
+	        this.runners.destroy.run();
+
+	        for (var r in this.runners)
+	        {
+	            this.runners[r].destroy();
+	        }
+
+	        // call base destroy
+	        AbstractRenderer.prototype.destroy.call(this, removeView);
+
+	        // TODO nullify all the managers..
+	        this.gl = null;
+	    };
+
+	    /**
+	     * Collection of installed plugins. These are included by default in PIXI, but can be excluded
+	     * by creating a custom build. Consult the README for more information about creating custom
+	     * builds and excluding plugins.
+	     * @name PIXI.Renderer#plugins
+	     * @type {object}
+	     * @readonly
+	     * @property {PIXI.accessibility.AccessibilityManager} accessibility Support tabbing interactive elements.
+	     * @property {PIXI.extract.Extract} extract Extract image data from renderer.
+	     * @property {PIXI.interaction.InteractionManager} interaction Handles mouse, touch and pointer events.
+	     * @property {PIXI.prepare.Prepare} prepare Pre-render display objects.
+	     */
+
+	    /**
+	     * Adds a plugin to the renderer.
+	     *
+	     * @method
+	     * @param {string} pluginName - The name of the plugin.
+	     * @param {Function} ctor - The constructor function or class for the plugin.
+	     */
+	    Renderer.registerPlugin = function registerPlugin (pluginName, ctor)
+	    {
+	        Renderer.__plugins = Renderer.__plugins || {};
+	        Renderer.__plugins[pluginName] = ctor;
+	    };
+
+	    return Renderer;
+	}(AbstractRenderer));
+
+	/**
+	 * This helper function will automatically detect which renderer you should be using.
+	 * WebGL is the preferred renderer as it is a lot faster. If WebGL is not supported by
+	 * the browser then this function will return a canvas renderer
+	 *
+	 * @memberof PIXI
+	 * @function autoDetectRenderer
+	 * @param {object} [options] - The optional renderer parameters
+	 * @param {number} [options.width=800] - the width of the renderers view
+	 * @param {number} [options.height=600] - the height of the renderers view
+	 * @param {HTMLCanvasElement} [options.view] - the canvas to use as a view, optional
+	 * @param {boolean} [options.transparent=false] - If the render view is transparent, default false
+	 * @param {boolean} [options.autoDensity=false] - Resizes renderer view in CSS pixels to allow for
+	 *   resolutions other than 1
+	 * @param {boolean} [options.antialias=false] - sets antialias
+	 * @param {boolean} [options.preserveDrawingBuffer=false] - enables drawing buffer preservation, enable this if you
+	 *  need to call toDataUrl on the webgl context
+	 * @param {number} [options.backgroundColor=0x000000] - The background color of the rendered area
+	 *  (shown if not transparent).
+	 * @param {boolean} [options.clearBeforeRender=true] - This sets if the renderer will clear the canvas or
+	 *   not before the new render pass.
+	 * @param {number} [options.resolution=1] - The resolution / device pixel ratio of the renderer, retina would be 2
+	 * @param {boolean} [options.forceCanvas=false] - prevents selection of WebGL renderer, even if such is present, this
+	 *   option only is available when using **pixi.js-legacy** or **@pixi/canvas-renderer** modules, otherwise
+	 *   it is ignored.
+	 * @param {boolean} [options.forceFXAA=false] - forces FXAA antialiasing to be used over native.
+	 *  FXAA is faster, but may not always look as great **webgl only**
+	 * @param {string} [options.powerPreference] - Parameter passed to webgl context, set to "high-performance"
+	 *  for devices with dual graphics card **webgl only**
+	 * @return {PIXI.Renderer|PIXI.CanvasRenderer} Returns WebGL renderer if available, otherwise CanvasRenderer
+	 */
+	function autoDetectRenderer(options)
+	{
+	    return Renderer.create(options);
+	}
+
+	var _default = "attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n    gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n    vTextureCoord = aTextureCoord;\n}";
+
+	var defaultFilter = "attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n    vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n    return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n    return aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\n\nvoid main(void)\n{\n    gl_Position = filterVertexPosition();\n    vTextureCoord = filterTextureCoord();\n}\n";
+
+	/**
+	 * A Texture that depends on six other resources.
+	 *
+	 * @class
+	 * @extends PIXI.BaseTexture
+	 * @memberof PIXI
+	 */
+	var CubeTexture = /*@__PURE__*/(function (BaseTexture) {
+	    function CubeTexture () {
+	        BaseTexture.apply(this, arguments);
+	    }
+
+	    if ( BaseTexture ) { CubeTexture.__proto__ = BaseTexture; }
+	    CubeTexture.prototype = Object.create( BaseTexture && BaseTexture.prototype );
+	    CubeTexture.prototype.constructor = CubeTexture;
+
+	    CubeTexture.from = function from (resources, options)
+	    {
+	        return new CubeTexture(new CubeResource(resources, options));
+	    };
+
+	    return CubeTexture;
+	}(BaseTexture));
+
+	/**
+	 * Used by the batcher to draw batches.
+	 * Each one of these contains all information required to draw a bound geometry.
+	 *
+	 * @class
+	 * @memberof PIXI
+	 */
+	var BatchDrawCall = function BatchDrawCall()
+	{
+	    this.textures = [];
+	    this.ids = [];
+	    this.blend = 0;
+	    this.textureCount = 0;
+	    this.start = 0;
+	    this.size = 0;
+	    this.type = 4;
+	};
+
+	/**
+	 * Flexible wrapper around `ArrayBuffer` that also provides
+	 * typed array views on demand.
+	 *
+	 * @class
+	 * @memberof PIXI
+	 */
+	var ViewableBuffer = function ViewableBuffer(size)
+	{
+	    /**
+	     * Underlying `ArrayBuffer` that holds all the data
+	     * and is of capacity `size`.
+	     *
+	     * @member {ArrayBuffer}
+	     */
+	    this.rawBinaryData = new ArrayBuffer(size);
+
+	    /**
+	     * View on the raw binary data as a `Uint32Array`.
+	     *
+	     * @member {Uint32Array}
+	     */
+	    this.uint32View = new Uint32Array(this.rawBinaryData);
+
+	    /**
+	     * View on the raw binary data as a `Float32Array`.
+	     *
+	     * @member {Float32Array}
+	     */
+	    this.float32View = new Float32Array(this.rawBinaryData);
+	};
+
+	var prototypeAccessors$5$1 = { int8View: { configurable: true },uint8View: { configurable: true },int16View: { configurable: true },uint16View: { configurable: true },int32View: { configurable: true } };
+
+	/**
+	 * View on the raw binary data as a `Int8Array`.
+	 *
+	 * @member {Int8Array}
+	 */
+	prototypeAccessors$5$1.int8View.get = function ()
+	{
+	    if (!this._int8View)
+	    {
+	        this._int8View = new Int8Array(this.rawBinaryData);
+	    }
+
+	    return this._int8View;
+	};
+
+	/**
+	 * View on the raw binary data as a `Uint8Array`.
+	 *
+	 * @member {Uint8Array}
+	 */
+	prototypeAccessors$5$1.uint8View.get = function ()
+	{
+	    if (!this._uint8View)
+	    {
+	        this._uint8View = new Uint8Array(this.rawBinaryData);
+	    }
+
+	    return this._uint8View;
+	};
+
+	/**
+	 * View on the raw binary data as a `Int16Array`.
+	 *
+	 * @member {Int16Array}
+	 */
+	prototypeAccessors$5$1.int16View.get = function ()
+	{
+	    if (!this._int16View)
+	    {
+	        this._int16View = new Int16Array(this.rawBinaryData);
+	    }
+
+	    return this._int16View;
+	};
+
+	/**
+	 * View on the raw binary data as a `Uint16Array`.
+	 *
+	 * @member {Uint16Array}
+	 */
+	prototypeAccessors$5$1.uint16View.get = function ()
+	{
+	    if (!this._uint16View)
+	    {
+	        this._uint16View = new Uint16Array(this.rawBinaryData);
+	    }
+
+	    return this._uint16View;
+	};
+
+	/**
+	 * View on the raw binary data as a `Int32Array`.
+	 *
+	 * @member {Int32Array}
+	 */
+	prototypeAccessors$5$1.int32View.get = function ()
+	{
+	    if (!this._int32View)
+	    {
+	        this._int32View = new Int32Array(this.rawBinaryData);
+	    }
+
+	    return this._int32View;
+	};
+
+	/**
+	 * Returns the view of the given type.
+	 *
+	 * @param {string} type - One of `int8`, `uint8`, `int16`,
+	 *`uint16`, `int32`, `uint32`, and `float32`.
+	 * @return {object} typed array of given type
+	 */
+	ViewableBuffer.prototype.view = function view (type)
+	{
+	    return this[(type + "View")];
+	};
+
+	/**
+	 * Destroys all buffer references. Do not use after calling
+	 * this.
+	 */
+	ViewableBuffer.prototype.destroy = function destroy ()
+	{
+	    this.rawBinaryData = null;
+	    this._int8View = null;
+	    this._uint8View = null;
+	    this._int16View = null;
+	    this._uint16View = null;
+	    this._int32View = null;
+	    this.uint32View = null;
+	    this.float32View = null;
+	};
+
+	ViewableBuffer.sizeOf = function sizeOf (type)
+	{
+	    switch (type)
+	    {
+	        case 'int8':
+	        case 'uint8':
+	            return 1;
+	        case 'int16':
+	        case 'uint16':
+	            return 2;
+	        case 'int32':
+	        case 'uint32':
+	        case 'float32':
+	            return 4;
+	        default:
+	            throw new Error((type + " isn't a valid view type"));
+	    }
+	};
+
+	Object.defineProperties( ViewableBuffer.prototype, prototypeAccessors$5$1 );
+
+	/**
+	 * Renderer dedicated to drawing and batching sprites.
+	 *
+	 * This is the default batch renderer. It buffers objects
+	 * with texture-based geometries and renders them in
+	 * batches. It uploads multiple textures to the GPU to
+	 * reduce to the number of draw calls.
+	 *
+	 * @class
+	 * @protected
+	 * @memberof PIXI
+	 * @extends PIXI.ObjectRenderer
+	 */
+	var AbstractBatchRenderer = /*@__PURE__*/(function (ObjectRenderer) {
+	    function AbstractBatchRenderer(renderer)
+	    {
+	        ObjectRenderer.call(this, renderer);
+
+	        /**
+	         * This is used to generate a shader that can
+	         * color each vertex based on a `aTextureId`
+	         * attribute that points to an texture in `uSampler`.
+	         *
+	         * This enables the objects with different textures
+	         * to be drawn in the same draw call.
+	         *
+	         * You can customize your shader by creating your
+	         * custom shader generator.
+	         *
+	         * @member {PIXI.BatchShaderGenerator}
+	         * @protected
+	         */
+	        this.shaderGenerator = null;
+
+	        /**
+	         * The class that represents the geometry of objects
+	         * that are going to be batched with this.
+	         *
+	         * @member {object}
+	         * @default PIXI.BatchGeometry
+	         * @protected
+	         */
+	        this.geometryClass = null;
+
+	        /**
+	         * Size of data being buffered per vertex in the
+	         * attribute buffers (in floats). By default, the
+	         * batch-renderer plugin uses 6:
+	         *
+	         * | aVertexPosition | 2 |
+	         * |-----------------|---|
+	         * | aTextureCoords  | 2 |
+	         * | aColor          | 1 |
+	         * | aTextureId      | 1 |
+	         *
+	         * @member {number}
+	         * @readonly
+	         */
+	        this.vertexSize = null;
+
+	        /**
+	         * The WebGL state in which this renderer will work.
+	         *
+	         * @member {PIXI.State}
+	         * @readonly
+	         */
+	        this.state = State.for2d();
+
+	        /**
+	         * The number of bufferable objects before a flush
+	         * occurs automatically.
+	         *
+	         * @member {number}
+	         * @default settings.SPRITE_MAX_TEXTURES
+	         */
+	        this.size = 2000 * 4;// settings.SPRITE_BATCH_SIZE, 2000 is a nice balance between mobile/desktop
+
+	        /**
+	         * Total count of all vertices used by the currently
+	         * buffered objects.
+	         *
+	         * @member {number}
+	         * @private
+	         */
+	        this._vertexCount = 0;
+
+	        /**
+	         * Total count of all indices used by the currently
+	         * buffered objects.
+	         *
+	         * @member {number}
+	         * @private
+	         */
+	        this._indexCount = 0;
+
+	        /**
+	         * Buffer of objects that are yet to be rendered.
+	         *
+	         * @member {PIXI.DisplayObject[]}
+	         * @private
+	         */
+	        this._bufferedElements = [];
+
+	        /**
+	         * Number of elements that are buffered and are
+	         * waiting to be flushed.
+	         *
+	         * @member {number}
+	         * @private
+	         */
+	        this._bufferSize = 0;
+
+	        /**
+	         * This shader is generated by `this.shaderGenerator`.
+	         *
+	         * It is generated specifically to handle the required
+	         * number of textures being batched together.
+	         *
+	         * @member {PIXI.Shader}
+	         * @protected
+	         */
+	        this._shader = null;
+
+	        /**
+	         * Pool of `this.geometryClass` geometry objects
+	         * that store buffers. They are used to pass data
+	         * to the shader on each draw call.
+	         *
+	         * These are never re-allocated again, unless a
+	         * context change occurs; however, the pool may
+	         * be expanded if required.
+	         *
+	         * @member {PIXI.Geometry[]}
+	         * @private
+	         * @see PIXI.AbstractBatchRenderer.contextChange
+	         */
+	        this._packedGeometries = [];
+
+	        /**
+	         * Size of `this._packedGeometries`. It can be expanded
+	         * if more than `this._packedGeometryPoolSize` flushes
+	         * occur in a single frame.
+	         *
+	         * @member {number}
+	         * @private
+	         */
+	        this._packedGeometryPoolSize = 2;
+
+	        /**
+	         * A flush may occur multiple times in a single
+	         * frame. On iOS devices or when
+	         * `settings.CAN_UPLOAD_SAME_BUFFER` is false, the
+	         * batch renderer does not upload data to the same
+	         * `WebGLBuffer` for performance reasons.
+	         *
+	         * This is the index into `packedGeometries` that points to
+	         * geometry holding the most recent buffers.
+	         *
+	         * @member {number}
+	         * @private
+	         */
+	        this._flushId = 0;
+
+	        /**
+	         * Pool of `BatchDrawCall` objects that `flush` used
+	         * to create "batches" of the objects being rendered.
+	         *
+	         * These are never re-allocated again.
+	         *
+	         * @member BatchDrawCall[]
+	         * @private
+	         */
+	        this._drawCalls = [];
+
+	        for (var k = 0; k < this.size / 4; k++)
+	        { // initialize the draw-calls pool to max size.
+	            this._drawCalls[k] = new BatchDrawCall();
+	        }
+
+	        /**
+	         * Pool of `ViewableBuffer` objects that are sorted in
+	         * order of increasing size. The flush method uses
+	         * the buffer with the least size above the amount
+	         * it requires. These are used for passing attributes.
+	         *
+	         * The first buffer has a size of 8; each subsequent
+	         * buffer has double capacity of its previous.
+	         *
+	         * @member {PIXI.ViewableBuffer}
+	         * @private
+	         * @see PIXI.AbstractBatchRenderer#getAttributeBuffer
+	         */
+	        this._aBuffers = {};
+
+	        /**
+	         * Pool of `Uint16Array` objects that are sorted in
+	         * order of increasing size. The flush method uses
+	         * the buffer with the least size above the amount
+	         * it requires. These are used for passing indices.
+	         *
+	         * The first buffer has a size of 12; each subsequent
+	         * buffer has double capacity of its previous.
+	         *
+	         * @member {Uint16Array[]}
+	         * @private
+	         * @see PIXI.AbstractBatchRenderer#getIndexBuffer
+	         */
+	        this._iBuffers = {};
+
+	        /**
+	         * Maximum number of textures that can be uploaded to
+	         * the GPU under the current context. It is initialized
+	         * properly in `this.contextChange`.
+	         *
+	         * @member {number}
+	         * @see PIXI.AbstractBatchRenderer#contextChange
+	         * @readonly
+	         */
+	        this.MAX_TEXTURES = 1;
+
+	        this.renderer.on('prerender', this.onPrerender, this);
+	        renderer.runners.contextChange.add(this);
+	    }
+
+	    if ( ObjectRenderer ) { AbstractBatchRenderer.__proto__ = ObjectRenderer; }
+	    AbstractBatchRenderer.prototype = Object.create( ObjectRenderer && ObjectRenderer.prototype );
+	    AbstractBatchRenderer.prototype.constructor = AbstractBatchRenderer;
+
+	    /**
+	     * Handles the `contextChange` signal.
+	     *
+	     * It calculates `this.MAX_TEXTURES` and allocating the
+	     * packed-geometry object pool.
+	     */
+	    AbstractBatchRenderer.prototype.contextChange = function contextChange ()
+	    {
+	        var gl = this.renderer.gl;
+
+	        if (settings.PREFER_ENV === ENV.WEBGL_LEGACY)
+	        {
+	            this.MAX_TEXTURES = 1;
+	        }
+	        else
+	        {
+	            // step 1: first check max textures the GPU can handle.
+	            this.MAX_TEXTURES = Math.min(
+	                gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS),
+	                settings.SPRITE_MAX_TEXTURES);
+
+	            // step 2: check the maximum number of if statements the shader can have too..
+	            this.MAX_TEXTURES = checkMaxIfStatementsInShader(
+	                this.MAX_TEXTURES, gl);
+	        }
+
+	        this._shader = this.shaderGenerator.generateShader(this.MAX_TEXTURES);
+
+	        // we use the second shader as the first one depending on your browser
+	        // may omit aTextureId as it is not used by the shader so is optimized out.
+	        for (var i = 0; i < this._packedGeometryPoolSize; i++)
+	        {
+	            /* eslint-disable max-len */
+	            this._packedGeometries[i] = new (this.geometryClass)();
+	        }
+	    };
+
+	    /**
+	     * Handles the `prerender` signal.
+	     *
+	     * It ensures that flushes start from the first geometry
+	     * object again.
+	     */
+	    AbstractBatchRenderer.prototype.onPrerender = function onPrerender ()
+	    {
+	        this._flushId = 0;
+	    };
+
+	    /**
+	     * Buffers the "batchable" object. It need not be rendered
+	     * immediately.
+	     *
+	     * @param {PIXI.Sprite} sprite - the sprite to render when
+	     *    using this spritebatch
+	     */
+	    AbstractBatchRenderer.prototype.render = function render (element)
+	    {
+	        if (!element._texture.valid)
+	        {
+	            return;
+	        }
+
+	        if (this._vertexCount + (element.vertexData.length / 2) > this.size)
+	        {
+	            this.flush();
+	        }
+
+	        this._vertexCount += element.vertexData.length / 2;
+	        this._indexCount += element.indices.length;
+	        this._bufferedElements[this._bufferSize++] = element;
+	    };
+
+	    /**
+	     * Renders the content _now_ and empties the current batch.
+	     */
+	    AbstractBatchRenderer.prototype.flush = function flush ()
+	    {
+	        if (this._vertexCount === 0)
+	        {
+	            return;
+	        }
+
+	        var attributeBuffer = this.getAttributeBuffer(this._vertexCount);
+	        var indexBuffer = this.getIndexBuffer(this._indexCount);
+	        var gl = this.renderer.gl;
+
+	        var ref = this;
+	        var elements = ref._bufferedElements;
+	        var drawCalls = ref._drawCalls;
+	        var MAX_TEXTURES = ref.MAX_TEXTURES;
+	        var packedGeometries = ref._packedGeometries;
+	        var vertexSize = ref.vertexSize;
+
+	        var touch = this.renderer.textureGC.count;
+
+	        var index = 0;
+	        var _indexCount = 0;
+
+	        var nextTexture;
+	        var currentTexture;
+	        var textureCount = 0;
+
+	        var currentGroup = drawCalls[0];
+	        var groupCount = 0;
+
+	        var blendMode = -1;// blend-mode of previous element/sprite/object!
+
+	        currentGroup.textureCount = 0;
+	        currentGroup.start = 0;
+	        currentGroup.blend = blendMode;
+
+	        var TICK = ++BaseTexture._globalBatch;
+	        var i;
+
+	        for (i = 0; i < this._bufferSize; ++i)
+	        {
+	            var sprite = elements[i];
+
+	            elements[i] = null;
+	            nextTexture = sprite._texture.baseTexture;
+
+	            var spriteBlendMode = premultiplyBlendMode[
+	                nextTexture.premultiplyAlpha ? 1 : 0][sprite.blendMode];
+
+	            if (blendMode !== spriteBlendMode)
+	            {
+	                blendMode = spriteBlendMode;
+
+	                // force the batch to break!
+	                currentTexture = null;
+	                textureCount = MAX_TEXTURES;
+	                TICK++;
+	            }
+
+	            if (currentTexture !== nextTexture)
+	            {
+	                currentTexture = nextTexture;
+
+	                if (nextTexture._batchEnabled !== TICK)
+	                {
+	                    if (textureCount === MAX_TEXTURES)
+	                    {
+	                        TICK++;
+
+	                        textureCount = 0;
+
+	                        currentGroup.size = _indexCount - currentGroup.start;
+
+	                        currentGroup = drawCalls[groupCount++];
+	                        currentGroup.textureCount = 0;
+	                        currentGroup.blend = blendMode;
+	                        currentGroup.start = _indexCount;
+	                    }
+
+	                    nextTexture.touched = touch;
+	                    nextTexture._batchEnabled = TICK;
+	                    nextTexture._id = textureCount;
+
+	                    currentGroup.textures[currentGroup.textureCount++] = nextTexture;
+	                    textureCount++;
+	                }
+	            }
+
+	            this.packInterleavedGeometry(sprite, attributeBuffer,
+	                indexBuffer, index, _indexCount);
+
+	            // push a graphics..
+	            index += (sprite.vertexData.length / 2) * vertexSize;
+	            _indexCount += sprite.indices.length;
+	        }
+
+	        BaseTexture._globalBatch = TICK;
+	        currentGroup.size = _indexCount - currentGroup.start;
+
+	        if (!settings.CAN_UPLOAD_SAME_BUFFER)
+	        { /* Usually on iOS devices, where the browser doesn't
+	            like uploads to the same buffer in a single frame. */
+	            if (this._packedGeometryPoolSize <= this._flushId)
+	            {
+	                this._packedGeometryPoolSize++;
+	                packedGeometries[this._flushId] = new (this.geometryClass)();
+	            }
+
+	            packedGeometries[this._flushId]._buffer.update(attributeBuffer.rawBinaryData, 0);
+	            packedGeometries[this._flushId]._indexBuffer.update(indexBuffer, 0);
+
+	            this.renderer.geometry.bind(packedGeometries[this._flushId]);
+	            this.renderer.geometry.updateBuffers();
+	            this._flushId++;
+	        }
+	        else
+	        {
+	            // lets use the faster option, always use buffer number 0
+	            packedGeometries[this._flushId]._buffer.update(attributeBuffer.rawBinaryData, 0);
+	            packedGeometries[this._flushId]._indexBuffer.update(indexBuffer, 0);
+
+	            this.renderer.geometry.updateBuffers();
+	        }
+
+	        var textureSystem = this.renderer.texture;
+	        var stateSystem = this.renderer.state;
+
+	        // Upload textures and do the draw calls
+	        for (i = 0; i < groupCount; i++)
+	        {
+	            var group = drawCalls[i];
+	            var groupTextureCount = group.textureCount;
+
+	            for (var j = 0; j < groupTextureCount; j++)
+	            {
+	                textureSystem.bind(group.textures[j], j);
+	                group.textures[j] = null;
+	            }
+
+	            stateSystem.setBlendMode(group.blend);
+	            gl.drawElements(group.type, group.size, gl.UNSIGNED_SHORT, group.start * 2);
+	        }
+
+	        // reset elements for the next flush
+	        this._bufferSize = 0;
+	        this._vertexCount = 0;
+	        this._indexCount = 0;
+	    };
+
+	    /**
+	     * Starts a new sprite batch.
+	     */
+	    AbstractBatchRenderer.prototype.start = function start ()
+	    {
+	        this.renderer.state.set(this.state);
+
+	        this.renderer.shader.bind(this._shader);
+
+	        if (settings.CAN_UPLOAD_SAME_BUFFER)
+	        {
+	            // bind buffer #0, we don't need others
+	            this.renderer.geometry.bind(this._packedGeometries[this._flushId]);
+	        }
+	    };
+
+	    /**
+	     * Stops and flushes the current batch.
+	     */
+	    AbstractBatchRenderer.prototype.stop = function stop ()
+	    {
+	        this.flush();
+	    };
+
+	    /**
+	     * Destroys this `AbstractBatchRenderer`. It cannot be used again.
+	     */
+	    AbstractBatchRenderer.prototype.destroy = function destroy ()
+	    {
+	        for (var i = 0; i < this._packedGeometryPoolSize; i++)
+	        {
+	            if (this._packedGeometries[i])
+	            {
+	                this._packedGeometries[i].destroy();
+	            }
+	        }
+
+	        this.renderer.off('prerender', this.onPrerender, this);
+
+	        this._aBuffers = null;
+	        this._iBuffers = null;
+	        this._packedGeometries = null;
+	        this._drawCalls = null;
+
+	        if (this._shader)
+	        {
+	            this._shader.destroy();
+	            this._shader = null;
+	        }
+
+	        ObjectRenderer.prototype.destroy.call(this);
+	    };
+
+	    /**
+	     * Fetches an attribute buffer from `this._aBuffers` that
+	     * can hold atleast `size` floats.
+	     *
+	     * @param {number} size - minimum capacity required
+	     * @return {ViewableBuffer} - buffer than can hold atleast `size` floats
+	     * @private
+	     */
+	    AbstractBatchRenderer.prototype.getAttributeBuffer = function getAttributeBuffer (size)
+	    {
+	        // 8 vertices is enough for 2 quads
+	        var roundedP2 = nextPow2(Math.ceil(size / 8));
+	        var roundedSizeIndex = log2(roundedP2);
+	        var roundedSize = roundedP2 * 8;
+
+	        if (this._aBuffers.length <= roundedSizeIndex)
+	        {
+	            this._iBuffers.length = roundedSizeIndex + 1;
+	        }
+
+	        var buffer = this._aBuffers[roundedSize];
+
+	        if (!buffer)
+	        {
+	            this._aBuffers[roundedSize] = buffer = new ViewableBuffer(roundedSize * this.vertexSize * 4);
+	        }
+
+	        return buffer;
+	    };
+
+	    /**
+	     * Fetches an index buffer from `this._iBuffers` that can
+	     * has atleast `size` capacity.
+	     *
+	     * @param {number} size - minimum required capacity
+	     * @return {Uint16Array} - buffer that can fit `size`
+	     *    indices.
+	     * @private
+	     */
+	    AbstractBatchRenderer.prototype.getIndexBuffer = function getIndexBuffer (size)
+	    {
+	        // 12 indices is enough for 2 quads
+	        var roundedP2 = nextPow2(Math.ceil(size / 12));
+	        var roundedSizeIndex = log2(roundedP2);
+	        var roundedSize = roundedP2 * 12;
+
+	        if (this._iBuffers.length <= roundedSizeIndex)
+	        {
+	            this._iBuffers.length = roundedSizeIndex + 1;
+	        }
+
+	        var buffer = this._iBuffers[roundedSizeIndex];
+
+	        if (!buffer)
+	        {
+	            this._iBuffers[roundedSizeIndex] = buffer = new Uint16Array(roundedSize);
+	        }
+
+	        return buffer;
+	    };
+
+	    /**
+	     * Takes the four batching parameters of `element`, interleaves
+	     * and pushes them into the batching attribute/index buffers given.
+	     *
+	     * It uses these properties: `vertexData` `uvs`, `textureId` and
+	     * `indicies`. It also uses the "tint" of the base-texture, if
+	     * present.
+	     *
+	     * @param {PIXI.Sprite} element - element being rendered
+	     * @param {PIXI.ViewableBuffer} attributeBuffer - attribute buffer.
+	     * @param {Uint16Array} indexBuffer - index buffer
+	     * @param {number} aIndex - number of floats already in the attribute buffer
+	     * @param {number} iIndex - number of indices already in `indexBuffer`
+	     */
+	    AbstractBatchRenderer.prototype.packInterleavedGeometry = function packInterleavedGeometry (element, attributeBuffer, indexBuffer, aIndex, iIndex)
+	    {
+	        var uint32View = attributeBuffer.uint32View;
+	        var float32View = attributeBuffer.float32View;
+
+	        var packedVertices = aIndex / this.vertexSize;
+	        var uvs = element.uvs;
+	        var indicies = element.indices;
+	        var vertexData = element.vertexData;
+	        var textureId = element._texture.baseTexture._id;
+
+	        var alpha = Math.min(element.worldAlpha, 1.0);
+	        var argb = (alpha < 1.0
+	          && element._texture.baseTexture.premultiplyAlpha)
+	            ? premultiplyTint(element._tintRGB, alpha)
+	            : element._tintRGB + (alpha * 255 << 24);
+
+	        // lets not worry about tint! for now..
+	        for (var i = 0; i < vertexData.length; i += 2)
+	        {
+	            float32View[aIndex++] = vertexData[i];
+	            float32View[aIndex++] = vertexData[i + 1];
+	            float32View[aIndex++] = uvs[i];
+	            float32View[aIndex++] = uvs[i + 1];
+	            uint32View[aIndex++] = argb;
+	            float32View[aIndex++] = textureId;
+	        }
+
+	        for (var i$1 = 0; i$1 < indicies.length; i$1++)
+	        {
+	            indexBuffer[iIndex++] = packedVertices + indicies[i$1];
+	        }
+	    };
+
+	    return AbstractBatchRenderer;
+	}(ObjectRenderer));
+
+	/**
+	 * Helper that generates batching multi-texture shader. Use it with your new BatchRenderer
+	 *
+	 * @class
+	 * @memberof PIXI
+	 */
+	var BatchShaderGenerator = function BatchShaderGenerator(vertexSrc, fragTemplate)
+	{
+	    /**
+	     * Reference to the vertex shader source.
+	     *
+	     * @member {string}
+	     */
+	    this.vertexSrc = vertexSrc;
+
+	    /**
+	     * Reference to the fragement shader template. Must contain "%count%" and "%forloop%".
+	     *
+	     * @member {string}
+	     */
+	    this.fragTemplate = fragTemplate;
+
+	    this.programCache = {};
+	    this.defaultGroupCache = {};
+
+	    if (fragTemplate.indexOf('%count%') < 0)
+	    {
+	        throw new Error('Fragment template must contain "%count%".');
+	    }
+
+	    if (fragTemplate.indexOf('%forloop%') < 0)
+	    {
+	        throw new Error('Fragment template must contain "%forloop%".');
+	    }
+	};
+
+	BatchShaderGenerator.prototype.generateShader = function generateShader (maxTextures)
+	{
+	    if (!this.programCache[maxTextures])
+	    {
+	        var sampleValues = new Int32Array(maxTextures);
+
+	        for (var i = 0; i < maxTextures; i++)
+	        {
+	            sampleValues[i] = i;
+	        }
+
+	        this.defaultGroupCache[maxTextures] = UniformGroup.from({ uSamplers: sampleValues }, true);
+
+	        var fragmentSrc = this.fragTemplate;
+
+	        fragmentSrc = fragmentSrc.replace(/%count%/gi, ("" + maxTextures));
+	        fragmentSrc = fragmentSrc.replace(/%forloop%/gi, this.generateSampleSrc(maxTextures));
+
+	        this.programCache[maxTextures] = new Program(this.vertexSrc, fragmentSrc);
+	    }
+
+	    var uniforms = {
+	        tint: new Float32Array([1, 1, 1, 1]),
+	        translationMatrix: new Matrix(),
+	        default: this.defaultGroupCache[maxTextures],
+	    };
+
+	    return new Shader(this.programCache[maxTextures], uniforms);
+	};
+
+	BatchShaderGenerator.prototype.generateSampleSrc = function generateSampleSrc (maxTextures)
+	{
+	    var src = '';
+
+	    src += '\n';
+	    src += '\n';
+
+	    for (var i = 0; i < maxTextures; i++)
+	    {
+	        if (i > 0)
+	        {
+	            src += '\nelse ';
+	        }
+
+	        if (i < maxTextures - 1)
+	        {
+	            src += "if(vTextureId < " + i + ".5)";
+	        }
+
+	        src += '\n{';
+	        src += "\n\tcolor = texture2D(uSamplers[" + i + "], vTextureCoord);";
+	        src += '\n}';
+	    }
+
+	    src += '\n';
+	    src += '\n';
+
+	    return src;
+	};
+
+	/**
+	 * Geometry used to batch standard PIXI content (e.g. Mesh, Sprite, Graphics objects).
+	 *
+	 * @class
+	 * @memberof PIXI
+	 */
+	var BatchGeometry = /*@__PURE__*/(function (Geometry) {
+	    function BatchGeometry(_static)
+	    {
+	        if ( _static === void 0 ) { _static = false; }
+
+	        Geometry.call(this);
+
+	        /**
+	         * Buffer used for position, color, texture IDs
+	         *
+	         * @member {PIXI.Buffer}
+	         * @protected
+	         */
+	        this._buffer = new Buffer(null, _static, false);
+
+	        /**
+	         * Index buffer data
+	         *
+	         * @member {PIXI.Buffer}
+	         * @protected
+	         */
+	        this._indexBuffer = new Buffer(null, _static, true);
+
+	        this.addAttribute('aVertexPosition', this._buffer, 2, false, TYPES.FLOAT)
+	            .addAttribute('aTextureCoord', this._buffer, 2, false, TYPES.FLOAT)
+	            .addAttribute('aColor', this._buffer, 4, true, TYPES.UNSIGNED_BYTE)
+	            .addAttribute('aTextureId', this._buffer, 1, true, TYPES.FLOAT)
+	            .addIndex(this._indexBuffer);
+	    }
+
+	    if ( Geometry ) { BatchGeometry.__proto__ = Geometry; }
+	    BatchGeometry.prototype = Object.create( Geometry && Geometry.prototype );
+	    BatchGeometry.prototype.constructor = BatchGeometry;
+
+	    return BatchGeometry;
+	}(Geometry));
+
+	var defaultVertex$2 = "precision highp float;\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec4 aColor;\nattribute float aTextureId;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform vec4 tint;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\nvarying float vTextureId;\n\nvoid main(void){\n    gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n    vTextureCoord = aTextureCoord;\n    vTextureId = aTextureId;\n    vColor = aColor * tint;\n}\n";
+
+	var defaultFragment$2 = "varying vec2 vTextureCoord;\nvarying vec4 vColor;\nvarying float vTextureId;\nuniform sampler2D uSamplers[%count%];\n\nvoid main(void){\n    vec4 color;\n    %forloop%\n    gl_FragColor = color * vColor;\n}\n";
+
+	/**
+	 * @class
+	 * @memberof PIXI
+	 * @hideconstructor
+	 */
+	var BatchPluginFactory = function BatchPluginFactory () {};
+
+	var staticAccessors$1$1 = { defaultVertexSrc: { configurable: true },defaultFragmentTemplate: { configurable: true } };
+
+	BatchPluginFactory.create = function create (options)
+	{
+	    var ref = Object.assign({
+	        vertex: defaultVertex$2,
+	        fragment: defaultFragment$2,
+	        geometryClass: BatchGeometry,
+	        vertexSize: 6,
+	    }, options);
+	        var vertex = ref.vertex;
+	        var fragment = ref.fragment;
+	        var vertexSize = ref.vertexSize;
+	        var geometryClass = ref.geometryClass;
+
+	    return /*@__PURE__*/(function (AbstractBatchRenderer) {
+	            function BatchPlugin(renderer)
+	        {
+	            AbstractBatchRenderer.call(this, renderer);
+
+	            this.shaderGenerator = new BatchShaderGenerator(vertex, fragment);
+	            this.geometryClass = geometryClass;
+	            this.vertexSize = vertexSize;
+	        }
+
+	            if ( AbstractBatchRenderer ) { BatchPlugin.__proto__ = AbstractBatchRenderer; }
+	            BatchPlugin.prototype = Object.create( AbstractBatchRenderer && AbstractBatchRenderer.prototype );
+	            BatchPlugin.prototype.constructor = BatchPlugin;
+
+	            return BatchPlugin;
+	        }(AbstractBatchRenderer));
+	};
+
+	/**
+	 * The default vertex shader source
+	 *
+	 * @static
+	 * @type {string}
+	 * @constant
+	 */
+	staticAccessors$1$1.defaultVertexSrc.get = function ()
+	{
+	    return defaultVertex$2;
+	};
+
+	/**
+	 * The default fragment shader source
+	 *
+	 * @static
+	 * @type {string}
+	 * @constant
+	 */
+	staticAccessors$1$1.defaultFragmentTemplate.get = function ()
+	{
+	    return defaultFragment$2;
+	};
+
+	Object.defineProperties( BatchPluginFactory, staticAccessors$1$1 );
+
+	// Setup the default BatchRenderer plugin, this is what
+	// we'll actually export at the root level
+	var BatchRenderer = BatchPluginFactory.create();
+
+	/*!
+	 * @pixi/extract - v5.1.4
+	 * Compiled Fri, 20 Sep 2019 17:22:13 UTC
+	 *
+	 * @pixi/extract is licensed under the MIT License.
+	 * http://www.opensource.org/licenses/mit-license
+	 */
+
+	var TEMP_RECT = new Rectangle();
+	var BYTES_PER_PIXEL = 4;
+
+	/**
+	 * The extract manager provides functionality to export content from the renderers.
+	 *
+	 * An instance of this class is automatically created by default, and can be found at `renderer.plugins.extract`
+	 *
+	 * @class
+	 * @memberof PIXI.extract
+	 */
+	var Extract = function Extract(renderer)
+	{
+	    this.renderer = renderer;
+	    /**
+	     * Collection of methods for extracting data (image, pixels, etc.) from a display object or render texture
+	     *
+	     * @member {PIXI.extract.Extract} extract
+	     * @memberof PIXI.Renderer#
+	     * @see PIXI.extract.Extract
+	     */
+	    renderer.extract = this;
+	};
+
+	/**
+	 * Will return a HTML Image of the target
+	 *
+	 * @param {PIXI.DisplayObject|PIXI.RenderTexture} target - A displayObject or renderTexture
+	 *  to convert. If left empty will use the main renderer
+	 * @param {string} [format] - Image format, e.g. "image/jpeg" or "image/webp".
+	 * @param {number} [quality] - JPEG or Webp compression from 0 to 1. Default is 0.92.
+	 * @return {HTMLImageElement} HTML Image of the target
+	 */
+	Extract.prototype.image = function image (target, format, quality)
+	{
+	    var image = new Image();
+
+	    image.src = this.base64(target, format, quality);
+
+	    return image;
+	};
+
+	/**
+	 * Will return a a base64 encoded string of this target. It works by calling
+	 *  `Extract.getCanvas` and then running toDataURL on that.
+	 *
+	 * @param {PIXI.DisplayObject|PIXI.RenderTexture} target - A displayObject or renderTexture
+	 *  to convert. If left empty will use the main renderer
+	 * @param {string} [format] - Image format, e.g. "image/jpeg" or "image/webp".
+	 * @param {number} [quality] - JPEG or Webp compression from 0 to 1. Default is 0.92.
+	 * @return {string} A base64 encoded string of the texture.
+	 */
+	Extract.prototype.base64 = function base64 (target, format, quality)
+	{
+	    return this.canvas(target).toDataURL(format, quality);
+	};
+
+	/**
+	 * Creates a Canvas element, renders this target to it and then returns it.
+	 *
+	 * @param {PIXI.DisplayObject|PIXI.RenderTexture} target - A displayObject or renderTexture
+	 *  to convert. If left empty will use the main renderer
+	 * @return {HTMLCanvasElement} A Canvas element with the texture rendered on.
+	 */
+	Extract.prototype.canvas = function canvas (target)
+	{
+	    var renderer = this.renderer;
+	    var resolution;
+	    var frame;
+	    var flipY = false;
+	    var renderTexture;
+	    var generated = false;
+
+	    if (target)
+	    {
+	        if (target instanceof RenderTexture)
+	        {
+	            renderTexture = target;
+	        }
+	        else
+	        {
+	            renderTexture = this.renderer.generateTexture(target);
+	            generated = true;
+	        }
+	    }
+
+	    if (renderTexture)
+	    {
+	        resolution = renderTexture.baseTexture.resolution;
+	        frame = renderTexture.frame;
+	        flipY = false;
+	        renderer.renderTexture.bind(renderTexture);
+	    }
+	    else
+	    {
+	        resolution = this.renderer.resolution;
+
+	        flipY = true;
+
+	        frame = TEMP_RECT;
+	        frame.width = this.renderer.width;
+	        frame.height = this.renderer.height;
+
+	        renderer.renderTexture.bind(null);
+	    }
+
+	    var width = Math.floor(frame.width * resolution);
+	    var height = Math.floor(frame.height * resolution);
+
+	    var canvasBuffer = new CanvasRenderTarget(width, height, 1);
+
+	    var webglPixels = new Uint8Array(BYTES_PER_PIXEL * width * height);
+
+	    // read pixels to the array
+	    var gl = renderer.gl;
+
+	    gl.readPixels(
+	        frame.x * resolution,
+	        frame.y * resolution,
+	        width,
+	        height,
+	        gl.RGBA,
+	        gl.UNSIGNED_BYTE,
+	        webglPixels
+	    );
+
+	    // add the pixels to the canvas
+	    var canvasData = canvasBuffer.context.getImageData(0, 0, width, height);
+
+	    Extract.arrayPostDivide(webglPixels, canvasData.data);
+
+	    canvasBuffer.context.putImageData(canvasData, 0, 0);
+
+	    // pulling pixels
+	    if (flipY)
+	    {
+	        canvasBuffer.context.scale(1, -1);
+	        canvasBuffer.context.drawImage(canvasBuffer.canvas, 0, -height);
+	    }
+
+	    if (generated)
+	    {
+	        renderTexture.destroy(true);
+	    }
+
+	    // send the canvas back..
+	    return canvasBuffer.canvas;
+	};
+
+	/**
+	 * Will return a one-dimensional array containing the pixel data of the entire texture in RGBA
+	 * order, with integer values between 0 and 255 (included).
+	 *
+	 * @param {PIXI.DisplayObject|PIXI.RenderTexture} target - A displayObject or renderTexture
+	 *  to convert. If left empty will use the main renderer
+	 * @return {Uint8Array} One-dimensional array containing the pixel data of the entire texture
+	 */
+	Extract.prototype.pixels = function pixels (target)
+	{
+	    var renderer = this.renderer;
+	    var resolution;
+	    var frame;
+	    var renderTexture;
+	    var generated = false;
+
+	    if (target)
+	    {
+	        if (target instanceof RenderTexture)
+	        {
+	            renderTexture = target;
+	        }
+	        else
+	        {
+	            renderTexture = this.renderer.generateTexture(target);
+	            generated = true;
+	        }
+	    }
+
+	    if (renderTexture)
+	    {
+	        resolution = renderTexture.baseTexture.resolution;
+	        frame = renderTexture.frame;
+
+	        // bind the buffer
+	        renderer.renderTexture.bind(renderTexture);
+	    }
+	    else
+	    {
+	        resolution = renderer.resolution;
+
+	        frame = TEMP_RECT;
+	        frame.width = renderer.width;
+	        frame.height = renderer.height;
+
+	        renderer.renderTexture.bind(null);
+	    }
+
+	    var width = frame.width * resolution;
+	    var height = frame.height * resolution;
+
+	    var webglPixels = new Uint8Array(BYTES_PER_PIXEL * width * height);
+
+	    // read pixels to the array
+	    var gl = renderer.gl;
+
+	    gl.readPixels(
+	        frame.x * resolution,
+	        frame.y * resolution,
+	        width,
+	        height,
+	        gl.RGBA,
+	        gl.UNSIGNED_BYTE,
+	        webglPixels
+	    );
+
+	    if (generated)
+	    {
+	        renderTexture.destroy(true);
+	    }
+
+	    Extract.arrayPostDivide(webglPixels, webglPixels);
+
+	    return webglPixels;
+	};
+
+	/**
+	 * Destroys the extract
+	 *
+	 */
+	Extract.prototype.destroy = function destroy ()
+	{
+	    this.renderer.extract = null;
+	    this.renderer = null;
+	};
+
+	/**
+	 * Takes premultiplied pixel data and produces regular pixel data
+	 *
+	 * @private
+	 * @param pixels {number[] | Uint8Array | Uint8ClampedArray} array of pixel data
+	 * @param out {number[] | Uint8Array | Uint8ClampedArray} output array
+	 */
+	Extract.arrayPostDivide = function arrayPostDivide (pixels, out)
+	{
+	    for (var i = 0; i < pixels.length; i += 4)
+	    {
+	        var alpha = out[i + 3] = pixels[i + 3];
+
+	        if (alpha !== 0)
+	        {
+	            out[i] = Math.round(Math.min(pixels[i] * 255.0 / alpha, 255.0));
+	            out[i + 1] = Math.round(Math.min(pixels[i + 1] * 255.0 / alpha, 255.0));
+	            out[i + 2] = Math.round(Math.min(pixels[i + 2] * 255.0 / alpha, 255.0));
+	        }
+	        else
+	        {
+	            out[i] = pixels[i];
+	            out[i + 1] = pixels[i + 1];
+	            out[i + 2] = pixels[i + 2];
+	        }
+	    }
+	};
+
+	var extract_es = ({
+		Extract: Extract
+	});
+
+	/*!
+	 * @pixi/interaction - v5.1.4
+	 * Compiled Fri, 20 Sep 2019 17:22:13 UTC
+	 *
+	 * @pixi/interaction is licensed under the MIT License.
+	 * http://www.opensource.org/licenses/mit-license
+	 */
+
+	/**
+	 * Holds all information related to an Interaction event
+	 *
+	 * @class
+	 * @memberof PIXI.interaction
+	 */
+	var InteractionData = function InteractionData()
+	{
+	    /**
+	     * This point stores the global coords of where the touch/mouse event happened
+	     *
+	     * @member {PIXI.Point}
+	     */
+	    this.global = new Point();
+
+	    /**
+	     * The target Sprite that was interacted with
+	     *
+	     * @member {PIXI.Sprite}
+	     */
+	    this.target = null;
+
+	    /**
+	     * When passed to an event handler, this will be the original DOM Event that was captured
+	     *
+	     * @see https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent
+	     * @see https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent
+	     * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent
+	     * @member {MouseEvent|TouchEvent|PointerEvent}
+	     */
+	    this.originalEvent = null;
+
+	    /**
+	     * Unique identifier for this interaction
+	     *
+	     * @member {number}
+	     */
+	    this.identifier = null;
+
+	    /**
+	     * Indicates whether or not the pointer device that created the event is the primary pointer.
+	     * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/isPrimary
+	     * @type {Boolean}
+	     */
+	    this.isPrimary = false;
+
+	    /**
+	     * Indicates which button was pressed on the mouse or pointer device to trigger the event.
+	     * @see https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button
+	     * @type {number}
+	     */
+	    this.button = 0;
+
+	    /**
+	     * Indicates which buttons are pressed on the mouse or pointer device when the event is triggered.
+	     * @see https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/buttons
+	     * @type {number}
+	     */
+	    this.buttons = 0;
+
+	    /**
+	     * The width of the pointer's contact along the x-axis, measured in CSS pixels.
+	     * radiusX of TouchEvents will be represented by this value.
+	     * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/width
+	     * @type {number}
+	     */
+	    this.width = 0;
+
+	    /**
+	     * The height of the pointer's contact along the y-axis, measured in CSS pixels.
+	     * radiusY of TouchEvents will be represented by this value.
+	     * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/height
+	     * @type {number}
+	     */
+	    this.height = 0;
+
+	    /**
+	     * The angle, in degrees, between the pointer device and the screen.
+	     * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/tiltX
+	     * @type {number}
+	     */
+	    this.tiltX = 0;
+
+	    /**
+	     * The angle, in degrees, between the pointer device and the screen.
+	     * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/tiltY
+	     * @type {number}
+	     */
+	    this.tiltY = 0;
+
+	    /**
+	     * The type of pointer that triggered the event.
+	     * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/pointerType
+	     * @type {string}
+	     */
+	    this.pointerType = null;
+
+	    /**
+	     * Pressure applied by the pointing device during the event. A Touch's force property
+	     * will be represented by this value.
+	     * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/pressure
+	     * @type {number}
+	     */
+	    this.pressure = 0;
+
+	    /**
+	     * From TouchEvents (not PointerEvents triggered by touches), the rotationAngle of the Touch.
+	     * @see https://developer.mozilla.org/en-US/docs/Web/API/Touch/rotationAngle
+	     * @type {number}
+	     */
+	    this.rotationAngle = 0;
+
+	    /**
+	     * Twist of a stylus pointer.
+	     * @see https://w3c.github.io/pointerevents/#pointerevent-interface
+	     * @type {number}
+	     */
+	    this.twist = 0;
+
+	    /**
+	     * Barrel pressure on a stylus pointer.
+	     * @see https://w3c.github.io/pointerevents/#pointerevent-interface
+	     * @type {number}
+	     */
+	    this.tangentialPressure = 0;
+	};
+
+	var prototypeAccessors$6 = { pointerId: { configurable: true } };
+
+	/**
+	 * The unique identifier of the pointer. It will be the same as `identifier`.
+	 * @readonly
+	 * @member {number}
+	 * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/pointerId
+	 */
+	prototypeAccessors$6.pointerId.get = function ()
+	{
+	    return this.identifier;
+	};
+
+	/**
+	 * This will return the local coordinates of the specified displayObject for this InteractionData
+	 *
+	 * @param {PIXI.DisplayObject} displayObject - The DisplayObject that you would like the local
+	 *  coords off
+	 * @param {PIXI.Point} [point] - A Point object in which to store the value, optional (otherwise
+	 *  will create a new point)
+	 * @param {PIXI.Point} [globalPos] - A Point object containing your custom global coords, optional
+	 *  (otherwise will use the current global coords)
+	 * @return {PIXI.Point} A point containing the coordinates of the InteractionData position relative
+	 *  to the DisplayObject
+	 */
+	InteractionData.prototype.getLocalPosition = function getLocalPosition (displayObject, point, globalPos)
+	{
+	    return displayObject.worldTransform.applyInverse(globalPos || this.global, point);
+	};
+
+	/**
+	 * Copies properties from normalized event data.
+	 *
+	 * @param {Touch|MouseEvent|PointerEvent} event The normalized event data
+	 */
+	InteractionData.prototype.copyEvent = function copyEvent (event)
+	{
+	    // isPrimary should only change on touchstart/pointerdown, so we don't want to overwrite
+	    // it with "false" on later events when our shim for it on touch events might not be
+	    // accurate
+	    if (event.isPrimary)
+	    {
+	        this.isPrimary = true;
+	    }
+	    this.button = event.button;
+	    // event.buttons is not available in all browsers (ie. Safari), but it does have a non-standard
+	    // event.which property instead, which conveys the same information.
+	    this.buttons = Number.isInteger(event.buttons) ? event.buttons : event.which;
+	    this.width = event.width;
+	    this.height = event.height;
+	    this.tiltX = event.tiltX;
+	    this.tiltY = event.tiltY;
+	    this.pointerType = event.pointerType;
+	    this.pressure = event.pressure;
+	    this.rotationAngle = event.rotationAngle;
+	    this.twist = event.twist || 0;
+	    this.tangentialPressure = event.tangentialPressure || 0;
+	};
+
+	/**
+	 * Resets the data for pooling.
+	 */
+	InteractionData.prototype.reset = function reset ()
+	{
+	    // isPrimary is the only property that we really need to reset - everything else is
+	    // guaranteed to be overwritten
+	    this.isPrimary = false;
+	};
+
+	Object.defineProperties( InteractionData.prototype, prototypeAccessors$6 );
+
+	/**
+	 * Event class that mimics native DOM events.
+	 *
+	 * @class
+	 * @memberof PIXI.interaction
+	 */
+	var InteractionEvent = function InteractionEvent()
+	{
+	    /**
+	     * Whether this event will continue propagating in the tree.
+	     *
+	     * Remaining events for the {@link stopsPropagatingAt} object
+	     * will still be dispatched.
+	     *
+	     * @member {boolean}
+	     */
+	    this.stopped = false;
+
+	    /**
+	     * At which object this event stops propagating.
+	     *
+	     * @private
+	     * @member {PIXI.DisplayObject}
+	     */
+	    this.stopsPropagatingAt = null;
+
+	    /**
+	     * Whether we already reached the element we want to
+	     * stop propagating at. This is important for delayed events,
+	     * where we start over deeper in the tree again.
+	     *
+	     * @private
+	     * @member {boolean}
+	     */
+	    this.stopPropagationHint = false;
+
+	    /**
+	     * The object which caused this event to be dispatched.
+	     * For listener callback see {@link PIXI.interaction.InteractionEvent.currentTarget}.
+	     *
+	     * @member {PIXI.DisplayObject}
+	     */
+	    this.target = null;
+
+	    /**
+	     * The object whose event listener’s callback is currently being invoked.
+	     *
+	     * @member {PIXI.DisplayObject}
+	     */
+	    this.currentTarget = null;
+
+	    /**
+	     * Type of the event
+	     *
+	     * @member {string}
+	     */
+	    this.type = null;
+
+	    /**
+	     * InteractionData related to this event
+	     *
+	     * @member {PIXI.interaction.InteractionData}
+	     */
+	    this.data = null;
+	};
+
+	/**
+	 * Prevents event from reaching any objects other than the current object.
+	 *
+	 */
+	InteractionEvent.prototype.stopPropagation = function stopPropagation ()
+	{
+	    this.stopped = true;
+	    this.stopPropagationHint = true;
+	    this.stopsPropagatingAt = this.currentTarget;
+	};
+
+	/**
+	 * Resets the event.
+	 */
+	InteractionEvent.prototype.reset = function reset ()
+	{
+	    this.stopped = false;
+	    this.stopsPropagatingAt = null;
+	    this.stopPropagationHint = false;
+	    this.currentTarget = null;
+	    this.target = null;
+	};
+
+	/**
+	 * DisplayObjects with the {@link PIXI.interaction.interactiveTarget} mixin use this class to track interactions
+	 *
+	 * @class
+	 * @private
+	 * @memberof PIXI.interaction
+	 */
+	var InteractionTrackingData = function InteractionTrackingData(pointerId)
+	{
+	    this._pointerId = pointerId;
+	    this._flags = InteractionTrackingData.FLAGS.NONE;
+	};
+
+	var prototypeAccessors$1$3 = { pointerId: { configurable: true },flags: { configurable: true },none: { configurable: true },over: { configurable: true },rightDown: { configurable: true },leftDown: { configurable: true } };
+
+	/**
+	 *
+	 * @private
+	 * @param {number} flag - The interaction flag to set
+	 * @param {boolean} yn - Should the flag be set or unset
+	 */
+	InteractionTrackingData.prototype._doSet = function _doSet (flag, yn)
+	{
+	    if (yn)
+	    {
+	        this._flags = this._flags | flag;
+	    }
+	    else
+	    {
+	        this._flags = this._flags & (~flag);
+	    }
+	};
+
+	/**
+	 * Unique pointer id of the event
+	 *
+	 * @readonly
+	 * @private
+	 * @member {number}
+	 */
+	prototypeAccessors$1$3.pointerId.get = function ()
+	{
+	    return this._pointerId;
+	};
+
+	/**
+	 * State of the tracking data, expressed as bit flags
+	 *
+	 * @private
+	 * @member {number}
+	 */
+	prototypeAccessors$1$3.flags.get = function ()
+	{
+	    return this._flags;
+	};
+
+	prototypeAccessors$1$3.flags.set = function (flags) // eslint-disable-line require-jsdoc
+	{
+	    this._flags = flags;
+	};
+
+	/**
+	 * Is the tracked event inactive (not over or down)?
+	 *
+	 * @private
+	 * @member {number}
+	 */
+	prototypeAccessors$1$3.none.get = function ()
+	{
+	    return this._flags === this.constructor.FLAGS.NONE;
+	};
+
+	/**
+	 * Is the tracked event over the DisplayObject?
+	 *
+	 * @private
+	 * @member {boolean}
+	 */
+	prototypeAccessors$1$3.over.get = function ()
+	{
+	    return (this._flags & this.constructor.FLAGS.OVER) !== 0;
+	};
+
+	prototypeAccessors$1$3.over.set = function (yn) // eslint-disable-line require-jsdoc
+	{
+	    this._doSet(this.constructor.FLAGS.OVER, yn);
+	};
+
+	/**
+	 * Did the right mouse button come down in the DisplayObject?
+	 *
+	 * @private
+	 * @member {boolean}
+	 */
+	prototypeAccessors$1$3.rightDown.get = function ()
+	{
+	    return (this._flags & this.constructor.FLAGS.RIGHT_DOWN) !== 0;
+	};
+
+	prototypeAccessors$1$3.rightDown.set = function (yn) // eslint-disable-line require-jsdoc
+	{
+	    this._doSet(this.constructor.FLAGS.RIGHT_DOWN, yn);
+	};
+
+	/**
+	 * Did the left mouse button come down in the DisplayObject?
+	 *
+	 * @private
+	 * @member {boolean}
+	 */
+	prototypeAccessors$1$3.leftDown.get = function ()
+	{
+	    return (this._flags & this.constructor.FLAGS.LEFT_DOWN) !== 0;
+	};
+
+	prototypeAccessors$1$3.leftDown.set = function (yn) // eslint-disable-line require-jsdoc
+	{
+	    this._doSet(this.constructor.FLAGS.LEFT_DOWN, yn);
+	};
+
+	Object.defineProperties( InteractionTrackingData.prototype, prototypeAccessors$1$3 );
+
+	InteractionTrackingData.FLAGS = Object.freeze({
+	    NONE: 0,
+	    OVER: 1 << 0,
+	    LEFT_DOWN: 1 << 1,
+	    RIGHT_DOWN: 1 << 2,
+	});
+
+	/**
+	 * Interface for classes that represent a hit area.
+	 *
+	 * It is implemented by the following classes:
+	 * - {@link PIXI.Circle}
+	 * - {@link PIXI.Ellipse}
+	 * - {@link PIXI.Polygon}
+	 * - {@link PIXI.RoundedRectangle}
+	 *
+	 * @interface IHitArea
+	 * @memberof PIXI
+	 */
+
+	/**
+	 * Checks whether the x and y coordinates given are contained within this area
+	 *
+	 * @method
+	 * @name contains
+	 * @memberof PIXI.IHitArea#
+	 * @param {number} x - The X coordinate of the point to test
+	 * @param {number} y - The Y coordinate of the point to test
+	 * @return {boolean} Whether the x/y coordinates are within this area
+	 */
+
+	/**
+	 * Default property values of interactive objects
+	 * Used by {@link PIXI.interaction.InteractionManager} to automatically give all DisplayObjects these properties
+	 *
+	 * @private
+	 * @name interactiveTarget
+	 * @type {Object}
+	 * @memberof PIXI.interaction
+	 * @example
+	 *      function MyObject() {}
+	 *
+	 *      Object.assign(
+	 *          DisplayObject.prototype,
+	 *          PIXI.interaction.interactiveTarget
+	 *      );
+	 */
+	var interactiveTarget = {
+
+	    /**
+	     * Enable interaction events for the DisplayObject. Touch, pointer and mouse
+	     * events will not be emitted unless `interactive` is set to `true`.
+	     *
+	     * @example
+	     * const sprite = new PIXI.Sprite(texture);
+	     * sprite.interactive = true;
+	     * sprite.on('tap', (event) => {
+	     *    //handle event
+	     * });
+	     * @member {boolean}
+	     * @memberof PIXI.DisplayObject#
+	     */
+	    interactive: false,
+
+	    /**
+	     * Determines if the children to the displayObject can be clicked/touched
+	     * Setting this to false allows PixiJS to bypass a recursive `hitTest` function
+	     *
+	     * @member {boolean}
+	     * @memberof PIXI.Container#
+	     */
+	    interactiveChildren: true,
+
+	    /**
+	     * Interaction shape. Children will be hit first, then this shape will be checked.
+	     * Setting this will cause this shape to be checked in hit tests rather than the displayObject's bounds.
+	     *
+	     * @example
+	     * const sprite = new PIXI.Sprite(texture);
+	     * sprite.interactive = true;
+	     * sprite.hitArea = new PIXI.Rectangle(0, 0, 100, 100);
+	     * @member {PIXI.IHitArea}
+	     * @memberof PIXI.DisplayObject#
+	     */
+	    hitArea: null,
+
+	    /**
+	     * If enabled, the mouse cursor use the pointer behavior when hovered over the displayObject if it is interactive
+	     * Setting this changes the 'cursor' property to `'pointer'`.
+	     *
+	     * @example
+	     * const sprite = new PIXI.Sprite(texture);
+	     * sprite.interactive = true;
+	     * sprite.buttonMode = true;
+	     * @member {boolean}
+	     * @memberof PIXI.DisplayObject#
+	     */
+	    get buttonMode()
+	    {
+	        return this.cursor === 'pointer';
+	    },
+	    set buttonMode(value)
+	    {
+	        if (value)
+	        {
+	            this.cursor = 'pointer';
+	        }
+	        else if (this.cursor === 'pointer')
+	        {
+	            this.cursor = null;
+	        }
+	    },
+
+	    /**
+	     * This defines what cursor mode is used when the mouse cursor
+	     * is hovered over the displayObject.
+	     *
+	     * @example
+	     * const sprite = new PIXI.Sprite(texture);
+	     * sprite.interactive = true;
+	     * sprite.cursor = 'wait';
+	     * @see https://developer.mozilla.org/en/docs/Web/CSS/cursor
+	     *
+	     * @member {string}
+	     * @memberof PIXI.DisplayObject#
+	     */
+	    cursor: null,
+
+	    /**
+	     * Internal set of all active pointers, by identifier
+	     *
+	     * @member {Map<number, InteractionTrackingData>}
+	     * @memberof PIXI.DisplayObject#
+	     * @private
+	     */
+	    get trackedPointers()
+	    {
+	        if (this._trackedPointers === undefined) { this._trackedPointers = {}; }
+
+	        return this._trackedPointers;
+	    },
+
+	    /**
+	     * Map of all tracked pointers, by identifier. Use trackedPointers to access.
+	     *
+	     * @private
+	     * @type {Map<number, InteractionTrackingData>}
+	     */
+	    _trackedPointers: undefined,
+	};
+
+	// Mix interactiveTarget into DisplayObject.prototype,
+	// after deprecation has been handled
+	DisplayObject.mixin(interactiveTarget);
+
+	var MOUSE_POINTER_ID = 1;
+
+	// helpers for hitTest() - only used inside hitTest()
+	var hitTestEvent = {
+	    target: null,
+	    data: {
+	        global: null,
+	    },
+	};
+
+	/**
+	 * The interaction manager deals with mouse, touch and pointer events.
+	 *
+	 * Any DisplayObject can be interactive if its `interactive` property is set to true.
+	 *
+	 * This manager also supports multitouch.
+	 *
+	 * An instance of this class is automatically created by default, and can be found at `renderer.plugins.interaction`
+	 *
+	 * @class
+	 * @extends PIXI.utils.EventEmitter
+	 * @memberof PIXI.interaction
+	 */
+	var InteractionManager = /*@__PURE__*/(function (EventEmitter) {
+	    function InteractionManager(renderer, options)
+	    {
+	        EventEmitter.call(this);
+
+	        options = options || {};
+
+	        /**
+	         * The renderer this interaction manager works for.
+	         *
+	         * @member {PIXI.AbstractRenderer}
+	         */
+	        this.renderer = renderer;
+
+	        /**
+	         * Should default browser actions automatically be prevented.
+	         * Does not apply to pointer events for backwards compatibility
+	         * preventDefault on pointer events stops mouse events from firing
+	         * Thus, for every pointer event, there will always be either a mouse of touch event alongside it.
+	         *
+	         * @member {boolean}
+	         * @default true
+	         */
+	        this.autoPreventDefault = options.autoPreventDefault !== undefined ? options.autoPreventDefault : true;
+
+	        /**
+	         * Frequency in milliseconds that the mousemove, mouseover & mouseout interaction events will be checked.
+	         *
+	         * @member {number}
+	         * @default 10
+	         */
+	        this.interactionFrequency = options.interactionFrequency || 10;
+
+	        /**
+	         * The mouse data
+	         *
+	         * @member {PIXI.interaction.InteractionData}
+	         */
+	        this.mouse = new InteractionData();
+	        this.mouse.identifier = MOUSE_POINTER_ID;
+
+	        // setting the mouse to start off far off screen will mean that mouse over does
+	        //  not get called before we even move the mouse.
+	        this.mouse.global.set(-999999);
+
+	        /**
+	         * Actively tracked InteractionData
+	         *
+	         * @private
+	         * @member {Object.<number,PIXI.interaction.InteractionData>}
+	         */
+	        this.activeInteractionData = {};
+	        this.activeInteractionData[MOUSE_POINTER_ID] = this.mouse;
+
+	        /**
+	         * Pool of unused InteractionData
+	         *
+	         * @private
+	         * @member {PIXI.interaction.InteractionData[]}
+	         */
+	        this.interactionDataPool = [];
+
+	        /**
+	         * An event data object to handle all the event tracking/dispatching
+	         *
+	         * @member {object}
+	         */
+	        this.eventData = new InteractionEvent();
+
+	        /**
+	         * The DOM element to bind to.
+	         *
+	         * @protected
+	         * @member {HTMLElement}
+	         */
+	        this.interactionDOMElement = null;
+
+	        /**
+	         * This property determines if mousemove and touchmove events are fired only when the cursor
+	         * is over the object.
+	         * Setting to true will make things work more in line with how the DOM version works.
+	         * Setting to false can make things easier for things like dragging
+	         * It is currently set to false as this is how PixiJS used to work. This will be set to true in
+	         * future versions of pixi.
+	         *
+	         * @member {boolean}
+	         * @default false
+	         */
+	        this.moveWhenInside = false;
+
+	        /**
+	         * Have events been attached to the dom element?
+	         *
+	         * @protected
+	         * @member {boolean}
+	         */
+	        this.eventsAdded = false;
+
+	        /**
+	         * Is the mouse hovering over the renderer?
+	         *
+	         * @protected
+	         * @member {boolean}
+	         */
+	        this.mouseOverRenderer = false;
+
+	        /**
+	         * Does the device support touch events
+	         * https://www.w3.org/TR/touch-events/
+	         *
+	         * @readonly
+	         * @member {boolean}
+	         */
+	        this.supportsTouchEvents = 'ontouchstart' in window;
+
+	        /**
+	         * Does the device support pointer events
+	         * https://www.w3.org/Submission/pointer-events/
+	         *
+	         * @readonly
+	         * @member {boolean}
+	         */
+	        this.supportsPointerEvents = !!window.PointerEvent;
+
+	        // this will make it so that you don't have to call bind all the time
+
+	        /**
+	         * @private
+	         * @member {Function}
+	         */
+	        this.onPointerUp = this.onPointerUp.bind(this);
+	        this.processPointerUp = this.processPointerUp.bind(this);
+
+	        /**
+	         * @private
+	         * @member {Function}
+	         */
+	        this.onPointerCancel = this.onPointerCancel.bind(this);
+	        this.processPointerCancel = this.processPointerCancel.bind(this);
+
+	        /**
+	         * @private
+	         * @member {Function}
+	         */
+	        this.onPointerDown = this.onPointerDown.bind(this);
+	        this.processPointerDown = this.processPointerDown.bind(this);
+
+	        /**
+	         * @private
+	         * @member {Function}
+	         */
+	        this.onPointerMove = this.onPointerMove.bind(this);
+	        this.processPointerMove = this.processPointerMove.bind(this);
+
+	        /**
+	         * @private
+	         * @member {Function}
+	         */
+	        this.onPointerOut = this.onPointerOut.bind(this);
+	        this.processPointerOverOut = this.processPointerOverOut.bind(this);
+
+	        /**
+	         * @private
+	         * @member {Function}
+	         */
+	        this.onPointerOver = this.onPointerOver.bind(this);
+
+	        /**
+	         * Dictionary of how different cursor modes are handled. Strings are handled as CSS cursor
+	         * values, objects are handled as dictionaries of CSS values for interactionDOMElement,
+	         * and functions are called instead of changing the CSS.
+	         * Default CSS cursor values are provided for 'default' and 'pointer' modes.
+	         * @member {Object.<string, Object>}
+	         */
+	        this.cursorStyles = {
+	            default: 'inherit',
+	            pointer: 'pointer',
+	        };
+
+	        /**
+	         * The mode of the cursor that is being used.
+	         * The value of this is a key from the cursorStyles dictionary.
+	         *
+	         * @member {string}
+	         */
+	        this.currentCursorMode = null;
+
+	        /**
+	         * Internal cached let.
+	         *
+	         * @private
+	         * @member {string}
+	         */
+	        this.cursor = null;
+
+	        /**
+	         * Internal cached let.
+	         *
+	         * @private
+	         * @member {PIXI.Point}
+	         */
+	        this._tempPoint = new Point();
+
+	        /**
+	         * The current resolution / device pixel ratio.
+	         *
+	         * @member {number}
+	         * @default 1
+	         */
+	        this.resolution = 1;
+
+	        /**
+	         * Delayed pointer events. Used to guarantee correct ordering of over/out events.
+	         *
+	         * @private
+	         * @member {Array}
+	         */
+	        this.delayedEvents = [];
+
+	        /**
+	         * Fired when a pointer device button (usually a mouse left-button) is pressed on the display
+	         * object.
+	         *
+	         * @event PIXI.interaction.InteractionManager#mousedown
+	         * @param {PIXI.interaction.InteractionEvent} event - Interaction event
+	         */
+
+	        /**
+	         * Fired when a pointer device secondary button (usually a mouse right-button) is pressed
+	         * on the display object.
+	         *
+	         * @event PIXI.interaction.InteractionManager#rightdown
+	         * @param {PIXI.interaction.InteractionEvent} event - Interaction event
+	         */
+
+	        /**
+	         * Fired when a pointer device button (usually a mouse left-button) is released over the display
+	         * object.
+	         *
+	         * @event PIXI.interaction.InteractionManager#mouseup
+	         * @param {PIXI.interaction.InteractionEvent} event - Interaction event
+	         */
+
+	        /**
+	         * Fired when a pointer device secondary button (usually a mouse right-button) is released
+	         * over the display object.
+	         *
+	         * @event PIXI.interaction.InteractionManager#rightup
+	         * @param {PIXI.interaction.InteractionEvent} event - Interaction event
+	         */
+
+	        /**
+	         * Fired when a pointer device button (usually a mouse left-button) is pressed and released on
+	         * the display object.
+	         *
+	         * @event PIXI.interaction.InteractionManager#click
+	         * @param {PIXI.interaction.InteractionEvent} event - Interaction event
+	         */
+
+	        /**
+	         * Fired when a pointer device secondary button (usually a mouse right-button) is pressed
+	         * and released on the display object.
+	         *
+	         * @event PIXI.interaction.InteractionManager#rightclick
+	         * @param {PIXI.interaction.InteractionEvent} event - Interaction event
+	         */
+
+	        /**
+	         * Fired when a pointer device button (usually a mouse left-button) is released outside the
+	         * display object that initially registered a
+	         * [mousedown]{@link PIXI.interaction.InteractionManager#event:mousedown}.
+	         *
+	         * @event PIXI.interaction.InteractionManager#mouseupoutside
+	         * @param {PIXI.interaction.InteractionEvent} event - Interaction event
+	         */
+
+	        /**
+	         * Fired when a pointer device secondary button (usually a mouse right-button) is released
+	         * outside the display object that initially registered a
+	         * [rightdown]{@link PIXI.interaction.InteractionManager#event:rightdown}.
+	         *
+	         * @event PIXI.interaction.InteractionManager#rightupoutside
+	         * @param {PIXI.interaction.InteractionEvent} event - Interaction event
+	         */
+
+	        /**
+	         * Fired when a pointer device (usually a mouse) is moved while over the display object
+	         *
+	         * @event PIXI.interaction.InteractionManager#mousemove
+	         * @param {PIXI.interaction.InteractionEvent} event - Interaction event
+	         */
+
+	        /**
+	         * Fired when a pointer device (usually a mouse) is moved onto the display object
+	         *
+	         * @event PIXI.interaction.InteractionManager#mouseover
+	         * @param {PIXI.interaction.InteractionEvent} event - Interaction event
+	         */
+
+	        /**
+	         * Fired when a pointer device (usually a mouse) is moved off the display object
+	         *
+	         * @event PIXI.interaction.InteractionManager#mouseout
+	         * @param {PIXI.interaction.InteractionEvent} event - Interaction event
+	         */
+
+	        /**
+	         * Fired when a pointer device button is pressed on the display object.
+	         *
+	         * @event PIXI.interaction.InteractionManager#pointerdown
+	         * @param {PIXI.interaction.InteractionEvent} event - Interaction event
+	         */
+
+	        /**
+	         * Fired when a pointer device button is released over the display object.
+	         * Not always fired when some buttons are held down while others are released. In those cases,
+	         * use [mousedown]{@link PIXI.interaction.InteractionManager#event:mousedown} and
+	         * [mouseup]{@link PIXI.interaction.InteractionManager#event:mouseup} instead.
+	         *
+	         * @event PIXI.interaction.InteractionManager#pointerup
+	         * @param {PIXI.interaction.InteractionEvent} event - Interaction event
+	         */
+
+	        /**
+	         * Fired when the operating system cancels a pointer event
+	         *
+	         * @event PIXI.interaction.InteractionManager#pointercancel
+	         * @param {PIXI.interaction.InteractionEvent} event - Interaction event
+	         */
+
+	        /**
+	         * Fired when a pointer device button is pressed and released on the display object.
+	         *
+	         * @event PIXI.interaction.InteractionManager#pointertap
+	         * @param {PIXI.interaction.InteractionEvent} event - Interaction event
+	         */
+
+	        /**
+	         * Fired when a pointer device button is released outside the display object that initially
+	         * registered a [pointerdown]{@link PIXI.interaction.InteractionManager#event:pointerdown}.
+	         *
+	         * @event PIXI.interaction.InteractionManager#pointerupoutside
+	         * @param {PIXI.interaction.InteractionEvent} event - Interaction event
+	         */
+
+	        /**
+	         * Fired when a pointer device is moved while over the display object
+	         *
+	         * @event PIXI.interaction.InteractionManager#pointermove
+	         * @param {PIXI.interaction.InteractionEvent} event - Interaction event
+	         */
+
+	        /**
+	         * Fired when a pointer device is moved onto the display object
+	         *
+	         * @event PIXI.interaction.InteractionManager#pointerover
+	         * @param {PIXI.interaction.InteractionEvent} event - Interaction event
+	         */
+
+	        /**
+	         * Fired when a pointer device is moved off the display object
+	         *
+	         * @event PIXI.interaction.InteractionManager#pointerout
+	         * @param {PIXI.interaction.InteractionEvent} event - Interaction event
+	         */
+
+	        /**
+	         * Fired when a touch point is placed on the display object.
+	         *
+	         * @event PIXI.interaction.InteractionManager#touchstart
+	         * @param {PIXI.interaction.InteractionEvent} event - Interaction event
+	         */
+
+	        /**
+	         * Fired when a touch point is removed from the display object.
+	         *
+	         * @event PIXI.interaction.InteractionManager#touchend
+	         * @param {PIXI.interaction.InteractionEvent} event - Interaction event
+	         */
+
+	        /**
+	         * Fired when the operating system cancels a touch
+	         *
+	         * @event PIXI.interaction.InteractionManager#touchcancel
+	         * @param {PIXI.interaction.InteractionEvent} event - Interaction event
+	         */
+
+	        /**
+	         * Fired when a touch point is placed and removed from the display object.
+	         *
+	         * @event PIXI.interaction.InteractionManager#tap
+	         * @param {PIXI.interaction.InteractionEvent} event - Interaction event
+	         */
+
+	        /**
+	         * Fired when a touch point is removed outside of the display object that initially
+	         * registered a [touchstart]{@link PIXI.interaction.InteractionManager#event:touchstart}.
+	         *
+	         * @event PIXI.interaction.InteractionManager#touchendoutside
+	         * @param {PIXI.interaction.InteractionEvent} event - Interaction event
+	         */
+
+	        /**
+	         * Fired when a touch point is moved along the display object.
+	         *
+	         * @event PIXI.interaction.InteractionManager#touchmove
+	         * @param {PIXI.interaction.InteractionEvent} event - Interaction event
+	         */
+
+	        /**
+	         * Fired when a pointer device button (usually a mouse left-button) is pressed on the display.
+	         * object. DisplayObject's `interactive` property must be set to `true` to fire event.
+	         *
+	         * @event PIXI.DisplayObject#mousedown
+	         * @param {PIXI.interaction.InteractionEvent} event - Interaction event
+	         */
+
+	        /**
+	         * Fired when a pointer device secondary button (usually a mouse right-button) is pressed
+	         * on the display object. DisplayObject's `interactive` property must be set to `true` to fire event.
+	         *
+	         * @event PIXI.DisplayObject#rightdown
+	         * @param {PIXI.interaction.InteractionEvent} event - Interaction event
+	         */
+
+	        /**
+	         * Fired when a pointer device button (usually a mouse left-button) is released over the display
+	         * object. DisplayObject's `interactive` property must be set to `true` to fire event.
+	         *
+	         * @event PIXI.DisplayObject#mouseup
+	         * @param {PIXI.interaction.InteractionEvent} event - Interaction event
+	         */
+
+	        /**
+	         * Fired when a pointer device secondary button (usually a mouse right-button) is released
+	         * over the display object. DisplayObject's `interactive` property must be set to `true` to fire event.
+	         *
+	         * @event PIXI.DisplayObject#rightup
+	         * @param {PIXI.interaction.InteractionEvent} event - Interaction event
+	         */
+
+	        /**
+	         * Fired when a pointer device button (usually a mouse left-button) is pressed and released on
+	         * the display object. DisplayObject's `interactive` property must be set to `true` to fire event.
+	         *
+	         * @event PIXI.DisplayObject#click
+	         * @param {PIXI.interaction.InteractionEvent} event - Interaction event
+	         */
+
+	        /**
+	         * Fired when a pointer device secondary button (usually a mouse right-button) is pressed
+	         * and released on the display object. DisplayObject's `interactive` property must be set to `true` to fire event.
+	         *
+	         * @event PIXI.DisplayObject#rightclick
+	         * @param {PIXI.interaction.InteractionEvent} event - Interaction event
+	         */
+
+	        /**
+	         * Fired when a pointer device button (usually a mouse left-button) is released outside the
+	         * display object that initially registered a
+	         * [mousedown]{@link PIXI.DisplayObject#event:mousedown}.
+	         * DisplayObject's `interactive` property must be set to `true` to fire event.
+	         *
+	         * @event PIXI.DisplayObject#mouseupoutside
+	         * @param {PIXI.interaction.InteractionEvent} event - Interaction event
+	         */
+
+	        /**
+	         * Fired when a pointer device secondary button (usually a mouse right-button) is released
+	         * outside the display object that initially registered a
+	         * [rightdown]{@link PIXI.DisplayObject#event:rightdown}.
+	         * DisplayObject's `interactive` property must be set to `true` to fire event.
+	         *
+	         * @event PIXI.DisplayObject#rightupoutside
+	         * @param {PIXI.interaction.InteractionEvent} event - Interaction event
+	         */
+
+	        /**
+	         * Fired when a pointer device (usually a mouse) is moved while over the display object.
+	         * DisplayObject's `interactive` property must be set to `true` to fire event.
+	         *
+	         * @event PIXI.DisplayObject#mousemove
+	         * @param {PIXI.interaction.InteractionEvent} event - Interaction event
+	         */
+
+	        /**
+	         * Fired when a pointer device (usually a mouse) is moved onto the display object.
+	         * DisplayObject's `interactive` property must be set to `true` to fire event.
+	         *
+	         * @event PIXI.DisplayObject#mouseover
+	         * @param {PIXI.interaction.InteractionEvent} event - Interaction event
+	         */
+
+	        /**
+	         * Fired when a pointer device (usually a mouse) is moved off the display object.
+	         * DisplayObject's `interactive` property must be set to `true` to fire event.
+	         *
+	         * @event PIXI.DisplayObject#mouseout
+	         * @param {PIXI.interaction.InteractionEvent} event - Interaction event
+	         */
+
+	        /**
+	         * Fired when a pointer device button is pressed on the display object.
+	         * DisplayObject's `interactive` property must be set to `true` to fire event.
+	         *
+	         * @event PIXI.DisplayObject#pointerdown
+	         * @param {PIXI.interaction.InteractionEvent} event - Interaction event
+	         */
+
+	        /**
+	         * Fired when a pointer device button is released over the display object.
+	         * DisplayObject's `interactive` property must be set to `true` to fire event.
+	         *
+	         * @event PIXI.DisplayObject#pointerup
+	         * @param {PIXI.interaction.InteractionEvent} event - Interaction event
+	         */
+
+	        /**
+	         * Fired when the operating system cancels a pointer event.
+	         * DisplayObject's `interactive` property must be set to `true` to fire event.
+	         *
+	         * @event PIXI.DisplayObject#pointercancel
+	         * @param {PIXI.interaction.InteractionEvent} event - Interaction event
+	         */
+
+	        /**
+	         * Fired when a pointer device button is pressed and released on the display object.
+	         * DisplayObject's `interactive` property must be set to `true` to fire event.
+	         *
+	         * @event PIXI.DisplayObject#pointertap
+	         * @param {PIXI.interaction.InteractionEvent} event - Interaction event
+	         */
+
+	        /**
+	         * Fired when a pointer device button is released outside the display object that initially
+	         * registered a [pointerdown]{@link PIXI.DisplayObject#event:pointerdown}.
+	         * DisplayObject's `interactive` property must be set to `true` to fire event.
+	         *
+	         * @event PIXI.DisplayObject#pointerupoutside
+	         * @param {PIXI.interaction.InteractionEvent} event - Interaction event
+	         */
+
+	        /**
+	         * Fired when a pointer device is moved while over the display object.
+	         * DisplayObject's `interactive` property must be set to `true` to fire event.
+	         *
+	         * @event PIXI.DisplayObject#pointermove
+	         * @param {PIXI.interaction.InteractionEvent} event - Interaction event
+	         */
+
+	        /**
+	         * Fired when a pointer device is moved onto the display object.
+	         * DisplayObject's `interactive` property must be set to `true` to fire event.
+	         *
+	         * @event PIXI.DisplayObject#pointerover
+	         * @param {PIXI.interaction.InteractionEvent} event - Interaction event
+	         */
+
+	        /**
+	         * Fired when a pointer device is moved off the display object.
+	         * DisplayObject's `interactive` property must be set to `true` to fire event.
+	         *
+	         * @event PIXI.DisplayObject#pointerout
+	         * @param {PIXI.interaction.InteractionEvent} event - Interaction event
+	         */
+
+	        /**
+	         * Fired when a touch point is placed on the display object.
+	         * DisplayObject's `interactive` property must be set to `true` to fire event.
+	         *
+	         * @event PIXI.DisplayObject#touchstart
+	         * @param {PIXI.interaction.InteractionEvent} event - Interaction event
+	         */
+
+	        /**
+	         * Fired when a touch point is removed from the display object.
+	         * DisplayObject's `interactive` property must be set to `true` to fire event.
+	         *
+	         * @event PIXI.DisplayObject#touchend
+	         * @param {PIXI.interaction.InteractionEvent} event - Interaction event
+	         */
+
+	        /**
+	         * Fired when the operating system cancels a touch.
+	         * DisplayObject's `interactive` property must be set to `true` to fire event.
+	         *
+	         * @event PIXI.DisplayObject#touchcancel
+	         * @param {PIXI.interaction.InteractionEvent} event - Interaction event
+	         */
+
+	        /**
+	         * Fired when a touch point is placed and removed from the display object.
+	         * DisplayObject's `interactive` property must be set to `true` to fire event.
+	         *
+	         * @event PIXI.DisplayObject#tap
+	         * @param {PIXI.interaction.InteractionEvent} event - Interaction event
+	         */
+
+	        /**
+	         * Fired when a touch point is removed outside of the display object that initially
+	         * registered a [touchstart]{@link PIXI.DisplayObject#event:touchstart}.
+	         * DisplayObject's `interactive` property must be set to `true` to fire event.
+	         *
+	         * @event PIXI.DisplayObject#touchendoutside
+	         * @param {PIXI.interaction.InteractionEvent} event - Interaction event
+	         */
+
+	        /**
+	         * Fired when a touch point is moved along the display object.
+	         * DisplayObject's `interactive` property must be set to `true` to fire event.
+	         *
+	         * @event PIXI.DisplayObject#touchmove
+	         * @param {PIXI.interaction.InteractionEvent} event - Interaction event
+	         */
+
+	        this.setTargetElement(this.renderer.view, this.renderer.resolution);
+	    }
+
+	    if ( EventEmitter ) { InteractionManager.__proto__ = EventEmitter; }
+	    InteractionManager.prototype = Object.create( EventEmitter && EventEmitter.prototype );
+	    InteractionManager.prototype.constructor = InteractionManager;
+
+	    /**
+	     * Hit tests a point against the display tree, returning the first interactive object that is hit.
+	     *
+	     * @param {PIXI.Point} globalPoint - A point to hit test with, in global space.
+	     * @param {PIXI.Container} [root] - The root display object to start from. If omitted, defaults
+	     * to the last rendered root of the associated renderer.
+	     * @return {PIXI.DisplayObject} The hit display object, if any.
+	     */
+	    InteractionManager.prototype.hitTest = function hitTest (globalPoint, root)
+	    {
+	        // clear the target for our hit test
+	        hitTestEvent.target = null;
+	        // assign the global point
+	        hitTestEvent.data.global = globalPoint;
+	        // ensure safety of the root
+	        if (!root)
+	        {
+	            root = this.renderer._lastObjectRendered;
+	        }
+	        // run the hit test
+	        this.processInteractive(hitTestEvent, root, null, true);
+	        // return our found object - it'll be null if we didn't hit anything
+
+	        return hitTestEvent.target;
+	    };
+
+	    /**
+	     * Sets the DOM element which will receive mouse/touch events. This is useful for when you have
+	     * other DOM elements on top of the renderers Canvas element. With this you'll be bale to delegate
+	     * another DOM element to receive those events.
+	     *
+	     * @param {HTMLElement} element - the DOM element which will receive mouse and touch events.
+	     * @param {number} [resolution=1] - The resolution / device pixel ratio of the new element (relative to the canvas).
+	     */
+	    InteractionManager.prototype.setTargetElement = function setTargetElement (element, resolution)
+	    {
+	        if ( resolution === void 0 ) { resolution = 1; }
+
+	        this.removeEvents();
+
+	        this.interactionDOMElement = element;
+
+	        this.resolution = resolution;
+
+	        this.addEvents();
+	    };
+
+	    /**
+	     * Registers all the DOM events
+	     *
+	     * @private
+	     */
+	    InteractionManager.prototype.addEvents = function addEvents ()
+	    {
+	        if (!this.interactionDOMElement)
+	        {
+	            return;
+	        }
+
+	        Ticker.system.add(this.update, this, UPDATE_PRIORITY.INTERACTION);
+
+	        if (window.navigator.msPointerEnabled)
+	        {
+	            this.interactionDOMElement.style['-ms-content-zooming'] = 'none';
+	            this.interactionDOMElement.style['-ms-touch-action'] = 'none';
+	        }
+	        else if (this.supportsPointerEvents)
+	        {
+	            this.interactionDOMElement.style['touch-action'] = 'none';
+	        }
+
+	        /**
+	         * These events are added first, so that if pointer events are normalized, they are fired
+	         * in the same order as non-normalized events. ie. pointer event 1st, mouse / touch 2nd
+	         */
+	        if (this.supportsPointerEvents)
+	        {
+	            window.document.addEventListener('pointermove', this.onPointerMove, true);
+	            this.interactionDOMElement.addEventListener('pointerdown', this.onPointerDown, true);
+	            // pointerout is fired in addition to pointerup (for touch events) and pointercancel
+	            // we already handle those, so for the purposes of what we do in onPointerOut, we only
+	            // care about the pointerleave event
+	            this.interactionDOMElement.addEventListener('pointerleave', this.onPointerOut, true);
+	            this.interactionDOMElement.addEventListener('pointerover', this.onPointerOver, true);
+	            window.addEventListener('pointercancel', this.onPointerCancel, true);
+	            window.addEventListener('pointerup', this.onPointerUp, true);
+	        }
+	        else
+	        {
+	            window.document.addEventListener('mousemove', this.onPointerMove, true);
+	            this.interactionDOMElement.addEventListener('mousedown', this.onPointerDown, true);
+	            this.interactionDOMElement.addEventListener('mouseout', this.onPointerOut, true);
+	            this.interactionDOMElement.addEventListener('mouseover', this.onPointerOver, true);
+	            window.addEventListener('mouseup', this.onPointerUp, true);
+	        }
+
+	        // always look directly for touch events so that we can provide original data
+	        // In a future version we should change this to being just a fallback and rely solely on
+	        // PointerEvents whenever available
+	        if (this.supportsTouchEvents)
+	        {
+	            this.interactionDOMElement.addEventListener('touchstart', this.onPointerDown, true);
+	            this.interactionDOMElement.addEventListener('touchcancel', this.onPointerCancel, true);
+	            this.interactionDOMElement.addEventListener('touchend', this.onPointerUp, true);
+	            this.interactionDOMElement.addEventListener('touchmove', this.onPointerMove, true);
+	        }
+
+	        this.eventsAdded = true;
+	    };
+
+	    /**
+	     * Removes all the DOM events that were previously registered
+	     *
+	     * @private
+	     */
+	    InteractionManager.prototype.removeEvents = function removeEvents ()
+	    {
+	        if (!this.interactionDOMElement)
+	        {
+	            return;
+	        }
+
+	        Ticker.system.remove(this.update, this);
+
+	        if (window.navigator.msPointerEnabled)
+	        {
+	            this.interactionDOMElement.style['-ms-content-zooming'] = '';
+	            this.interactionDOMElement.style['-ms-touch-action'] = '';
+	        }
+	        else if (this.supportsPointerEvents)
+	        {
+	            this.interactionDOMElement.style['touch-action'] = '';
+	        }
+
+	        if (this.supportsPointerEvents)
+	        {
+	            window.document.removeEventListener('pointermove', this.onPointerMove, true);
+	            this.interactionDOMElement.removeEventListener('pointerdown', this.onPointerDown, true);
+	            this.interactionDOMElement.removeEventListener('pointerleave', this.onPointerOut, true);
+	            this.interactionDOMElement.removeEventListener('pointerover', this.onPointerOver, true);
+	            window.removeEventListener('pointercancel', this.onPointerCancel, true);
+	            window.removeEventListener('pointerup', this.onPointerUp, true);
+	        }
+	        else
+	        {
+	            window.document.removeEventListener('mousemove', this.onPointerMove, true);
+	            this.interactionDOMElement.removeEventListener('mousedown', this.onPointerDown, true);
+	            this.interactionDOMElement.removeEventListener('mouseout', this.onPointerOut, true);
+	            this.interactionDOMElement.removeEventListener('mouseover', this.onPointerOver, true);
+	            window.removeEventListener('mouseup', this.onPointerUp, true);
+	        }
+
+	        if (this.supportsTouchEvents)
+	        {
+	            this.interactionDOMElement.removeEventListener('touchstart', this.onPointerDown, true);
+	            this.interactionDOMElement.removeEventListener('touchcancel', this.onPointerCancel, true);
+	            this.interactionDOMElement.removeEventListener('touchend', this.onPointerUp, true);
+	            this.interactionDOMElement.removeEventListener('touchmove', this.onPointerMove, true);
+	        }
+
+	        this.interactionDOMElement = null;
+
+	        this.eventsAdded = false;
+	    };
+
+	    /**
+	     * Updates the state of interactive objects.
+	     * Invoked by a throttled ticker update from {@link PIXI.Ticker.system}.
+	     *
+	     * @param {number} deltaTime - time delta since last tick
+	     */
+	    InteractionManager.prototype.update = function update (deltaTime)
+	    {
+	        this._deltaTime += deltaTime;
+
+	        if (this._deltaTime < this.interactionFrequency)
+	        {
+	            return;
+	        }
+
+	        this._deltaTime = 0;
+
+	        if (!this.interactionDOMElement)
+	        {
+	            return;
+	        }
+
+	        // if the user move the mouse this check has already been done using the mouse move!
+	        if (this.didMove)
+	        {
+	            this.didMove = false;
+
+	            return;
+	        }
+
+	        this.cursor = null;
+
+	        // Resets the flag as set by a stopPropagation call. This flag is usually reset by a user interaction of any kind,
+	        // but there was a scenario of a display object moving under a static mouse cursor.
+	        // In this case, mouseover and mouseevents would not pass the flag test in dispatchEvent function
+	        for (var k in this.activeInteractionData)
+	        {
+	            // eslint-disable-next-line no-prototype-builtins
+	            if (this.activeInteractionData.hasOwnProperty(k))
+	            {
+	                var interactionData = this.activeInteractionData[k];
+
+	                if (interactionData.originalEvent && interactionData.pointerType !== 'touch')
+	                {
+	                    var interactionEvent = this.configureInteractionEventForDOMEvent(
+	                        this.eventData,
+	                        interactionData.originalEvent,
+	                        interactionData
+	                    );
+
+	                    this.processInteractive(
+	                        interactionEvent,
+	                        this.renderer._lastObjectRendered,
+	                        this.processPointerOverOut,
+	                        true
+	                    );
+	                }
+	            }
+	        }
+
+	        this.setCursorMode(this.cursor);
+	    };
+
+	    /**
+	     * Sets the current cursor mode, handling any callbacks or CSS style changes.
+	     *
+	     * @param {string} mode - cursor mode, a key from the cursorStyles dictionary
+	     */
+	    InteractionManager.prototype.setCursorMode = function setCursorMode (mode)
+	    {
+	        mode = mode || 'default';
+	        // if the mode didn't actually change, bail early
+	        if (this.currentCursorMode === mode)
+	        {
+	            return;
+	        }
+	        this.currentCursorMode = mode;
+	        var style = this.cursorStyles[mode];
+
+	        // only do things if there is a cursor style for it
+	        if (style)
+	        {
+	            switch (typeof style)
+	            {
+	                case 'string':
+	                    // string styles are handled as cursor CSS
+	                    this.interactionDOMElement.style.cursor = style;
+	                    break;
+	                case 'function':
+	                    // functions are just called, and passed the cursor mode
+	                    style(mode);
+	                    break;
+	                case 'object':
+	                    // if it is an object, assume that it is a dictionary of CSS styles,
+	                    // apply it to the interactionDOMElement
+	                    Object.assign(this.interactionDOMElement.style, style);
+	                    break;
+	            }
+	        }
+	        else if (typeof mode === 'string' && !Object.prototype.hasOwnProperty.call(this.cursorStyles, mode))
+	        {
+	            // if it mode is a string (not a Symbol) and cursorStyles doesn't have any entry
+	            // for the mode, then assume that the dev wants it to be CSS for the cursor.
+	            this.interactionDOMElement.style.cursor = mode;
+	        }
+	    };
+
+	    /**
+	     * Dispatches an event on the display object that was interacted with
+	     *
+	     * @param {PIXI.Container|PIXI.Sprite|PIXI.TilingSprite} displayObject - the display object in question
+	     * @param {string} eventString - the name of the event (e.g, mousedown)
+	     * @param {object} eventData - the event data object
+	     * @private
+	     */
+	    InteractionManager.prototype.dispatchEvent = function dispatchEvent (displayObject, eventString, eventData)
+	    {
+	        // Even if the event was stopped, at least dispatch any remaining events
+	        // for the same display object.
+	        if (!eventData.stopPropagationHint || displayObject === eventData.stopsPropagatingAt)
+	        {
+	            eventData.currentTarget = displayObject;
+	            eventData.type = eventString;
+
+	            displayObject.emit(eventString, eventData);
+
+	            if (displayObject[eventString])
+	            {
+	                displayObject[eventString](eventData);
+	            }
+	        }
+	    };
+
+	    /**
+	     * Puts a event on a queue to be dispatched later. This is used to guarantee correct
+	     * ordering of over/out events.
+	     *
+	     * @param {PIXI.Container|PIXI.Sprite|PIXI.TilingSprite} displayObject - the display object in question
+	     * @param {string} eventString - the name of the event (e.g, mousedown)
+	     * @param {object} eventData - the event data object
+	     * @private
+	     */
+	    InteractionManager.prototype.delayDispatchEvent = function delayDispatchEvent (displayObject, eventString, eventData)
+	    {
+	        this.delayedEvents.push({ displayObject: displayObject, eventString: eventString, eventData: eventData });
+	    };
+
+	    /**
+	     * Maps x and y coords from a DOM object and maps them correctly to the PixiJS view. The
+	     * resulting value is stored in the point. This takes into account the fact that the DOM
+	     * element could be scaled and positioned anywhere on the screen.
+	     *
+	     * @param  {PIXI.Point} point - the point that the result will be stored in
+	     * @param  {number} x - the x coord of the position to map
+	     * @param  {number} y - the y coord of the position to map
+	     */
+	    InteractionManager.prototype.mapPositionToPoint = function mapPositionToPoint (point, x, y)
+	    {
+	        var rect;
+
+	        // IE 11 fix
+	        if (!this.interactionDOMElement.parentElement)
+	        {
+	            rect = { x: 0, y: 0, width: 0, height: 0 };
+	        }
+	        else
+	        {
+	            rect = this.interactionDOMElement.getBoundingClientRect();
+	        }
+
+	        var resolutionMultiplier = 1.0 / this.resolution;
+
+	        point.x = ((x - rect.left) * (this.interactionDOMElement.width / rect.width)) * resolutionMultiplier;
+	        point.y = ((y - rect.top) * (this.interactionDOMElement.height / rect.height)) * resolutionMultiplier;
+	    };
+
+	    /**
+	     * This function is provides a neat way of crawling through the scene graph and running a
+	     * specified function on all interactive objects it finds. It will also take care of hit
+	     * testing the interactive objects and passes the hit across in the function.
+	     *
+	     * @protected
+	     * @param {PIXI.interaction.InteractionEvent} interactionEvent - event containing the point that
+	     *  is tested for collision
+	     * @param {PIXI.Container|PIXI.Sprite|PIXI.TilingSprite} displayObject - the displayObject
+	     *  that will be hit test (recursively crawls its children)
+	     * @param {Function} [func] - the function that will be called on each interactive object. The
+	     *  interactionEvent, displayObject and hit will be passed to the function
+	     * @param {boolean} [hitTest] - this indicates if the objects inside should be hit test against the point
+	     * @param {boolean} [interactive] - Whether the displayObject is interactive
+	     * @param {boolean} [skipDelayed] - Whether to process delayed events before returning. This is
+	     *  used to avoid processing them too early during recursive calls.
+	     * @return {boolean} returns true if the displayObject hit the point
+	     */
+	    InteractionManager.prototype.processInteractive = function processInteractive (interactionEvent, displayObject, func, hitTest, interactive, skipDelayed)
+	    {
+	        if (!displayObject || !displayObject.visible)
+	        {
+	            return false;
+	        }
+
+	        var point = interactionEvent.data.global;
+
+	        // Took a little while to rework this function correctly! But now it is done and nice and optimized! ^_^
+	        //
+	        // This function will now loop through all objects and then only hit test the objects it HAS
+	        // to, not all of them. MUCH faster..
+	        // An object will be hit test if the following is true:
+	        //
+	        // 1: It is interactive.
+	        // 2: It belongs to a parent that is interactive AND one of the parents children have not already been hit.
+	        //
+	        // As another little optimization once an interactive object has been hit we can carry on
+	        // through the scenegraph, but we know that there will be no more hits! So we can avoid extra hit tests
+	        // A final optimization is that an object is not hit test directly if a child has already been hit.
+
+	        interactive = displayObject.interactive || interactive;
+
+	        var hit = false;
+	        var interactiveParent = interactive;
+
+	        // Flag here can set to false if the event is outside the parents hitArea or mask
+	        var hitTestChildren = true;
+
+	        // If there is a hitArea, no need to test against anything else if the pointer is not within the hitArea
+	        // There is also no longer a need to hitTest children.
+	        if (displayObject.hitArea)
+	        {
+	            if (hitTest)
+	            {
+	                displayObject.worldTransform.applyInverse(point, this._tempPoint);
+	                if (!displayObject.hitArea.contains(this._tempPoint.x, this._tempPoint.y))
+	                {
+	                    hitTest = false;
+	                    hitTestChildren = false;
+	                }
+	                else
+	                {
+	                    hit = true;
+	                }
+	            }
+	            interactiveParent = false;
+	        }
+	        // If there is a mask, no need to hitTest against anything else if the pointer is not within the mask.
+	        // We still want to hitTestChildren, however, to ensure a mouseout can still be generated.
+	        // https://github.com/pixijs/pixi.js/issues/5135
+	        else if (displayObject._mask)
+	        {
+	            if (hitTest)
+	            {
+	                if (!(displayObject._mask.containsPoint && displayObject._mask.containsPoint(point)))
+	                {
+	                    hitTest = false;
+	                }
+	            }
+	        }
+
+	        // ** FREE TIP **! If an object is not interactive or has no buttons in it
+	        // (such as a game scene!) set interactiveChildren to false for that displayObject.
+	        // This will allow PixiJS to completely ignore and bypass checking the displayObjects children.
+	        if (hitTestChildren && displayObject.interactiveChildren && displayObject.children)
+	        {
+	            var children = displayObject.children;
+
+	            for (var i = children.length - 1; i >= 0; i--)
+	            {
+	                var child = children[i];
+
+	                // time to get recursive.. if this function will return if something is hit..
+	                var childHit = this.processInteractive(interactionEvent, child, func, hitTest, interactiveParent, true);
+
+	                if (childHit)
+	                {
+	                    // its a good idea to check if a child has lost its parent.
+	                    // this means it has been removed whilst looping so its best
+	                    if (!child.parent)
+	                    {
+	                        continue;
+	                    }
+
+	                    // we no longer need to hit test any more objects in this container as we we
+	                    // now know the parent has been hit
+	                    interactiveParent = false;
+
+	                    // If the child is interactive , that means that the object hit was actually
+	                    // interactive and not just the child of an interactive object.
+	                    // This means we no longer need to hit test anything else. We still need to run
+	                    // through all objects, but we don't need to perform any hit tests.
+
+	                    if (childHit)
+	                    {
+	                        if (interactionEvent.target)
+	                        {
+	                            hitTest = false;
+	                        }
+	                        hit = true;
+	                    }
+	                }
+	            }
+	        }
+
+	        // no point running this if the item is not interactive or does not have an interactive parent.
+	        if (interactive)
+	        {
+	            // if we are hit testing (as in we have no hit any objects yet)
+	            // We also don't need to worry about hit testing if once of the displayObjects children
+	            // has already been hit - but only if it was interactive, otherwise we need to keep
+	            // looking for an interactive child, just in case we hit one
+	            if (hitTest && !interactionEvent.target)
+	            {
+	                // already tested against hitArea if it is defined
+	                if (!displayObject.hitArea && displayObject.containsPoint)
+	                {
+	                    if (displayObject.containsPoint(point))
+	                    {
+	                        hit = true;
+	                    }
+	                }
+	            }
+
+	            if (displayObject.interactive)
+	            {
+	                if (hit && !interactionEvent.target)
+	                {
+	                    interactionEvent.target = displayObject;
+	                }
+
+	                if (func)
+	                {
+	                    func(interactionEvent, displayObject, !!hit);
+	                }
+	            }
+	        }
+
+	        var delayedEvents = this.delayedEvents;
+
+	        if (delayedEvents.length && !skipDelayed)
+	        {
+	            // Reset the propagation hint, because we start deeper in the tree again.
+	            interactionEvent.stopPropagationHint = false;
+
+	            var delayedLen = delayedEvents.length;
+
+	            this.delayedEvents = [];
+
+	            for (var i$1 = 0; i$1 < delayedLen; i$1++)
+	            {
+	                var ref = delayedEvents[i$1];
+	                var displayObject$1 = ref.displayObject;
+	                var eventString = ref.eventString;
+	                var eventData = ref.eventData;
+
+	                // When we reach the object we wanted to stop propagating at,
+	                // set the propagation hint.
+	                if (eventData.stopsPropagatingAt === displayObject$1)
+	                {
+	                    eventData.stopPropagationHint = true;
+	                }
+
+	                this.dispatchEvent(displayObject$1, eventString, eventData);
+	            }
+	        }
+
+	        return hit;
+	    };
+
+	    /**
+	     * Is called when the pointer button is pressed down on the renderer element
+	     *
+	     * @private
+	     * @param {PointerEvent} originalEvent - The DOM event of a pointer button being pressed down
+	     */
+	    InteractionManager.prototype.onPointerDown = function onPointerDown (originalEvent)
+	    {
+	        // if we support touch events, then only use those for touch events, not pointer events
+	        if (this.supportsTouchEvents && originalEvent.pointerType === 'touch') { return; }
+
+	        var events = this.normalizeToPointerData(originalEvent);
+
+	        /**
+	         * No need to prevent default on natural pointer events, as there are no side effects
+	         * Normalized events, however, may have the double mousedown/touchstart issue on the native android browser,
+	         * so still need to be prevented.
+	         */
+
+	        // Guaranteed that there will be at least one event in events, and all events must have the same pointer type
+
+	        if (this.autoPreventDefault && events[0].isNormalized)
+	        {
+	            var cancelable = originalEvent.cancelable || !('cancelable' in originalEvent);
+
+	            if (cancelable)
+	            {
+	                originalEvent.preventDefault();
+	            }
+	        }
+
+	        var eventLen = events.length;
+
+	        for (var i = 0; i < eventLen; i++)
+	        {
+	            var event = events[i];
+
+	            var interactionData = this.getInteractionDataForPointerId(event);
+
+	            var interactionEvent = this.configureInteractionEventForDOMEvent(this.eventData, event, interactionData);
+
+	            interactionEvent.data.originalEvent = originalEvent;
+
+	            this.processInteractive(interactionEvent, this.renderer._lastObjectRendered, this.processPointerDown, true);
+
+	            this.emit('pointerdown', interactionEvent);
+	            if (event.pointerType === 'touch')
+	            {
+	                this.emit('touchstart', interactionEvent);
+	            }
+	            // emit a mouse event for "pen" pointers, the way a browser would emit a fallback event
+	            else if (event.pointerType === 'mouse' || event.pointerType === 'pen')
+	            {
+	                var isRightButton = event.button === 2;
+
+	                this.emit(isRightButton ? 'rightdown' : 'mousedown', this.eventData);
+	            }
+	        }
+	    };
+
+	    /**
+	     * Processes the result of the pointer down check and dispatches the event if need be
+	     *
+	     * @private
+	     * @param {PIXI.interaction.InteractionEvent} interactionEvent - The interaction event wrapping the DOM event
+	     * @param {PIXI.Container|PIXI.Sprite|PIXI.TilingSprite} displayObject - The display object that was tested
+	     * @param {boolean} hit - the result of the hit test on the display object
+	     */
+	    InteractionManager.prototype.processPointerDown = function processPointerDown (interactionEvent, displayObject, hit)
+	    {
+	        var data = interactionEvent.data;
+	        var id = interactionEvent.data.identifier;
+
+	        if (hit)
+	        {
+	            if (!displayObject.trackedPointers[id])
+	            {
+	                displayObject.trackedPointers[id] = new InteractionTrackingData(id);
+	            }
+	            this.dispatchEvent(displayObject, 'pointerdown', interactionEvent);
+
+	            if (data.pointerType === 'touch')
+	            {
+	                this.dispatchEvent(displayObject, 'touchstart', interactionEvent);
+	            }
+	            else if (data.pointerType === 'mouse' || data.pointerType === 'pen')
+	            {
+	                var isRightButton = data.button === 2;
+
+	                if (isRightButton)
+	                {
+	                    displayObject.trackedPointers[id].rightDown = true;
+	                }
+	                else
+	                {
+	                    displayObject.trackedPointers[id].leftDown = true;
+	                }
+
+	                this.dispatchEvent(displayObject, isRightButton ? 'rightdown' : 'mousedown', interactionEvent);
+	            }
+	        }
+	    };
+
+	    /**
+	     * Is called when the pointer button is released on the renderer element
+	     *
+	     * @private
+	     * @param {PointerEvent} originalEvent - The DOM event of a pointer button being released
+	     * @param {boolean} cancelled - true if the pointer is cancelled
+	     * @param {Function} func - Function passed to {@link processInteractive}
+	     */
+	    InteractionManager.prototype.onPointerComplete = function onPointerComplete (originalEvent, cancelled, func)
+	    {
+	        var events = this.normalizeToPointerData(originalEvent);
+
+	        var eventLen = events.length;
+
+	        // if the event wasn't targeting our canvas, then consider it to be pointerupoutside
+	        // in all cases (unless it was a pointercancel)
+	        var eventAppend = originalEvent.target !== this.interactionDOMElement ? 'outside' : '';
+
+	        for (var i = 0; i < eventLen; i++)
+	        {
+	            var event = events[i];
+
+	            var interactionData = this.getInteractionDataForPointerId(event);
+
+	            var interactionEvent = this.configureInteractionEventForDOMEvent(this.eventData, event, interactionData);
+
+	            interactionEvent.data.originalEvent = originalEvent;
+
+	            // perform hit testing for events targeting our canvas or cancel events
+	            this.processInteractive(interactionEvent, this.renderer._lastObjectRendered, func, cancelled || !eventAppend);
+
+	            this.emit(cancelled ? 'pointercancel' : ("pointerup" + eventAppend), interactionEvent);
+
+	            if (event.pointerType === 'mouse' || event.pointerType === 'pen')
+	            {
+	                var isRightButton = event.button === 2;
+
+	                this.emit(isRightButton ? ("rightup" + eventAppend) : ("mouseup" + eventAppend), interactionEvent);
+	            }
+	            else if (event.pointerType === 'touch')
+	            {
+	                this.emit(cancelled ? 'touchcancel' : ("touchend" + eventAppend), interactionEvent);
+	                this.releaseInteractionDataForPointerId(event.pointerId, interactionData);
+	            }
+	        }
+	    };
+
+	    /**
+	     * Is called when the pointer button is cancelled
+	     *
+	     * @private
+	     * @param {PointerEvent} event - The DOM event of a pointer button being released
+	     */
+	    InteractionManager.prototype.onPointerCancel = function onPointerCancel (event)
+	    {
+	        // if we support touch events, then only use those for touch events, not pointer events
+	        if (this.supportsTouchEvents && event.pointerType === 'touch') { return; }
+
+	        this.onPointerComplete(event, true, this.processPointerCancel);
+	    };
+
+	    /**
+	     * Processes the result of the pointer cancel check and dispatches the event if need be
+	     *
+	     * @private
+	     * @param {PIXI.interaction.InteractionEvent} interactionEvent - The interaction event wrapping the DOM event
+	     * @param {PIXI.Container|PIXI.Sprite|PIXI.TilingSprite} displayObject - The display object that was tested
+	     */
+	    InteractionManager.prototype.processPointerCancel = function processPointerCancel (interactionEvent, displayObject)
+	    {
+	        var data = interactionEvent.data;
+
+	        var id = interactionEvent.data.identifier;
+
+	        if (displayObject.trackedPointers[id] !== undefined)
+	        {
+	            delete displayObject.trackedPointers[id];
+	            this.dispatchEvent(displayObject, 'pointercancel', interactionEvent);
+
+	            if (data.pointerType === 'touch')
+	            {
+	                this.dispatchEvent(displayObject, 'touchcancel', interactionEvent);
+	            }
+	        }
+	    };
+
+	    /**
+	     * Is called when the pointer button is released on the renderer element
+	     *
+	     * @private
+	     * @param {PointerEvent} event - The DOM event of a pointer button being released
+	     */
+	    InteractionManager.prototype.onPointerUp = function onPointerUp (event)
+	    {
+	        // if we support touch events, then only use those for touch events, not pointer events
+	        if (this.supportsTouchEvents && event.pointerType === 'touch') { return; }
+
+	        this.onPointerComplete(event, false, this.processPointerUp);
+	    };
+
+	    /**
+	     * Processes the result of the pointer up check and dispatches the event if need be
+	     *
+	     * @private
+	     * @param {PIXI.interaction.InteractionEvent} interactionEvent - The interaction event wrapping the DOM event
+	     * @param {PIXI.Container|PIXI.Sprite|PIXI.TilingSprite} displayObject - The display object that was tested
+	     * @param {boolean} hit - the result of the hit test on the display object
+	     */
+	    InteractionManager.prototype.processPointerUp = function processPointerUp (interactionEvent, displayObject, hit)
+	    {
+	        var data = interactionEvent.data;
+
+	        var id = interactionEvent.data.identifier;
+
+	        var trackingData = displayObject.trackedPointers[id];
+
+	        var isTouch = data.pointerType === 'touch';
+
+	        var isMouse = (data.pointerType === 'mouse' || data.pointerType === 'pen');
+	        // need to track mouse down status in the mouse block so that we can emit
+	        // event in a later block
+	        var isMouseTap = false;
+
+	        // Mouse only
+	        if (isMouse)
+	        {
+	            var isRightButton = data.button === 2;
+
+	            var flags = InteractionTrackingData.FLAGS;
+
+	            var test = isRightButton ? flags.RIGHT_DOWN : flags.LEFT_DOWN;
+
+	            var isDown = trackingData !== undefined && (trackingData.flags & test);
+
+	            if (hit)
+	            {
+	                this.dispatchEvent(displayObject, isRightButton ? 'rightup' : 'mouseup', interactionEvent);
+
+	                if (isDown)
+	                {
+	                    this.dispatchEvent(displayObject, isRightButton ? 'rightclick' : 'click', interactionEvent);
+	                    // because we can confirm that the mousedown happened on this object, flag for later emit of pointertap
+	                    isMouseTap = true;
+	                }
+	            }
+	            else if (isDown)
+	            {
+	                this.dispatchEvent(displayObject, isRightButton ? 'rightupoutside' : 'mouseupoutside', interactionEvent);
+	            }
+	            // update the down state of the tracking data
+	            if (trackingData)
+	            {
+	                if (isRightButton)
+	                {
+	                    trackingData.rightDown = false;
+	                }
+	                else
+	                {
+	                    trackingData.leftDown = false;
+	                }
+	            }
+	        }
+
+	        // Pointers and Touches, and Mouse
+	        if (hit)
+	        {
+	            this.dispatchEvent(displayObject, 'pointerup', interactionEvent);
+	            if (isTouch) { this.dispatchEvent(displayObject, 'touchend', interactionEvent); }
+
+	            if (trackingData)
+	            {
+	                // emit pointertap if not a mouse, or if the mouse block decided it was a tap
+	                if (!isMouse || isMouseTap)
+	                {
+	                    this.dispatchEvent(displayObject, 'pointertap', interactionEvent);
+	                }
+	                if (isTouch)
+	                {
+	                    this.dispatchEvent(displayObject, 'tap', interactionEvent);
+	                    // touches are no longer over (if they ever were) when we get the touchend
+	                    // so we should ensure that we don't keep pretending that they are
+	                    trackingData.over = false;
+	                }
+	            }
+	        }
+	        else if (trackingData)
+	        {
+	            this.dispatchEvent(displayObject, 'pointerupoutside', interactionEvent);
+	            if (isTouch) { this.dispatchEvent(displayObject, 'touchendoutside', interactionEvent); }
+	        }
+	        // Only remove the tracking data if there is no over/down state still associated with it
+	        if (trackingData && trackingData.none)
+	        {
+	            delete displayObject.trackedPointers[id];
+	        }
+	    };
+
+	    /**
+	     * Is called when the pointer moves across the renderer element
+	     *
+	     * @private
+	     * @param {PointerEvent} originalEvent - The DOM event of a pointer moving
+	     */
+	    InteractionManager.prototype.onPointerMove = function onPointerMove (originalEvent)
+	    {
+	        // if we support touch events, then only use those for touch events, not pointer events
+	        if (this.supportsTouchEvents && originalEvent.pointerType === 'touch') { return; }
+
+	        var events = this.normalizeToPointerData(originalEvent);
+
+	        if (events[0].pointerType === 'mouse' || events[0].pointerType === 'pen')
+	        {
+	            this.didMove = true;
+
+	            this.cursor = null;
+	        }
+
+	        var eventLen = events.length;
+
+	        for (var i = 0; i < eventLen; i++)
+	        {
+	            var event = events[i];
+
+	            var interactionData = this.getInteractionDataForPointerId(event);
+
+	            var interactionEvent = this.configureInteractionEventForDOMEvent(this.eventData, event, interactionData);
+
+	            interactionEvent.data.originalEvent = originalEvent;
+
+	            this.processInteractive(interactionEvent, this.renderer._lastObjectRendered, this.processPointerMove, true);
+
+	            this.emit('pointermove', interactionEvent);
+	            if (event.pointerType === 'touch') { this.emit('touchmove', interactionEvent); }
+	            if (event.pointerType === 'mouse' || event.pointerType === 'pen') { this.emit('mousemove', interactionEvent); }
+	        }
+
+	        if (events[0].pointerType === 'mouse')
+	        {
+	            this.setCursorMode(this.cursor);
+
+	            // TODO BUG for parents interactive object (border order issue)
+	        }
+	    };
+
+	    /**
+	     * Processes the result of the pointer move check and dispatches the event if need be
+	     *
+	     * @private
+	     * @param {PIXI.interaction.InteractionEvent} interactionEvent - The interaction event wrapping the DOM event
+	     * @param {PIXI.Container|PIXI.Sprite|PIXI.TilingSprite} displayObject - The display object that was tested
+	     * @param {boolean} hit - the result of the hit test on the display object
+	     */
+	    InteractionManager.prototype.processPointerMove = function processPointerMove (interactionEvent, displayObject, hit)
+	    {
+	        var data = interactionEvent.data;
+
+	        var isTouch = data.pointerType === 'touch';
+
+	        var isMouse = (data.pointerType === 'mouse' || data.pointerType === 'pen');
+
+	        if (isMouse)
+	        {
+	            this.processPointerOverOut(interactionEvent, displayObject, hit);
+	        }
+
+	        if (!this.moveWhenInside || hit)
+	        {
+	            this.dispatchEvent(displayObject, 'pointermove', interactionEvent);
+	            if (isTouch) { this.dispatchEvent(displayObject, 'touchmove', interactionEvent); }
+	            if (isMouse) { this.dispatchEvent(displayObject, 'mousemove', interactionEvent); }
+	        }
+	    };
+
+	    /**
+	     * Is called when the pointer is moved out of the renderer element
+	     *
+	     * @private
+	     * @param {PointerEvent} originalEvent - The DOM event of a pointer being moved out
+	     */
+	    InteractionManager.prototype.onPointerOut = function onPointerOut (originalEvent)
+	    {
+	        // if we support touch events, then only use those for touch events, not pointer events
+	        if (this.supportsTouchEvents && originalEvent.pointerType === 'touch') { return; }
+
+	        var events = this.normalizeToPointerData(originalEvent);
+
+	        // Only mouse and pointer can call onPointerOut, so events will always be length 1
+	        var event = events[0];
+
+	        if (event.pointerType === 'mouse')
+	        {
+	            this.mouseOverRenderer = false;
+	            this.setCursorMode(null);
+	        }
+
+	        var interactionData = this.getInteractionDataForPointerId(event);
+
+	        var interactionEvent = this.configureInteractionEventForDOMEvent(this.eventData, event, interactionData);
+
+	        interactionEvent.data.originalEvent = event;
+
+	        this.processInteractive(interactionEvent, this.renderer._lastObjectRendered, this.processPointerOverOut, false);
+
+	        this.emit('pointerout', interactionEvent);
+	        if (event.pointerType === 'mouse' || event.pointerType === 'pen')
+	        {
+	            this.emit('mouseout', interactionEvent);
+	        }
+	        else
+	        {
+	            // we can get touchleave events after touchend, so we want to make sure we don't
+	            // introduce memory leaks
+	            this.releaseInteractionDataForPointerId(interactionData.identifier);
+	        }
+	    };
+
+	    /**
+	     * Processes the result of the pointer over/out check and dispatches the event if need be
+	     *
+	     * @private
+	     * @param {PIXI.interaction.InteractionEvent} interactionEvent - The interaction event wrapping the DOM event
+	     * @param {PIXI.Container|PIXI.Sprite|PIXI.TilingSprite} displayObject - The display object that was tested
+	     * @param {boolean} hit - the result of the hit test on the display object
+	     */
+	    InteractionManager.prototype.processPointerOverOut = function processPointerOverOut (interactionEvent, displayObject, hit)
+	    {
+	        var data = interactionEvent.data;
+
+	        var id = interactionEvent.data.identifier;
+
+	        var isMouse = (data.pointerType === 'mouse' || data.pointerType === 'pen');
+
+	        var trackingData = displayObject.trackedPointers[id];
+
+	        // if we just moused over the display object, then we need to track that state
+	        if (hit && !trackingData)
+	        {
+	            trackingData = displayObject.trackedPointers[id] = new InteractionTrackingData(id);
+	        }
+
+	        if (trackingData === undefined) { return; }
+
+	        if (hit && this.mouseOverRenderer)
+	        {
+	            if (!trackingData.over)
+	            {
+	                trackingData.over = true;
+	                this.delayDispatchEvent(displayObject, 'pointerover', interactionEvent);
+	                if (isMouse)
+	                {
+	                    this.delayDispatchEvent(displayObject, 'mouseover', interactionEvent);
+	                }
+	            }
+
+	            // only change the cursor if it has not already been changed (by something deeper in the
+	            // display tree)
+	            if (isMouse && this.cursor === null)
+	            {
+	                this.cursor = displayObject.cursor;
+	            }
+	        }
+	        else if (trackingData.over)
+	        {
+	            trackingData.over = false;
+	            this.dispatchEvent(displayObject, 'pointerout', this.eventData);
+	            if (isMouse)
+	            {
+	                this.dispatchEvent(displayObject, 'mouseout', interactionEvent);
+	            }
+	            // if there is no mouse down information for the pointer, then it is safe to delete
+	            if (trackingData.none)
+	            {
+	                delete displayObject.trackedPointers[id];
+	            }
+	        }
+	    };
+
+	    /**
+	     * Is called when the pointer is moved into the renderer element
+	     *
+	     * @private
+	     * @param {PointerEvent} originalEvent - The DOM event of a pointer button being moved into the renderer view
+	     */
+	    InteractionManager.prototype.onPointerOver = function onPointerOver (originalEvent)
+	    {
+	        var events = this.normalizeToPointerData(originalEvent);
+
+	        // Only mouse and pointer can call onPointerOver, so events will always be length 1
+	        var event = events[0];
+
+	        var interactionData = this.getInteractionDataForPointerId(event);
+
+	        var interactionEvent = this.configureInteractionEventForDOMEvent(this.eventData, event, interactionData);
+
+	        interactionEvent.data.originalEvent = event;
+
+	        if (event.pointerType === 'mouse')
+	        {
+	            this.mouseOverRenderer = true;
+	        }
+
+	        this.emit('pointerover', interactionEvent);
+	        if (event.pointerType === 'mouse' || event.pointerType === 'pen')
+	        {
+	            this.emit('mouseover', interactionEvent);
+	        }
+	    };
+
+	    /**
+	     * Get InteractionData for a given pointerId. Store that data as well
+	     *
+	     * @private
+	     * @param {PointerEvent} event - Normalized pointer event, output from normalizeToPointerData
+	     * @return {PIXI.interaction.InteractionData} - Interaction data for the given pointer identifier
+	     */
+	    InteractionManager.prototype.getInteractionDataForPointerId = function getInteractionDataForPointerId (event)
+	    {
+	        var pointerId = event.pointerId;
+
+	        var interactionData;
+
+	        if (pointerId === MOUSE_POINTER_ID || event.pointerType === 'mouse')
+	        {
+	            interactionData = this.mouse;
+	        }
+	        else if (this.activeInteractionData[pointerId])
+	        {
+	            interactionData = this.activeInteractionData[pointerId];
+	        }
+	        else
+	        {
+	            interactionData = this.interactionDataPool.pop() || new InteractionData();
+	            interactionData.identifier = pointerId;
+	            this.activeInteractionData[pointerId] = interactionData;
+	        }
+	        // copy properties from the event, so that we can make sure that touch/pointer specific
+	        // data is available
+	        interactionData.copyEvent(event);
+
+	        return interactionData;
+	    };
+
+	    /**
+	     * Return unused InteractionData to the pool, for a given pointerId
+	     *
+	     * @private
+	     * @param {number} pointerId - Identifier from a pointer event
+	     */
+	    InteractionManager.prototype.releaseInteractionDataForPointerId = function releaseInteractionDataForPointerId (pointerId)
+	    {
+	        var interactionData = this.activeInteractionData[pointerId];
+
+	        if (interactionData)
+	        {
+	            delete this.activeInteractionData[pointerId];
+	            interactionData.reset();
+	            this.interactionDataPool.push(interactionData);
+	        }
+	    };
+
+	    /**
+	     * Configure an InteractionEvent to wrap a DOM PointerEvent and InteractionData
+	     *
+	     * @private
+	     * @param {PIXI.interaction.InteractionEvent} interactionEvent - The event to be configured
+	     * @param {PointerEvent} pointerEvent - The DOM event that will be paired with the InteractionEvent
+	     * @param {PIXI.interaction.InteractionData} interactionData - The InteractionData that will be paired
+	     *        with the InteractionEvent
+	     * @return {PIXI.interaction.InteractionEvent} the interaction event that was passed in
+	     */
+	    InteractionManager.prototype.configureInteractionEventForDOMEvent = function configureInteractionEventForDOMEvent (interactionEvent, pointerEvent, interactionData)
+	    {
+	        interactionEvent.data = interactionData;
+
+	        this.mapPositionToPoint(interactionData.global, pointerEvent.clientX, pointerEvent.clientY);
+
+	        // Not really sure why this is happening, but it's how a previous version handled things
+	        if (pointerEvent.pointerType === 'touch')
+	        {
+	            pointerEvent.globalX = interactionData.global.x;
+	            pointerEvent.globalY = interactionData.global.y;
+	        }
+
+	        interactionData.originalEvent = pointerEvent;
+	        interactionEvent.reset();
+
+	        return interactionEvent;
+	    };
+
+	    /**
+	     * Ensures that the original event object contains all data that a regular pointer event would have
+	     *
+	     * @private
+	     * @param {TouchEvent|MouseEvent|PointerEvent} event - The original event data from a touch or mouse event
+	     * @return {PointerEvent[]} An array containing a single normalized pointer event, in the case of a pointer
+	     *  or mouse event, or a multiple normalized pointer events if there are multiple changed touches
+	     */
+	    InteractionManager.prototype.normalizeToPointerData = function normalizeToPointerData (event)
+	    {
+	        var normalizedEvents = [];
+
+	        if (this.supportsTouchEvents && event instanceof TouchEvent)
+	        {
+	            for (var i = 0, li = event.changedTouches.length; i < li; i++)
+	            {
+	                var touch = event.changedTouches[i];
+
+	                if (typeof touch.button === 'undefined') { touch.button = event.touches.length ? 1 : 0; }
+	                if (typeof touch.buttons === 'undefined') { touch.buttons = event.touches.length ? 1 : 0; }
+	                if (typeof touch.isPrimary === 'undefined')
+	                {
+	                    touch.isPrimary = event.touches.length === 1 && event.type === 'touchstart';
+	                }
+	                if (typeof touch.width === 'undefined') { touch.width = touch.radiusX || 1; }
+	                if (typeof touch.height === 'undefined') { touch.height = touch.radiusY || 1; }
+	                if (typeof touch.tiltX === 'undefined') { touch.tiltX = 0; }
+	                if (typeof touch.tiltY === 'undefined') { touch.tiltY = 0; }
+	                if (typeof touch.pointerType === 'undefined') { touch.pointerType = 'touch'; }
+	                if (typeof touch.pointerId === 'undefined') { touch.pointerId = touch.identifier || 0; }
+	                if (typeof touch.pressure === 'undefined') { touch.pressure = touch.force || 0.5; }
+	                if (typeof touch.twist === 'undefined') { touch.twist = 0; }
+	                if (typeof touch.tangentialPressure === 'undefined') { touch.tangentialPressure = 0; }
+	                // TODO: Remove these, as layerX/Y is not a standard, is deprecated, has uneven
+	                // support, and the fill ins are not quite the same
+	                // offsetX/Y might be okay, but is not the same as clientX/Y when the canvas's top
+	                // left is not 0,0 on the page
+	                if (typeof touch.layerX === 'undefined') { touch.layerX = touch.offsetX = touch.clientX; }
+	                if (typeof touch.layerY === 'undefined') { touch.layerY = touch.offsetY = touch.clientY; }
+
+	                // mark the touch as normalized, just so that we know we did it
+	                touch.isNormalized = true;
+
+	                normalizedEvents.push(touch);
+	            }
+	        }
+	        // apparently PointerEvent subclasses MouseEvent, so yay
+	        else if (event instanceof MouseEvent && (!this.supportsPointerEvents || !(event instanceof window.PointerEvent)))
+	        {
+	            if (typeof event.isPrimary === 'undefined') { event.isPrimary = true; }
+	            if (typeof event.width === 'undefined') { event.width = 1; }
+	            if (typeof event.height === 'undefined') { event.height = 1; }
+	            if (typeof event.tiltX === 'undefined') { event.tiltX = 0; }
+	            if (typeof event.tiltY === 'undefined') { event.tiltY = 0; }
+	            if (typeof event.pointerType === 'undefined') { event.pointerType = 'mouse'; }
+	            if (typeof event.pointerId === 'undefined') { event.pointerId = MOUSE_POINTER_ID; }
+	            if (typeof event.pressure === 'undefined') { event.pressure = 0.5; }
+	            if (typeof event.twist === 'undefined') { event.twist = 0; }
+	            if (typeof event.tangentialPressure === 'undefined') { event.tangentialPressure = 0; }
+
+	            // mark the mouse event as normalized, just so that we know we did it
+	            event.isNormalized = true;
+
+	            normalizedEvents.push(event);
+	        }
+	        else
+	        {
+	            normalizedEvents.push(event);
+	        }
+
+	        return normalizedEvents;
+	    };
+
+	    /**
+	     * Destroys the interaction manager
+	     *
+	     */
+	    InteractionManager.prototype.destroy = function destroy ()
+	    {
+	        this.removeEvents();
+
+	        this.removeAllListeners();
+
+	        this.renderer = null;
+
+	        this.mouse = null;
+
+	        this.eventData = null;
+
+	        this.interactionDOMElement = null;
+
+	        this.onPointerDown = null;
+	        this.processPointerDown = null;
+
+	        this.onPointerUp = null;
+	        this.processPointerUp = null;
+
+	        this.onPointerCancel = null;
+	        this.processPointerCancel = null;
+
+	        this.onPointerMove = null;
+	        this.processPointerMove = null;
+
+	        this.onPointerOut = null;
+	        this.processPointerOverOut = null;
+
+	        this.onPointerOver = null;
+
+	        this._tempPoint = null;
+	    };
+
+	    return InteractionManager;
+	}(eventemitter3));
+
+	var interaction_es = ({
+		InteractionData: InteractionData,
+		InteractionEvent: InteractionEvent,
+		InteractionManager: InteractionManager,
+		InteractionTrackingData: InteractionTrackingData,
+		interactiveTarget: interactiveTarget
+	});
+
+	/*!
+	 * @pixi/graphics - v5.1.4
+	 * Compiled Fri, 20 Sep 2019 17:22:13 UTC
+	 *
+	 * @pixi/graphics is licensed under the MIT License.
+	 * http://www.opensource.org/licenses/mit-license
+	 */
+
+	/**
+	 * Graphics curves resolution settings. If `adaptive` flag is set to `true`,
+	 * the resolution is calculated based on the curve's length to ensure better visual quality.
+	 * Adaptive draw works with `bezierCurveTo` and `quadraticCurveTo`.
+	 *
+	 * @static
+	 * @constant
+	 * @memberof PIXI
+	 * @name GRAPHICS_CURVES
+	 * @type {object}
+	 * @property {boolean} adaptive=false - flag indicating if the resolution should be adaptive
+	 * @property {number} maxLength=10 - maximal length of a single segment of the curve (if adaptive = false, ignored)
+	 * @property {number} minSegments=8 - minimal number of segments in the curve (if adaptive = false, ignored)
+	 * @property {number} maxSegments=2048 - maximal number of segments in the curve (if adaptive = false, ignored)
+	 */
+	var GRAPHICS_CURVES = {
+	    adaptive: true,
+	    maxLength: 10,
+	    minSegments: 8,
+	    maxSegments: 2048,
+	    _segmentsCount: function _segmentsCount(length, defaultSegments)
+	    {
+	        if ( defaultSegments === void 0 ) { defaultSegments = 20; }
+
+	        if (!this.adaptive)
+	        {
+	            return defaultSegments;
+	        }
+
+	        var result = Math.ceil(length / this.maxLength);
+
+	        if (result < this.minSegments)
+	        {
+	            result = this.minSegments;
+	        }
+	        else if (result > this.maxSegments)
+	        {
+	            result = this.maxSegments;
+	        }
+
+	        return result;
+	    },
+	};
+
+	/**
+	 * Fill style object for Graphics.
+	 *
+	 * @class
+	 * @memberof PIXI
+	 */
+	var FillStyle = function FillStyle()
+	{
+	    this.reset();
+	};
+
+	/**
+	 * Clones the object
+	 *
+	 * @return {PIXI.FillStyle}
+	 */
+	FillStyle.prototype.clone = function clone ()
+	{
+	    var obj = new FillStyle();
+
+	    obj.color = this.color;
+	    obj.alpha = this.alpha;
+	    obj.texture = this.texture;
+	    obj.matrix = this.matrix;
+	    obj.visible = this.visible;
+
+	    return obj;
+	};
+
+	/**
+	 * Reset
+	 */
+	FillStyle.prototype.reset = function reset ()
+	{
+	    /**
+	     * The hex color value used when coloring the Graphics object.
+	     *
+	     * @member {number}
+	     * @default 1
+	     */
+	    this.color = 0xFFFFFF;
+
+	    /**
+	     * The alpha value used when filling the Graphics object.
+	     *
+	     * @member {number}
+	     * @default 1
+	     */
+	    this.alpha = 1;
+
+	    /**
+	     * The texture to be used for the fill.
+	     *
+	     * @member {string}
+	     * @default 0
+	     */
+	    this.texture = Texture.WHITE;
+
+	    /**
+	     * The transform aplpied to the texture.
+	     *
+	     * @member {string}
+	     * @default 0
+	     */
+	    this.matrix = null;
+
+	    /**
+	     * If the current fill is visible.
+	     *
+	     * @member {boolean}
+	     * @default false
+	     */
+	    this.visible = false;
+	};
+
+	/**
+	 * Destroy and don't use after this
+	 */
+	FillStyle.prototype.destroy = function destroy ()
+	{
+	    this.texture = null;
+	    this.matrix = null;
+	};
+
+	/**
+	 * A class to contain data useful for Graphics objects
+	 *
+	 * @class
+	 * @memberof PIXI
+	 */
+	var GraphicsData = function GraphicsData(shape, fillStyle, lineStyle, matrix)
+	{
+	    if ( fillStyle === void 0 ) { fillStyle = null; }
+	    if ( lineStyle === void 0 ) { lineStyle = null; }
+	    if ( matrix === void 0 ) { matrix = null; }
+
+	    /**
+	     * The shape object to draw.
+	     * @member {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle}
+	     */
+	    this.shape = shape;
+
+	    /**
+	     * The style of the line.
+	     * @member {PIXI.LineStyle}
+	     */
+	    this.lineStyle = lineStyle;
+
+	    /**
+	     * The style of the fill.
+	     * @member {PIXI.FillStyle}
+	     */
+	    this.fillStyle = fillStyle;
+
+	    /**
+	     * The transform matrix.
+	     * @member {PIXI.Matrix}
+	     */
+	    this.matrix = matrix;
+
+	    /**
+	     * The type of the shape, see the Const.Shapes file for all the existing types,
+	     * @member {number}
+	     */
+	    this.type = shape.type;
+
+	    /**
+	     * The collection of points.
+	     * @member {number[]}
+	     */
+	    this.points = [];
+
+	    /**
+	     * The collection of holes.
+	     * @member {PIXI.GraphicsData[]}
+	     */
+	    this.holes = [];
+	};
+
+	/**
+	 * Creates a new GraphicsData object with the same values as this one.
+	 *
+	 * @return {PIXI.GraphicsData} Cloned GraphicsData object
+	 */
+	GraphicsData.prototype.clone = function clone ()
+	{
+	    return new GraphicsData(
+	        this.shape,
+	        this.fillStyle,
+	        this.lineStyle,
+	        this.matrix
+	    );
+	};
+
+	/**
+	 * Destroys the Graphics data.
+	 */
+	GraphicsData.prototype.destroy = function destroy ()
+	{
+	    this.shape = null;
+	    this.holes.length = 0;
+	    this.holes = null;
+	    this.points.length = 0;
+	    this.points = null;
+	    this.lineStyle = null;
+	    this.fillStyle = null;
+	};
+
+	/**
+	 * Builds a circle to draw
+	 *
+	 * Ignored from docs since it is not directly exposed.
+	 *
+	 * @ignore
+	 * @private
+	 * @param {PIXI.WebGLGraphicsData} graphicsData - The graphics object to draw
+	 * @param {object} webGLData - an object containing all the WebGL-specific information to create this shape
+	 * @param {object} webGLDataNativeLines - an object containing all the WebGL-specific information to create nativeLines
+	 */
+	var buildCircle = {
+
+	    build: function build(graphicsData)
+	    {
+	        // need to convert points to a nice regular data
+	        var circleData = graphicsData.shape;
+	        var points = graphicsData.points;
+	        var x = circleData.x;
+	        var y = circleData.y;
+	        var width;
+	        var height;
+
+	        points.length = 0;
+
+	        // TODO - bit hacky??
+	        if (graphicsData.type === SHAPES.CIRC)
+	        {
+	            width = circleData.radius;
+	            height = circleData.radius;
+	        }
+	        else
+	        {
+	            width = circleData.width;
+	            height = circleData.height;
+	        }
+
+	        if (width === 0 || height === 0)
+	        {
+	            return;
+	        }
+
+	        var totalSegs = Math.floor(30 * Math.sqrt(circleData.radius))
+	            || Math.floor(15 * Math.sqrt(circleData.width + circleData.height));
+
+	        totalSegs /= 2.3;
+
+	        var seg = (Math.PI * 2) / totalSegs;
+
+	        for (var i = 0; i < totalSegs; i++)
+	        {
+	            points.push(
+	                x + (Math.sin(-seg * i) * width),
+	                y + (Math.cos(-seg * i) * height)
+	            );
+	        }
+
+	        points.push(
+	            points[0],
+	            points[1]
+	        );
+	    },
+
+	    triangulate: function triangulate(graphicsData, graphicsGeometry)
+	    {
+	        var points = graphicsData.points;
+	        var verts = graphicsGeometry.points;
+	        var indices = graphicsGeometry.indices;
+
+	        var vertPos = verts.length / 2;
+	        var center = vertPos;
+
+	        verts.push(graphicsData.shape.x, graphicsData.shape.y);
+
+	        for (var i = 0; i < points.length; i += 2)
+	        {
+	            verts.push(points[i], points[i + 1]);
+
+	            // add some uvs
+	            indices.push(vertPos++, center, vertPos);
+	        }
+	    },
+	};
+
+	/**
+	 * Builds a line to draw
+	 *
+	 * Ignored from docs since it is not directly exposed.
+	 *
+	 * @ignore
+	 * @private
+	 * @param {PIXI.GraphicsData} graphicsData - The graphics object containing all the necessary properties
+	 * @param {PIXI.GraphicsGeometry} graphicsGeometry - Geometry where to append output
+	 */
+	function buildLine (graphicsData, graphicsGeometry)
+	{
+	    if (graphicsData.lineStyle.native)
+	    {
+	        buildNativeLine(graphicsData, graphicsGeometry);
+	    }
+	    else
+	    {
+	        buildLine$1(graphicsData, graphicsGeometry);
+	    }
+	}
+
+	/**
+	 * Builds a line to draw using the polygon method.
+	 *
+	 * Ignored from docs since it is not directly exposed.
+	 *
+	 * @ignore
+	 * @private
+	 * @param {PIXI.GraphicsData} graphicsData - The graphics object containing all the necessary properties
+	 * @param {PIXI.GraphicsGeometry} graphicsGeometry - Geometry where to append output
+	 */
+	function buildLine$1(graphicsData, graphicsGeometry)
+	{
+	    var shape = graphicsData.shape;
+	    var points = graphicsData.points || shape.points.slice();
+	    var eps = graphicsGeometry.closePointEps;
+
+	    if (points.length === 0)
+	    {
+	        return;
+	    }
+	    // if the line width is an odd number add 0.5 to align to a whole pixel
+	    // commenting this out fixes #711 and #1620
+	    // if (graphicsData.lineWidth%2)
+	    // {
+	    //     for (i = 0; i < points.length; i++)
+	    //     {
+	    //         points[i] += 0.5;
+	    //     }
+	    // }
+
+	    var style = graphicsData.lineStyle;
+
+	    // get first and last point.. figure out the middle!
+	    var firstPoint = new Point(points[0], points[1]);
+	    var lastPoint = new Point(points[points.length - 2], points[points.length - 1]);
+	    var closedShape = shape.type !== SHAPES.POLY || shape.closeStroke;
+	    var closedPath = Math.abs(firstPoint.x - lastPoint.x) < eps
+	        && Math.abs(firstPoint.y - lastPoint.y) < eps;
+
+	    // if the first point is the last point - gonna have issues :)
+	    if (closedShape)
+	    {
+	        // need to clone as we are going to slightly modify the shape..
+	        points = points.slice();
+
+	        if (closedPath)
+	        {
+	            points.pop();
+	            points.pop();
+	            lastPoint.set(points[points.length - 2], points[points.length - 1]);
+	        }
+
+	        var midPointX = lastPoint.x + ((firstPoint.x - lastPoint.x) * 0.5);
+	        var midPointY = lastPoint.y + ((firstPoint.y - lastPoint.y) * 0.5);
+
+	        points.unshift(midPointX, midPointY);
+	        points.push(midPointX, midPointY);
+	    }
+
+	    var verts = graphicsGeometry.points;
+	    var length = points.length / 2;
+	    var indexCount = points.length;
+	    var indexStart = verts.length / 2;
+
+	    // DRAW the Line
+	    var width = style.width / 2;
+
+	    // sort color
+	    var p1x = points[0];
+	    var p1y = points[1];
+	    var p2x = points[2];
+	    var p2y = points[3];
+	    var p3x = 0;
+	    var p3y = 0;
+
+	    var perpx = -(p1y - p2y);
+	    var perpy = p1x - p2x;
+	    var perp2x = 0;
+	    var perp2y = 0;
+	    var perp3x = 0;
+	    var perp3y = 0;
+
+	    var dist = Math.sqrt((perpx * perpx) + (perpy * perpy));
+
+	    perpx /= dist;
+	    perpy /= dist;
+	    perpx *= width;
+	    perpy *= width;
+
+	    var ratio = style.alignment;// 0.5;
+	    var r1 = (1 - ratio) * 2;
+	    var r2 = ratio * 2;
+
+	    // start
+	    verts.push(
+	        p1x - (perpx * r1),
+	        p1y - (perpy * r1));
+
+	    verts.push(
+	        p1x + (perpx * r2),
+	        p1y + (perpy * r2));
+
+	    for (var i = 1; i < length - 1; ++i)
+	    {
+	        p1x = points[(i - 1) * 2];
+	        p1y = points[((i - 1) * 2) + 1];
+
+	        p2x = points[i * 2];
+	        p2y = points[(i * 2) + 1];
+
+	        p3x = points[(i + 1) * 2];
+	        p3y = points[((i + 1) * 2) + 1];
+
+	        perpx = -(p1y - p2y);
+	        perpy = p1x - p2x;
+
+	        dist = Math.sqrt((perpx * perpx) + (perpy * perpy));
+	        perpx /= dist;
+	        perpy /= dist;
+	        perpx *= width;
+	        perpy *= width;
+
+	        perp2x = -(p2y - p3y);
+	        perp2y = p2x - p3x;
+
+	        dist = Math.sqrt((perp2x * perp2x) + (perp2y * perp2y));
+	        perp2x /= dist;
+	        perp2y /= dist;
+	        perp2x *= width;
+	        perp2y *= width;
+
+	        var a1 = (-perpy + p1y) - (-perpy + p2y);
+	        var b1 = (-perpx + p2x) - (-perpx + p1x);
+	        var c1 = ((-perpx + p1x) * (-perpy + p2y)) - ((-perpx + p2x) * (-perpy + p1y));
+	        var a2 = (-perp2y + p3y) - (-perp2y + p2y);
+	        var b2 = (-perp2x + p2x) - (-perp2x + p3x);
+	        var c2 = ((-perp2x + p3x) * (-perp2y + p2y)) - ((-perp2x + p2x) * (-perp2y + p3y));
+
+	        var denom = (a1 * b2) - (a2 * b1);
+
+	        if (Math.abs(denom) < 0.1)
+	        {
+	            denom += 10.1;
+	            verts.push(
+	                p2x - (perpx * r1),
+	                p2y - (perpy * r1));
+
+	            verts.push(
+	                p2x + (perpx * r2),
+	                p2y + (perpy * r2));
+
+	            continue;
+	        }
+
+	        var px = ((b1 * c2) - (b2 * c1)) / denom;
+	        var py = ((a2 * c1) - (a1 * c2)) / denom;
+	        var pdist = ((px - p2x) * (px - p2x)) + ((py - p2y) * (py - p2y));
+
+	        if (pdist > (196 * width * width))
+	        {
+	            perp3x = perpx - perp2x;
+	            perp3y = perpy - perp2y;
+
+	            dist = Math.sqrt((perp3x * perp3x) + (perp3y * perp3y));
+	            perp3x /= dist;
+	            perp3y /= dist;
+	            perp3x *= width;
+	            perp3y *= width;
+
+	            verts.push(p2x - (perp3x * r1), p2y - (perp3y * r1));
+
+	            verts.push(p2x + (perp3x * r2), p2y + (perp3y * r2));
+
+	            verts.push(p2x - (perp3x * r2 * r1), p2y - (perp3y * r1));
+
+	            indexCount++;
+	        }
+	        else
+	        {
+	            verts.push(p2x + ((px - p2x) * r1), p2y + ((py - p2y) * r1));
+
+	            verts.push(p2x - ((px - p2x) * r2), p2y - ((py - p2y) * r2));
+	        }
+	    }
+
+	    p1x = points[(length - 2) * 2];
+	    p1y = points[((length - 2) * 2) + 1];
+
+	    p2x = points[(length - 1) * 2];
+	    p2y = points[((length - 1) * 2) + 1];
+
+	    perpx = -(p1y - p2y);
+	    perpy = p1x - p2x;
+
+	    dist = Math.sqrt((perpx * perpx) + (perpy * perpy));
+	    perpx /= dist;
+	    perpy /= dist;
+	    perpx *= width;
+	    perpy *= width;
+
+	    verts.push(p2x - (perpx * r1), p2y - (perpy * r1));
+
+	    verts.push(p2x + (perpx * r2), p2y + (perpy * r2));
+
+	    var indices = graphicsGeometry.indices;
+
+	    // indices.push(indexStart);
+
+	    for (var i$1 = 0; i$1 < indexCount - 2; ++i$1)
+	    {
+	        indices.push(indexStart, indexStart + 1, indexStart + 2);
+
+	        indexStart++;
+	    }
+	}
+
+	/**
+	 * Builds a line to draw using the gl.drawArrays(gl.LINES) method
+	 *
+	 * Ignored from docs since it is not directly exposed.
+	 *
+	 * @ignore
+	 * @private
+	 * @param {PIXI.GraphicsData} graphicsData - The graphics object containing all the necessary properties
+	 * @param {PIXI.GraphicsGeometry} graphicsGeometry - Geometry where to append output
+	 */
+	function buildNativeLine(graphicsData, graphicsGeometry)
+	{
+	    var i = 0;
+
+	    var shape = graphicsData.shape;
+	    var points = graphicsData.points || shape.points;
+	    var closedShape = shape.type !== SHAPES.POLY || shape.closeStroke;
+
+	    if (points.length === 0) { return; }
+
+	    var verts = graphicsGeometry.points;
+	    var indices = graphicsGeometry.indices;
+	    var length = points.length / 2;
+
+	    var startIndex = verts.length / 2;
+	    var currentIndex = startIndex;
+
+	    verts.push(points[0], points[1]);
+
+	    for (i = 1; i < length; i++)
+	    {
+	        verts.push(points[i * 2], points[(i * 2) + 1]);
+	        indices.push(currentIndex, currentIndex + 1);
+
+	        currentIndex++;
+	    }
+
+	    if (closedShape)
+	    {
+	        indices.push(currentIndex, startIndex);
+	    }
+	}
+
+	/**
+	 * Builds a polygon to draw
+	 *
+	 * Ignored from docs since it is not directly exposed.
+	 *
+	 * @ignore
+	 * @private
+	 * @param {PIXI.WebGLGraphicsData} graphicsData - The graphics object containing all the necessary properties
+	 * @param {object} webGLData - an object containing all the WebGL-specific information to create this shape
+	 * @param {object} webGLDataNativeLines - an object containing all the WebGL-specific information to create nativeLines
+	 */
+	var buildPoly = {
+
+	    build: function build(graphicsData)
+	    {
+	        graphicsData.points = graphicsData.shape.points.slice();
+	    },
+
+	    triangulate: function triangulate(graphicsData, graphicsGeometry)
+	    {
+	        var points = graphicsData.points;
+	        var holes = graphicsData.holes;
+	        var verts = graphicsGeometry.points;
+	        var indices = graphicsGeometry.indices;
+
+	        if (points.length >= 6)
+	        {
+	            var holeArray = [];
+	            // Process holes..
+
+	            for (var i = 0; i < holes.length; i++)
+	            {
+	                var hole = holes[i];
+
+	                holeArray.push(points.length / 2);
+	                points = points.concat(hole.points);
+	            }
+
+	            // sort color
+	            var triangles = earcut_1(points, holeArray, 2);
+
+	            if (!triangles)
+	            {
+	                return;
+	            }
+
+	            var vertPos = verts.length / 2;
+
+	            for (var i$1 = 0; i$1 < triangles.length; i$1 += 3)
+	            {
+	                indices.push(triangles[i$1] + vertPos);
+	                indices.push(triangles[i$1 + 1] + vertPos);
+	                indices.push(triangles[i$1 + 2] + vertPos);
+	            }
+
+	            for (var i$2 = 0; i$2 < points.length; i$2++)
+	            {
+	                verts.push(points[i$2]);
+	            }
+	        }
+	    },
+	};
+
+	/**
+	 * Builds a rectangle to draw
+	 *
+	 * Ignored from docs since it is not directly exposed.
+	 *
+	 * @ignore
+	 * @private
+	 * @param {PIXI.WebGLGraphicsData} graphicsData - The graphics object containing all the necessary properties
+	 * @param {object} webGLData - an object containing all the WebGL-specific information to create this shape
+	 * @param {object} webGLDataNativeLines - an object containing all the WebGL-specific information to create nativeLines
+	 */
+	var buildRectangle = {
+
+	    build: function build(graphicsData)
+	    {
+	        // --- //
+	        // need to convert points to a nice regular data
+	        //
+	        var rectData = graphicsData.shape;
+	        var x = rectData.x;
+	        var y = rectData.y;
+	        var width = rectData.width;
+	        var height = rectData.height;
+
+	        var points = graphicsData.points;
+
+	        points.length = 0;
+
+	        points.push(x, y,
+	            x + width, y,
+	            x + width, y + height,
+	            x, y + height);
+	    },
+
+	    triangulate: function triangulate(graphicsData, graphicsGeometry)
+	    {
+	        var points = graphicsData.points;
+	        var verts = graphicsGeometry.points;
+
+	        var vertPos = verts.length / 2;
+
+	        verts.push(points[0], points[1],
+	            points[2], points[3],
+	            points[6], points[7],
+	            points[4], points[5]);
+
+	        graphicsGeometry.indices.push(vertPos, vertPos + 1, vertPos + 2,
+	            vertPos + 1, vertPos + 2, vertPos + 3);
+	    },
+	};
+
+	/**
+	 * Builds a rounded rectangle to draw
+	 *
+	 * Ignored from docs since it is not directly exposed.
+	 *
+	 * @ignore
+	 * @private
+	 * @param {PIXI.WebGLGraphicsData} graphicsData - The graphics object containing all the necessary properties
+	 * @param {object} webGLData - an object containing all the WebGL-specific information to create this shape
+	 * @param {object} webGLDataNativeLines - an object containing all the WebGL-specific information to create nativeLines
+	 */
+	var buildRoundedRectangle = {
+
+	    build: function build(graphicsData)
+	    {
+	        var rrectData = graphicsData.shape;
+	        var points = graphicsData.points;
+	        var x = rrectData.x;
+	        var y = rrectData.y;
+	        var width = rrectData.width;
+	        var height = rrectData.height;
+
+	        var radius = rrectData.radius;
+
+	        points.length = 0;
+
+	        quadraticBezierCurve(x, y + radius,
+	            x, y,
+	            x + radius, y,
+	            points);
+	        quadraticBezierCurve(x + width - radius,
+	            y, x + width, y,
+	            x + width, y + radius,
+	            points);
+	        quadraticBezierCurve(x + width, y + height - radius,
+	            x + width, y + height,
+	            x + width - radius, y + height,
+	            points);
+	        quadraticBezierCurve(x + radius, y + height,
+	            x, y + height,
+	            x, y + height - radius,
+	            points);
+
+	        // this tiny number deals with the issue that occurs when points overlap and earcut fails to triangulate the item.
+	        // TODO - fix this properly, this is not very elegant.. but it works for now.
+	    },
+
+	    triangulate: function triangulate(graphicsData, graphicsGeometry)
+	    {
+	        var points = graphicsData.points;
+
+	        var verts = graphicsGeometry.points;
+	        var indices = graphicsGeometry.indices;
+
+	        var vecPos = verts.length / 2;
+
+	        var triangles = earcut_1(points, null, 2);
+
+	        for (var i = 0, j = triangles.length; i < j; i += 3)
+	        {
+	            indices.push(triangles[i] + vecPos);
+	            //     indices.push(triangles[i] + vecPos);
+	            indices.push(triangles[i + 1] + vecPos);
+	            //   indices.push(triangles[i + 2] + vecPos);
+	            indices.push(triangles[i + 2] + vecPos);
+	        }
+
+	        for (var i$1 = 0, j$1 = points.length; i$1 < j$1; i$1++)
+	        {
+	            verts.push(points[i$1], points[++i$1]);
+	        }
+	    },
+	};
+
+	/**
+	 * Calculate a single point for a quadratic bezier curve.
+	 * Utility function used by quadraticBezierCurve.
+	 * Ignored from docs since it is not directly exposed.
+	 *
+	 * @ignore
+	 * @private
+	 * @param {number} n1 - first number
+	 * @param {number} n2 - second number
+	 * @param {number} perc - percentage
+	 * @return {number} the result
+	 *
+	 */
+	function getPt(n1, n2, perc)
+	{
+	    var diff = n2 - n1;
+
+	    return n1 + (diff * perc);
+	}
+
+	/**
+	 * Calculate the points for a quadratic bezier curve. (helper function..)
+	 * Based on: https://stackoverflow.com/questions/785097/how-do-i-implement-a-bezier-curve-in-c
+	 *
+	 * Ignored from docs since it is not directly exposed.
+	 *
+	 * @ignore
+	 * @private
+	 * @param {number} fromX - Origin point x
+	 * @param {number} fromY - Origin point x
+	 * @param {number} cpX - Control point x
+	 * @param {number} cpY - Control point y
+	 * @param {number} toX - Destination point x
+	 * @param {number} toY - Destination point y
+	 * @param {number[]} [out=[]] - The output array to add points into. If not passed, a new array is created.
+	 * @return {number[]} an array of points
+	 */
+	function quadraticBezierCurve(fromX, fromY, cpX, cpY, toX, toY, out)
+	{
+	    if ( out === void 0 ) { out = []; }
+
+	    var n = 20;
+	    var points = out;
+
+	    var xa = 0;
+	    var ya = 0;
+	    var xb = 0;
+	    var yb = 0;
+	    var x = 0;
+	    var y = 0;
+
+	    for (var i = 0, j = 0; i <= n; ++i)
+	    {
+	        j = i / n;
+
+	        // The Green Line
+	        xa = getPt(fromX, cpX, j);
+	        ya = getPt(fromY, cpY, j);
+	        xb = getPt(cpX, toX, j);
+	        yb = getPt(cpY, toY, j);
+
+	        // The Black Dot
+	        x = getPt(xa, xb, j);
+	        y = getPt(ya, yb, j);
+
+	        points.push(x, y);
+	    }
+
+	    return points;
+	}
+
+	var BATCH_POOL = [];
+	var DRAW_CALL_POOL = [];
+	var tmpPoint = new Point();
+
+	/**
+	 * Map of fill commands for each shape type.
+	 *
+	 * @member {Object}
+	 * @private
+	 */
+	var fillCommands = {};
+
+	fillCommands[SHAPES.POLY] = buildPoly;
+	fillCommands[SHAPES.CIRC] = buildCircle;
+	fillCommands[SHAPES.ELIP] = buildCircle;
+	fillCommands[SHAPES.RECT] = buildRectangle;
+	fillCommands[SHAPES.RREC] = buildRoundedRectangle;
+
+	/**
+	 * A little internal structure to hold interim batch objects.
+	 *
+	 * @private
+	 */
+	var BatchPart = function BatchPart()
+	{
+	    this.style = null;
+	    this.size = 0;
+	    this.start = 0;
+	    this.attribStart = 0;
+	    this.attribSize = 0;
+	};
+
+	/**
+	 * The Graphics class contains methods used to draw primitive shapes such as lines, circles and
+	 * rectangles to the display, and to color and fill them.
+	 *
+	 * GraphicsGeometry is designed to not be continually updating the geometry since it's expensive
+	 * to re-tesselate using **earcut**. Consider using {@link PIXI.Mesh} for this use-case, it's much faster.
+	 *
+	 * @class
+	 * @extends PIXI.BatchGeometry
+	 * @memberof PIXI
+	 */
+	var GraphicsGeometry = /*@__PURE__*/(function (BatchGeometry) {
+	    function GraphicsGeometry()
+	    {
+	        BatchGeometry.call(this);
+
+	        /**
+	         * An array of points to draw, 2 numbers per point
+	         *
+	         * @member {number[]}
+	         * @protected
+	         */
+	        this.points = [];
+
+	        /**
+	         * The collection of colors
+	         *
+	         * @member {number[]}
+	         * @protected
+	         */
+	        this.colors = [];
+
+	        /**
+	         * The UVs collection
+	         *
+	         * @member {number[]}
+	         * @protected
+	         */
+	        this.uvs = [];
+
+	        /**
+	         * The indices of the vertices
+	         *
+	         * @member {number[]}
+	         * @protected
+	         */
+	        this.indices = [];
+
+	        /**
+	         * Reference to the texture IDs.
+	         *
+	         * @member {number[]}
+	         * @protected
+	         */
+	        this.textureIds = [];
+
+	        /**
+	         * The collection of drawn shapes.
+	         *
+	         * @member {PIXI.GraphicsData[]}
+	         * @protected
+	         */
+	        this.graphicsData = [];
+
+	        /**
+	         * Used to detect if the graphics object has changed.
+	         *
+	         * @member {number}
+	         * @protected
+	         */
+	        this.dirty = 0;
+
+	        /**
+	         * Batches need to regenerated if the geometry is updated.
+	         *
+	         * @member {number}
+	         * @protected
+	         */
+	        this.batchDirty = -1;
+
+	        /**
+	         * Used to check if the cache is dirty.
+	         *
+	         * @member {number}
+	         * @protected
+	         */
+	        this.cacheDirty = -1;
+
+	        /**
+	         * Used to detect if we cleared the graphicsData.
+	         *
+	         * @member {number}
+	         * @default 0
+	         * @protected
+	         */
+	        this.clearDirty = 0;
+
+	        /**
+	         * List of current draw calls drived from the batches.
+	         *
+	         * @member {object[]}
+	         * @protected
+	         */
+	        this.drawCalls = [];
+
+	        /**
+	         * Intermediate abstract format sent to batch system.
+	         * Can be converted to drawCalls or to batchable objects.
+	         *
+	         * @member {object[]}
+	         * @protected
+	         */
+	        this.batches = [];
+
+	        /**
+	         * Index of the last batched shape in the stack of calls.
+	         *
+	         * @member {number}
+	         * @protected
+	         */
+	        this.shapeIndex = 0;
+
+	        /**
+	         * Cached bounds.
+	         *
+	         * @member {PIXI.Bounds}
+	         * @protected
+	         */
+	        this._bounds = new Bounds();
+
+	        /**
+	         * The bounds dirty flag.
+	         *
+	         * @member {number}
+	         * @protected
+	         */
+	        this.boundsDirty = -1;
+
+	        /**
+	         * Padding to add to the bounds.
+	         *
+	         * @member {number}
+	         * @default 0
+	         */
+	        this.boundsPadding = 0;
+
+	        this.batchable = false;
+
+	        this.indicesUint16 = null;
+
+	        this.uvsFloat32 = null;
+
+	        /**
+	         * Minimal distance between points that are considered different.
+	         * Affects line tesselation.
+	         *
+	         * @member {number}
+	         */
+	        this.closePointEps = 1e-4;
+	    }
+
+	    if ( BatchGeometry ) { GraphicsGeometry.__proto__ = BatchGeometry; }
+	    GraphicsGeometry.prototype = Object.create( BatchGeometry && BatchGeometry.prototype );
+	    GraphicsGeometry.prototype.constructor = GraphicsGeometry;
+
+	    var prototypeAccessors = { bounds: { configurable: true } };
+
+	    /**
+	     * Get the current bounds of the graphic geometry.
+	     *
+	     * @member {PIXI.Bounds}
+	     * @readonly
+	     */
+	    prototypeAccessors.bounds.get = function ()
+	    {
+	        if (this.boundsDirty !== this.dirty)
+	        {
+	            this.boundsDirty = this.dirty;
+	            this.calculateBounds();
+	        }
+
+	        return this._bounds;
+	    };
+
+	    /**
+	     * Call if you changed graphicsData manually.
+	     * Empties all batch buffers.
+	     */
+	    GraphicsGeometry.prototype.invalidate = function invalidate ()
+	    {
+	        this.boundsDirty = -1;
+	        this.dirty++;
+	        this.batchDirty++;
+	        this.shapeIndex = 0;
+
+	        this.points.length = 0;
+	        this.colors.length = 0;
+	        this.uvs.length = 0;
+	        this.indices.length = 0;
+	        this.textureIds.length = 0;
+
+	        for (var i = 0; i < this.drawCalls.length; i++)
+	        {
+	            this.drawCalls[i].textures.length = 0;
+	            DRAW_CALL_POOL.push(this.drawCalls[i]);
+	        }
+
+	        this.drawCalls.length = 0;
+
+	        for (var i$1 = 0; i$1 < this.batches.length; i$1++)
+	        {
+	            var batch =  this.batches[i$1];
+
+	            batch.start = 0;
+	            batch.attribStart = 0;
+	            batch.style = null;
+	            BATCH_POOL.push(batch);
+	        }
+
+	        this.batches.length = 0;
+	    };
+
+	    /**
+	     * Clears the graphics that were drawn to this Graphics object, and resets fill and line style settings.
+	     *
+	     * @return {PIXI.GraphicsGeometry} This GraphicsGeometry object. Good for chaining method calls
+	     */
+	    GraphicsGeometry.prototype.clear = function clear ()
+	    {
+	        if (this.graphicsData.length > 0)
+	        {
+	            this.invalidate();
+	            this.clearDirty++;
+	            this.graphicsData.length = 0;
+	        }
+
+	        return this;
+	    };
+
+	    /**
+	     * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon.
+	     *
+	     * @param {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} shape - The shape object to draw.
+	     * @param {PIXI.FillStyle} fillStyle - Defines style of the fill.
+	     * @param {PIXI.LineStyle} lineStyle - Defines style of the lines.
+	     * @param {PIXI.Matrix} matrix - Transform applied to the points of the shape.
+	     * @return {PIXI.GraphicsGeometry} Returns geometry for chaining.
+	     */
+	    GraphicsGeometry.prototype.drawShape = function drawShape (shape, fillStyle, lineStyle, matrix)
+	    {
+	        var data = new GraphicsData(shape, fillStyle, lineStyle, matrix);
+
+	        this.graphicsData.push(data);
+	        this.dirty++;
+
+	        return this;
+	    };
+
+	    /**
+	     * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon.
+	     *
+	     * @param {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} shape - The shape object to draw.
+	     * @param {PIXI.Matrix} matrix - Transform applied to the points of the shape.
+	     * @return {PIXI.GraphicsGeometry} Returns geometry for chaining.
+	     */
+	    GraphicsGeometry.prototype.drawHole = function drawHole (shape, matrix)
+	    {
+	        if (!this.graphicsData.length)
+	        {
+	            return null;
+	        }
+
+	        var data = new GraphicsData(shape, null, null, matrix);
+
+	        var lastShape = this.graphicsData[this.graphicsData.length - 1];
+
+	        data.lineStyle = lastShape.lineStyle;
+
+	        lastShape.holes.push(data);
+
+	        this.dirty++;
+
+	        return this;
+	    };
+
+	    /**
+	     * Destroys the Graphics object.
+	     *
+	     * @param {object|boolean} [options] - Options parameter. A boolean will act as if all
+	     *  options have been set to that value
+	     * @param {boolean} [options.children=false] - if set to true, all the children will have
+	     *  their destroy method called as well. 'options' will be passed on to those calls.
+	     * @param {boolean} [options.texture=false] - Only used for child Sprites if options.children is set to true
+	     *  Should it destroy the texture of the child sprite
+	     * @param {boolean} [options.baseTexture=false] - Only used for child Sprites if options.children is set to true
+	     *  Should it destroy the base texture of the child sprite
+	     */
+	    GraphicsGeometry.prototype.destroy = function destroy (options)
+	    {
+	        BatchGeometry.prototype.destroy.call(this, options);
+
+	        // destroy each of the GraphicsData objects
+	        for (var i = 0; i < this.graphicsData.length; ++i)
+	        {
+	            this.graphicsData[i].destroy();
+	        }
+
+	        this.points.length = 0;
+	        this.points = null;
+	        this.colors.length = 0;
+	        this.colors = null;
+	        this.uvs.length = 0;
+	        this.uvs = null;
+	        this.indices.length = 0;
+	        this.indices = null;
+	        this.indexBuffer.destroy();
+	        this.indexBuffer = null;
+	        this.graphicsData.length = 0;
+	        this.graphicsData = null;
+	        this.drawCalls.length = 0;
+	        this.drawCalls = null;
+	        this.batches.length = 0;
+	        this.batches = null;
+	        this._bounds = null;
+	    };
+
+	    /**
+	     * Check to see if a point is contained within this geometry.
+	     *
+	     * @param {PIXI.Point} point - Point to check if it's contained.
+	     * @return {Boolean} `true` if the point is contained within geometry.
+	     */
+	    GraphicsGeometry.prototype.containsPoint = function containsPoint (point)
+	    {
+	        var graphicsData = this.graphicsData;
+
+	        for (var i = 0; i < graphicsData.length; ++i)
+	        {
+	            var data = graphicsData[i];
+
+	            if (!data.fillStyle.visible)
+	            {
+	                continue;
+	            }
+
+	            // only deal with fills..
+	            if (data.shape)
+	            {
+	                if (data.matrix)
+	                {
+	                    data.matrix.applyInverse(point, tmpPoint);
+	                }
+	                else
+	                {
+	                    tmpPoint.copyFrom(point);
+	                }
+
+	                if (data.shape.contains(tmpPoint.x, tmpPoint.y))
+	                {
+	                    if (data.holes)
+	                    {
+	                        for (var i$1 = 0; i$1 < data.holes.length; i$1++)
+	                        {
+	                            var hole = data.holes[i$1];
+
+	                            if (hole.shape.contains(tmpPoint.x, tmpPoint.y))
+	                            {
+	                                return false;
+	                            }
+	                        }
+	                    }
+
+	                    return true;
+	                }
+	            }
+	        }
+
+	        return false;
+	    };
+
+	    /**
+	     * Generates intermediate batch data. Either gets converted to drawCalls
+	     * or used to convert to batch objects directly by the Graphics object.
+	     */
+	    GraphicsGeometry.prototype.updateBatches = function updateBatches ()
+	    {
+	        if (this.dirty === this.cacheDirty) { return; }
+	        if (this.graphicsData.length === 0)
+	        {
+	            this.batchable = true;
+
+	            return;
+	        }
+
+	        if (this.dirty !== this.cacheDirty)
+	        {
+	            for (var i = 0; i < this.graphicsData.length; i++)
+	            {
+	                var data = this.graphicsData[i];
+
+	                if (data.fillStyle && !data.fillStyle.texture.baseTexture.valid) { return; }
+	                if (data.lineStyle && !data.lineStyle.texture.baseTexture.valid) { return; }
+	            }
+	        }
+
+	        this.cacheDirty = this.dirty;
+
+	        var uvs = this.uvs;
+
+	        var batchPart = null;
+	        var currentTexture = null;
+	        var currentColor = 0;
+	        var currentNative = false;
+
+	        if (this.batches.length > 0)
+	        {
+	            batchPart = this.batches[this.batches.length - 1];
+
+	            var style = batchPart.style;
+
+	            currentTexture = style.texture.baseTexture;
+	            currentColor = style.color + style.alpha;
+	            currentNative = !!style.native;
+	        }
+
+	        for (var i$1 = this.shapeIndex; i$1 < this.graphicsData.length; i$1++)
+	        {
+	            this.shapeIndex++;
+
+	            var data$1 = this.graphicsData[i$1];
+	            var command = fillCommands[data$1.type];
+
+	            var fillStyle = data$1.fillStyle;
+	            var lineStyle = data$1.lineStyle;
+
+	            // build out the shapes points..
+	            command.build(data$1);
+
+	            if (data$1.matrix)
+	            {
+	                this.transformPoints(data$1.points, data$1.matrix);
+	            }
+
+	            for (var j = 0; j < 2; j++)
+	            {
+	                var style$1 = (j === 0) ? fillStyle : lineStyle;
+
+	                if (!style$1.visible) { continue; }
+
+	                var nextTexture = style$1.texture.baseTexture;
+
+	                var index$1 = this.indices.length;
+	                var attribIndex = this.points.length / 2;
+
+	                // close batch if style is different
+	                if (batchPart
+	                    && (currentTexture !== nextTexture
+	                    || currentColor !== (style$1.color + style$1.alpha)
+	                    || currentNative !== !!style$1.native))
+	                {
+	                    batchPart.size = index$1 - batchPart.start;
+	                    batchPart.attribSize = attribIndex - batchPart.attribStart;
+
+	                    if (batchPart.size > 0)
+	                    {
+	                        batchPart = null;
+	                    }
+	                }
+	                // spawn new batch if its first batch or previous was closed
+	                if (!batchPart)
+	                {
+	                    batchPart = BATCH_POOL.pop() || new BatchPart();
+	                    this.batches.push(batchPart);
+	                    nextTexture.wrapMode = WRAP_MODES.REPEAT;
+	                    currentTexture = nextTexture;
+	                    currentColor = style$1.color + style$1.alpha;
+	                    currentNative = style$1.native;
+
+	                    batchPart.style = style$1;
+	                    batchPart.start = index$1;
+	                    batchPart.attribStart = attribIndex;
+	                }
+
+	                var start = this.points.length / 2;
+
+	                if (j === 0)
+	                {
+	                    if (data$1.holes.length)
+	                    {
+	                        this.processHoles(data$1.holes);
+
+	                        buildPoly.triangulate(data$1, this);
+	                    }
+	                    else
+	                    {
+	                        command.triangulate(data$1, this);
+	                    }
+	                }
+	                else
+	                {
+	                    buildLine(data$1, this);
+
+	                    for (var i$2 = 0; i$2 < data$1.holes.length; i$2++)
+	                    {
+	                        buildLine(data$1.holes[i$2], this);
+	                    }
+	                }
+
+	                var size = (this.points.length / 2) - start;
+
+	                this.addUvs(this.points, uvs, style$1.texture, start, size, style$1.matrix);
+	            }
+	        }
+
+	        var index = this.indices.length;
+	        var attrib = this.points.length / 2;
+
+	        if (!batchPart)
+	        {
+	            // there are no visible styles in GraphicsData
+	            // its possible that someone wants Graphics just for the bounds
+	            this.batchable = true;
+
+	            return;
+	        }
+
+	        batchPart.size = index - batchPart.start;
+	        batchPart.attribSize = attrib - batchPart.attribStart;
+	        this.indicesUint16 = new Uint16Array(this.indices);
+
+	        // TODO make this a const..
+	        this.batchable = this.isBatchable();
+
+	        if (this.batchable)
+	        {
+	            this.batchDirty++;
+
+	            this.uvsFloat32 = new Float32Array(this.uvs);
+
+	            // offset the indices so that it works with the batcher...
+	            for (var i$3 = 0; i$3 < this.batches.length; i$3++)
+	            {
+	                var batch = this.batches[i$3];
+
+	                for (var j$1 = 0; j$1 < batch.size; j$1++)
+	                {
+	                    var index$2 = batch.start + j$1;
+
+	                    this.indicesUint16[index$2] = this.indicesUint16[index$2] - batch.attribStart;
+	                }
+	            }
+	        }
+	        else
+	        {
+	            this.buildDrawCalls();
+	        }
+	    };
+
+	    /**
+	     * Checks to see if this graphics geometry can be batched.
+	     * Currently it needs to be small enough and not contain any native lines.
+	     * @protected
+	     */
+	    GraphicsGeometry.prototype.isBatchable = function isBatchable ()
+	    {
+	        var batches = this.batches;
+
+	        for (var i = 0; i < batches.length; i++)
+	        {
+	            if (batches[i].style.native)
+	            {
+	                return false;
+	            }
+	        }
+
+	        return (this.points.length < GraphicsGeometry.BATCHABLE_SIZE * 2);
+	    };
+
+	    /**
+	     * Converts intermediate batches data to drawCalls.
+	     * @protected
+	     */
+	    GraphicsGeometry.prototype.buildDrawCalls = function buildDrawCalls ()
+	    {
+	        var TICK = ++BaseTexture._globalBatch;
+
+	        for (var i = 0; i < this.drawCalls.length; i++)
+	        {
+	            this.drawCalls[i].textures.length = 0;
+	            DRAW_CALL_POOL.push(this.drawCalls[i]);
+	        }
+
+	        this.drawCalls.length = 0;
+
+	        var uvs = this.uvs;
+	        var colors = this.colors;
+	        var textureIds = this.textureIds;
+
+	        var currentGroup =  DRAW_CALL_POOL.pop() || new BatchDrawCall();
+
+	        currentGroup.textureCount = 0;
+	        currentGroup.start = 0;
+	        currentGroup.size = 0;
+	        currentGroup.type = DRAW_MODES.TRIANGLES;
+
+	        var textureCount = 0;
+	        var currentTexture = null;
+	        var textureId = 0;
+	        var native = false;
+	        var drawMode = DRAW_MODES.TRIANGLES;
+
+	        var index = 0;
+
+	        this.drawCalls.push(currentGroup);
+
+	        // TODO - this can be simplified
+	        for (var i$1 = 0; i$1 < this.batches.length; i$1++)
+	        {
+	            var data = this.batches[i$1];
+
+	            // TODO add some full on MAX_TEXTURE CODE..
+	            var MAX_TEXTURES = 8;
+
+	            var style = data.style;
+
+	            var nextTexture = style.texture.baseTexture;
+
+	            if (native !== !!style.native)
+	            {
+	                native = style.native;
+	                drawMode = native ? DRAW_MODES.LINES : DRAW_MODES.TRIANGLES;
+
+	                // force the batch to break!
+	                currentTexture = null;
+	                textureCount = MAX_TEXTURES;
+	                TICK++;
+	            }
+
+	            if (currentTexture !== nextTexture)
+	            {
+	                currentTexture = nextTexture;
+
+	                if (nextTexture._batchEnabled !== TICK)
+	                {
+	                    if (textureCount === MAX_TEXTURES)
+	                    {
+	                        TICK++;
+
+	                        textureCount = 0;
+
+	                        if (currentGroup.size > 0)
+	                        {
+	                            currentGroup = DRAW_CALL_POOL.pop() || new BatchDrawCall();
+	                            this.drawCalls.push(currentGroup);
+	                        }
+
+	                        currentGroup.start = index;
+	                        currentGroup.size = 0;
+	                        currentGroup.textureCount = 0;
+	                        currentGroup.type = drawMode;
+	                    }
+
+	                    // TODO add this to the render part..
+	                    nextTexture.touched = 1;// touch;
+	                    nextTexture._batchEnabled = TICK;
+	                    nextTexture._id = textureCount;
+	                    nextTexture.wrapMode = 10497;
+
+	                    currentGroup.textures[currentGroup.textureCount++] = nextTexture;
+	                    textureCount++;
+	                }
+	            }
+
+	            currentGroup.size += data.size;
+	            index += data.size;
+
+	            textureId = nextTexture._id;
+
+	            this.addColors(colors, style.color, style.alpha, data.attribSize);
+	            this.addTextureIds(textureIds, textureId, data.attribSize);
+	        }
+
+	        BaseTexture._globalBatch = TICK;
+
+	        // upload..
+	        // merge for now!
+	        var verts = this.points;
+
+	        // verts are 2 positions.. so we * by 3 as there are 6 properties.. then 4 cos its bytes
+	        var glPoints = new ArrayBuffer(verts.length * 3 * 4);
+	        var f32 = new Float32Array(glPoints);
+	        var u32 = new Uint32Array(glPoints);
+
+	        var p = 0;
+
+	        for (var i$2 = 0; i$2 < verts.length / 2; i$2++)
+	        {
+	            f32[p++] = verts[i$2 * 2];
+	            f32[p++] = verts[(i$2 * 2) + 1];
+
+	            f32[p++] = uvs[i$2 * 2];
+	            f32[p++] = uvs[(i$2 * 2) + 1];
+
+	            u32[p++] = colors[i$2];
+
+	            f32[p++] = textureIds[i$2];
+	        }
+
+	        this._buffer.update(glPoints);
+	        this._indexBuffer.update(this.indicesUint16);
+	    };
+
+	    /**
+	     * Process the holes data.
+	     *
+	     * @param {PIXI.GraphicsData[]} holes - Holes to render
+	     * @protected
+	     */
+	    GraphicsGeometry.prototype.processHoles = function processHoles (holes)
+	    {
+	        for (var i = 0; i < holes.length; i++)
+	        {
+	            var hole = holes[i];
+
+	            var command = fillCommands[hole.type];
+
+	            command.build(hole);
+
+	            if (hole.matrix)
+	            {
+	                this.transformPoints(hole.points, hole.matrix);
+	            }
+	        }
+	    };
+
+	    /**
+	     * Update the local bounds of the object. Expensive to use performance-wise.
+	     * @protected
+	     */
+	    GraphicsGeometry.prototype.calculateBounds = function calculateBounds ()
+	    {
+	        var minX = Infinity;
+	        var maxX = -Infinity;
+
+	        var minY = Infinity;
+	        var maxY = -Infinity;
+
+	        if (this.graphicsData.length)
+	        {
+	            var shape = null;
+	            var x = 0;
+	            var y = 0;
+	            var w = 0;
+	            var h = 0;
+
+	            for (var i = 0; i < this.graphicsData.length; i++)
+	            {
+	                var data = this.graphicsData[i];
+
+	                var type = data.type;
+	                var lineWidth = data.lineStyle ? data.lineStyle.width : 0;
+
+	                shape = data.shape;
+
+	                if (type === SHAPES.RECT || type === SHAPES.RREC)
+	                {
+	                    x = shape.x - (lineWidth / 2);
+	                    y = shape.y - (lineWidth / 2);
+	                    w = shape.width + lineWidth;
+	                    h = shape.height + lineWidth;
+
+	                    minX = x < minX ? x : minX;
+	                    maxX = x + w > maxX ? x + w : maxX;
+
+	                    minY = y < minY ? y : minY;
+	                    maxY = y + h > maxY ? y + h : maxY;
+	                }
+	                else if (type === SHAPES.CIRC)
+	                {
+	                    x = shape.x;
+	                    y = shape.y;
+	                    w = shape.radius + (lineWidth / 2);
+	                    h = shape.radius + (lineWidth / 2);
+
+	                    minX = x - w < minX ? x - w : minX;
+	                    maxX = x + w > maxX ? x + w : maxX;
+
+	                    minY = y - h < minY ? y - h : minY;
+	                    maxY = y + h > maxY ? y + h : maxY;
+	                }
+	                else if (type === SHAPES.ELIP)
+	                {
+	                    x = shape.x;
+	                    y = shape.y;
+	                    w = shape.width + (lineWidth / 2);
+	                    h = shape.height + (lineWidth / 2);
+
+	                    minX = x - w < minX ? x - w : minX;
+	                    maxX = x + w > maxX ? x + w : maxX;
+
+	                    minY = y - h < minY ? y - h : minY;
+	                    maxY = y + h > maxY ? y + h : maxY;
+	                }
+	                else
+	                {
+	                    // POLY
+	                    var points = shape.points;
+	                    var x2 = 0;
+	                    var y2 = 0;
+	                    var dx = 0;
+	                    var dy = 0;
+	                    var rw = 0;
+	                    var rh = 0;
+	                    var cx = 0;
+	                    var cy = 0;
+
+	                    for (var j = 0; j + 2 < points.length; j += 2)
+	                    {
+	                        x = points[j];
+	                        y = points[j + 1];
+	                        x2 = points[j + 2];
+	                        y2 = points[j + 3];
+	                        dx = Math.abs(x2 - x);
+	                        dy = Math.abs(y2 - y);
+	                        h = lineWidth;
+	                        w = Math.sqrt((dx * dx) + (dy * dy));
+
+	                        if (w < 1e-9)
+	                        {
+	                            continue;
+	                        }
+
+	                        rw = ((h / w * dy) + dx) / 2;
+	                        rh = ((h / w * dx) + dy) / 2;
+	                        cx = (x2 + x) / 2;
+	                        cy = (y2 + y) / 2;
+
+	                        minX = cx - rw < minX ? cx - rw : minX;
+	                        maxX = cx + rw > maxX ? cx + rw : maxX;
+
+	                        minY = cy - rh < minY ? cy - rh : minY;
+	                        maxY = cy + rh > maxY ? cy + rh : maxY;
+	                    }
+	                }
+	            }
+	        }
+	        else
+	        {
+	            minX = 0;
+	            maxX = 0;
+	            minY = 0;
+	            maxY = 0;
+	        }
+
+	        var padding = this.boundsPadding;
+
+	        this._bounds.minX = minX - padding;
+	        this._bounds.maxX = maxX + padding;
+
+	        this._bounds.minY = minY - padding;
+	        this._bounds.maxY = maxY + padding;
+	    };
+
+	    /**
+	     * Transform points using matrix.
+	     *
+	     * @protected
+	     * @param {number[]} points - Points to transform
+	     * @param {PIXI.Matrix} matrix - Transform matrix
+	     */
+	    GraphicsGeometry.prototype.transformPoints = function transformPoints (points, matrix)
+	    {
+	        for (var i = 0; i < points.length / 2; i++)
+	        {
+	            var x = points[(i * 2)];
+	            var y = points[(i * 2) + 1];
+
+	            points[(i * 2)] = (matrix.a * x) + (matrix.c * y) + matrix.tx;
+	            points[(i * 2) + 1] = (matrix.b * x) + (matrix.d * y) + matrix.ty;
+	        }
+	    };
+
+	    /**
+	     * Add colors.
+	     *
+	     * @protected
+	     * @param {number[]} colors - List of colors to add to
+	     * @param {number} color - Color to add
+	     * @param {number} alpha - Alpha to use
+	     * @param {number} size - Number of colors to add
+	     */
+	    GraphicsGeometry.prototype.addColors = function addColors (colors, color, alpha, size)
+	    {
+	        // TODO use the premultiply bits Ivan added
+	        var rgb = (color >> 16) + (color & 0xff00) + ((color & 0xff) << 16);
+
+	        var rgba =  premultiplyTint(rgb, alpha);
+
+	        while (size-- > 0)
+	        {
+	            colors.push(rgba);
+	        }
+	    };
+
+	    /**
+	     * Add texture id that the shader/fragment wants to use.
+	     *
+	     * @protected
+	     * @param {number[]} textureIds
+	     * @param {number} id
+	     * @param {number} size
+	     */
+	    GraphicsGeometry.prototype.addTextureIds = function addTextureIds (textureIds, id, size)
+	    {
+	        while (size-- > 0)
+	        {
+	            textureIds.push(id);
+	        }
+	    };
+
+	    /**
+	     * Generates the UVs for a shape.
+	     *
+	     * @protected
+	     * @param {number[]} verts - Vertices
+	     * @param {number[]} uvs - UVs
+	     * @param {PIXI.Texture} texture - Reference to Texture
+	     * @param {number} start - Index buffer start index.
+	     * @param {number} size - The size/length for index buffer.
+	     * @param {PIXI.Matrix} [matrix] - Optional transform for all points.
+	     */
+	    GraphicsGeometry.prototype.addUvs = function addUvs (verts, uvs, texture, start, size, matrix)
+	    {
+	        var index = 0;
+	        var uvsStart = uvs.length;
+	        var frame = texture.frame;
+
+	        while (index < size)
+	        {
+	            var x = verts[(start + index) * 2];
+	            var y = verts[((start + index) * 2) + 1];
+
+	            if (matrix)
+	            {
+	                var nx = (matrix.a * x) + (matrix.c * y) + matrix.tx;
+
+	                y = (matrix.b * x) + (matrix.d * y) + matrix.ty;
+	                x = nx;
+	            }
+
+	            index++;
+
+	            uvs.push(x / frame.width, y / frame.height);
+	        }
+
+	        var baseTexture = texture.baseTexture;
+
+	        if (frame.width < baseTexture.width
+	            || frame.height < baseTexture.height)
+	        {
+	            this.adjustUvs(uvs, texture, uvsStart, size);
+	        }
+	    };
+
+	    /**
+	     * Modify uvs array according to position of texture region
+	     * Does not work with rotated or trimmed textures
+	     * @param {number[]} uvs array
+	     * @param {PIXI.Texture} texture region
+	     * @param {number} start starting index for uvs
+	     * @param {number} size how many points to adjust
+	     */
+	    GraphicsGeometry.prototype.adjustUvs = function adjustUvs (uvs, texture, start, size)
+	    {
+	        var baseTexture = texture.baseTexture;
+	        var eps = 1e-6;
+	        var finish = start + (size * 2);
+	        var frame = texture.frame;
+	        var scaleX = frame.width / baseTexture.width;
+	        var scaleY = frame.height / baseTexture.height;
+	        var offsetX = frame.x / frame.width;
+	        var offsetY = frame.y / frame.height;
+	        var minX = Math.floor(uvs[start] + eps);
+	        var minY = Math.floor(uvs[start + 1] + eps);
+
+	        for (var i = start + 2; i < finish; i += 2)
+	        {
+	            minX = Math.min(minX, Math.floor(uvs[i] + eps));
+	            minY = Math.min(minY, Math.floor(uvs[i + 1] + eps));
+	        }
+	        offsetX -= minX;
+	        offsetY -= minY;
+	        for (var i$1 = start; i$1 < finish; i$1 += 2)
+	        {
+	            uvs[i$1] = (uvs[i$1] + offsetX) * scaleX;
+	            uvs[i$1 + 1] = (uvs[i$1 + 1] + offsetY) * scaleY;
+	        }
+	    };
+
+	    Object.defineProperties( GraphicsGeometry.prototype, prototypeAccessors );
+
+	    return GraphicsGeometry;
+	}(BatchGeometry));
+
+	/**
+	 * The maximum number of points to consider an object "batchable",
+	 * able to be batched by the renderer's batch system.
+	 *
+	 * @memberof PIXI.GraphicsGeometry
+	 * @static
+	 * @member {number} BATCHABLE_SIZE
+	 * @default 100
+	 */
+	GraphicsGeometry.BATCHABLE_SIZE = 100;
+
+	/**
+	 * Represents the line style for Graphics.
+	 * @memberof PIXI
+	 * @class
+	 * @extends PIXI.FillStyle
+	 */
+	var LineStyle = /*@__PURE__*/(function (FillStyle) {
+	    function LineStyle () {
+	        FillStyle.apply(this, arguments);
+	    }
+
+	    if ( FillStyle ) { LineStyle.__proto__ = FillStyle; }
+	    LineStyle.prototype = Object.create( FillStyle && FillStyle.prototype );
+	    LineStyle.prototype.constructor = LineStyle;
+
+	    LineStyle.prototype.clone = function clone ()
+	    {
+	        var obj = new LineStyle();
+
+	        obj.color = this.color;
+	        obj.alpha = this.alpha;
+	        obj.texture = this.texture;
+	        obj.matrix = this.matrix;
+	        obj.visible = this.visible;
+	        obj.width = this.width;
+	        obj.alignment = this.alignment;
+	        obj.native = this.native;
+
+	        return obj;
+	    };
+	    /**
+	     * Reset the line style to default.
+	     */
+	    LineStyle.prototype.reset = function reset ()
+	    {
+	        FillStyle.prototype.reset.call(this);
+
+	        // Override default line style color
+	        this.color = 0x0;
+
+	        /**
+	         * The width (thickness) of any lines drawn.
+	         *
+	         * @member {number}
+	         * @default 0
+	         */
+	        this.width = 0;
+
+	        /**
+	         * The alignment of any lines drawn (0.5 = middle, 1 = outter, 0 = inner).
+	         *
+	         * @member {number}
+	         * @default 0
+	         */
+	        this.alignment = 0.5;
+
+	        /**
+	         * If true the lines will be draw using LINES instead of TRIANGLE_STRIP
+	         *
+	         * @member {boolean}
+	         * @default false
+	         */
+	        this.native = false;
+	    };
+
+	    return LineStyle;
+	}(FillStyle));
+
+	/**
+	 * Utilities for bezier curves
+	 * @class
+	 * @private
+	 */
+	var BezierUtils = function BezierUtils () {};
+
+	BezierUtils.curveLength = function curveLength (fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY)
+	{
+	    var n = 10;
+	    var result = 0.0;
+	    var t = 0.0;
+	    var t2 = 0.0;
+	    var t3 = 0.0;
+	    var nt = 0.0;
+	    var nt2 = 0.0;
+	    var nt3 = 0.0;
+	    var x = 0.0;
+	    var y = 0.0;
+	    var dx = 0.0;
+	    var dy = 0.0;
+	    var prevX = fromX;
+	    var prevY = fromY;
+
+	    for (var i = 1; i <= n; ++i)
+	    {
+	        t = i / n;
+	        t2 = t * t;
+	        t3 = t2 * t;
+	        nt = (1.0 - t);
+	        nt2 = nt * nt;
+	        nt3 = nt2 * nt;
+
+	        x = (nt3 * fromX) + (3.0 * nt2 * t * cpX) + (3.0 * nt * t2 * cpX2) + (t3 * toX);
+	        y = (nt3 * fromY) + (3.0 * nt2 * t * cpY) + (3 * nt * t2 * cpY2) + (t3 * toY);
+	        dx = prevX - x;
+	        dy = prevY - y;
+	        prevX = x;
+	        prevY = y;
+
+	        result += Math.sqrt((dx * dx) + (dy * dy));
+	    }
+
+	    return result;
+	};
+
+	/**
+	 * Calculate the points for a bezier curve and then draws it.
+	 *
+	 * Ignored from docs since it is not directly exposed.
+	 *
+	 * @ignore
+	 * @param {number} cpX - Control point x
+	 * @param {number} cpY - Control point y
+	 * @param {number} cpX2 - Second Control point x
+	 * @param {number} cpY2 - Second Control point y
+	 * @param {number} toX - Destination point x
+	 * @param {number} toY - Destination point y
+	 * @param {number[]} points - Path array to push points into
+	 */
+	BezierUtils.curveTo = function curveTo (cpX, cpY, cpX2, cpY2, toX, toY, points)
+	{
+	    var fromX = points[points.length - 2];
+	    var fromY = points[points.length - 1];
+
+	    points.length -= 2;
+
+	    var n = GRAPHICS_CURVES._segmentsCount(
+	        BezierUtils.curveLength(fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY)
+	    );
+
+	    var dt = 0;
+	    var dt2 = 0;
+	    var dt3 = 0;
+	    var t2 = 0;
+	    var t3 = 0;
+
+	    points.push(fromX, fromY);
+
+	    for (var i = 1, j = 0; i <= n; ++i)
+	    {
+	        j = i / n;
+
+	        dt = (1 - j);
+	        dt2 = dt * dt;
+	        dt3 = dt2 * dt;
+
+	        t2 = j * j;
+	        t3 = t2 * j;
+
+	        points.push(
+	            (dt3 * fromX) + (3 * dt2 * j * cpX) + (3 * dt * t2 * cpX2) + (t3 * toX),
+	            (dt3 * fromY) + (3 * dt2 * j * cpY) + (3 * dt * t2 * cpY2) + (t3 * toY)
+	        );
+	    }
+	};
+
+	/**
+	 * Utilities for quadratic curves
+	 * @class
+	 * @private
+	 */
+	var QuadraticUtils = function QuadraticUtils () {};
+
+	QuadraticUtils.curveLength = function curveLength (fromX, fromY, cpX, cpY, toX, toY)
+	{
+	    var ax = fromX - (2.0 * cpX) + toX;
+	    var ay = fromY - (2.0 * cpY) + toY;
+	    var bx = (2.0 * cpX) - (2.0 * fromX);
+	    var by = (2.0 * cpY) - (2.0 * fromY);
+	    var a = 4.0 * ((ax * ax) + (ay * ay));
+	    var b = 4.0 * ((ax * bx) + (ay * by));
+	    var c = (bx * bx) + (by * by);
+
+	    var s = 2.0 * Math.sqrt(a + b + c);
+	    var a2 = Math.sqrt(a);
+	    var a32 = 2.0 * a * a2;
+	    var c2 = 2.0 * Math.sqrt(c);
+	    var ba = b / a2;
+
+	    return (
+	        (a32 * s)
+	            + (a2 * b * (s - c2))
+	            + (
+	                ((4.0 * c * a) - (b * b))
+	               * Math.log(((2.0 * a2) + ba + s) / (ba + c2))
+	            )
+	    ) / (4.0 * a32);
+	};
+
+	/**
+	 * Calculate the points for a quadratic bezier curve and then draws it.
+	 * Based on: https://stackoverflow.com/questions/785097/how-do-i-implement-a-bezier-curve-in-c
+	 *
+	 * @private
+	 * @param {number} cpX - Control point x
+	 * @param {number} cpY - Control point y
+	 * @param {number} toX - Destination point x
+	 * @param {number} toY - Destination point y
+	 * @param {number[]} points - Points to add segments to.
+	 */
+	QuadraticUtils.curveTo = function curveTo (cpX, cpY, toX, toY, points)
+	{
+	    var fromX = points[points.length - 2];
+	    var fromY = points[points.length - 1];
+
+	    var n = GRAPHICS_CURVES._segmentsCount(
+	        QuadraticUtils.curveLength(fromX, fromY, cpX, cpY, toX, toY)
+	    );
+
+	    var xa = 0;
+	    var ya = 0;
+
+	    for (var i = 1; i <= n; ++i)
+	    {
+	        var j = i / n;
+
+	        xa = fromX + ((cpX - fromX) * j);
+	        ya = fromY + ((cpY - fromY) * j);
+
+	        points.push(xa + (((cpX + ((toX - cpX) * j)) - xa) * j),
+	            ya + (((cpY + ((toY - cpY) * j)) - ya) * j));
+	    }
+	};
+
+	/**
+	 * Utilities for arc curves
+	 * @class
+	 * @private
+	 */
+	var ArcUtils = function ArcUtils () {};
+
+	ArcUtils.curveTo = function curveTo (x1, y1, x2, y2, radius, points)
+	{
+	    var fromX = points[points.length - 2];
+	    var fromY = points[points.length - 1];
+
+	    var a1 = fromY - y1;
+	    var b1 = fromX - x1;
+	    var a2 = y2 - y1;
+	    var b2 = x2 - x1;
+	    var mm = Math.abs((a1 * b2) - (b1 * a2));
+
+	    if (mm < 1.0e-8 || radius === 0)
+	    {
+	        if (points[points.length - 2] !== x1 || points[points.length - 1] !== y1)
+	        {
+	            points.push(x1, y1);
+	        }
+
+	        return null;
+	    }
+
+	    var dd = (a1 * a1) + (b1 * b1);
+	    var cc = (a2 * a2) + (b2 * b2);
+	    var tt = (a1 * a2) + (b1 * b2);
+	    var k1 = radius * Math.sqrt(dd) / mm;
+	    var k2 = radius * Math.sqrt(cc) / mm;
+	    var j1 = k1 * tt / dd;
+	    var j2 = k2 * tt / cc;
+	    var cx = (k1 * b2) + (k2 * b1);
+	    var cy = (k1 * a2) + (k2 * a1);
+	    var px = b1 * (k2 + j1);
+	    var py = a1 * (k2 + j1);
+	    var qx = b2 * (k1 + j2);
+	    var qy = a2 * (k1 + j2);
+	    var startAngle = Math.atan2(py - cy, px - cx);
+	    var endAngle = Math.atan2(qy - cy, qx - cx);
+
+	    return {
+	        cx: (cx + x1),
+	        cy: (cy + y1),
+	        radius: radius,
+	        startAngle: startAngle,
+	        endAngle: endAngle,
+	        anticlockwise: (b1 * a2 > b2 * a1),
+	    };
+	};
+
+	/**
+	 * The arc method creates an arc/curve (used to create circles, or parts of circles).
+	 *
+	 * @private
+	 * @param {number} startX - Start x location of arc
+	 * @param {number} startY - Start y location of arc
+	 * @param {number} cx - The x-coordinate of the center of the circle
+	 * @param {number} cy - The y-coordinate of the center of the circle
+	 * @param {number} radius - The radius of the circle
+	 * @param {number} startAngle - The starting angle, in radians (0 is at the 3 o'clock position
+	 *  of the arc's circle)
+	 * @param {number} endAngle - The ending angle, in radians
+	 * @param {boolean} anticlockwise - Specifies whether the drawing should be
+	 *  counter-clockwise or clockwise. False is default, and indicates clockwise, while true
+	 *  indicates counter-clockwise.
+	 * @param {number} n - Number of segments
+	 * @param {number[]} points - Collection of points to add to
+	 */
+	ArcUtils.arc = function arc (startX, startY, cx, cy, radius, startAngle, endAngle, anticlockwise, points)
+	{
+	    var sweep = endAngle - startAngle;
+	    var n = GRAPHICS_CURVES._segmentsCount(
+	        Math.abs(sweep) * radius,
+	        Math.ceil(Math.abs(sweep) / PI_2) * 40
+	    );
+
+	    var theta = (sweep) / (n * 2);
+	    var theta2 = theta * 2;
+	    var cTheta = Math.cos(theta);
+	    var sTheta = Math.sin(theta);
+	    var segMinus = n - 1;
+	    var remainder = (segMinus % 1) / segMinus;
+
+	    for (var i = 0; i <= segMinus; ++i)
+	    {
+	        var real = i + (remainder * i);
+	        var angle = ((theta) + startAngle + (theta2 * real));
+	        var c = Math.cos(angle);
+	        var s = -Math.sin(angle);
+
+	        points.push(
+	            (((cTheta * c) + (sTheta * s)) * radius) + cx,
+	            (((cTheta * -s) + (sTheta * c)) * radius) + cy
+	        );
+	    }
+	};
+
+	/**
+	 * Draw a star shape with an arbitrary number of points.
+	 *
+	 * @class
+	 * @extends PIXI.Polygon
+	 * @memberof PIXI
+	 * @param {number} x - Center X position of the star
+	 * @param {number} y - Center Y position of the star
+	 * @param {number} points - The number of points of the star, must be > 1
+	 * @param {number} radius - The outer radius of the star
+	 * @param {number} [innerRadius] - The inner radius between points, default half `radius`
+	 * @param {number} [rotation=0] - The rotation of the star in radians, where 0 is vertical
+	 * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls
+	 */
+	var Star = /*@__PURE__*/(function (Polygon) {
+	    function Star(x, y, points, radius, innerRadius, rotation)
+	    {
+	        innerRadius = innerRadius || radius / 2;
+
+	        var startAngle = (-1 * Math.PI / 2) + rotation;
+	        var len = points * 2;
+	        var delta = PI_2 / len;
+	        var polygon = [];
+
+	        for (var i = 0; i < len; i++)
+	        {
+	            var r = i % 2 ? innerRadius : radius;
+	            var angle = (i * delta) + startAngle;
+
+	            polygon.push(
+	                x + (r * Math.cos(angle)),
+	                y + (r * Math.sin(angle))
+	            );
+	        }
+
+	        Polygon.call(this, polygon);
+	    }
+
+	    if ( Polygon ) { Star.__proto__ = Polygon; }
+	    Star.prototype = Object.create( Polygon && Polygon.prototype );
+	    Star.prototype.constructor = Star;
+
+	    return Star;
+	}(Polygon));
+
+	var temp = new Float32Array(3);
+
+	// a default shaders map used by graphics..
+	var DEFAULT_SHADERS = {};
+
+	/**
+	 * The Graphics class contains methods used to draw primitive shapes such as lines, circles and
+	 * rectangles to the display, and to color and fill them.
+	 *
+	 * Note that because Graphics can share a GraphicsGeometry with other instances,
+	 * it is necessary to call `destroy()` to properly dereference the underlying
+	 * GraphicsGeometry and avoid a memory leak. Alternatively, keep using the same
+	 * Graphics instance and call `clear()` between redraws.
+	 *
+	 * @class
+	 * @extends PIXI.Container
+	 * @memberof PIXI
+	 */
+	var Graphics = /*@__PURE__*/(function (Container) {
+	    function Graphics(geometry)
+	    {
+	        if ( geometry === void 0 ) { geometry = null; }
+
+	        Container.call(this);
+	        /**
+	         * Includes vertex positions, face indices, normals, colors, UVs, and
+	         * custom attributes within buffers, reducing the cost of passing all
+	         * this data to the GPU. Can be shared between multiple Mesh or Graphics objects.
+	         * @member {PIXI.GraphicsGeometry}
+	         * @readonly
+	         */
+	        this.geometry = geometry || new GraphicsGeometry();
+
+	        this.geometry.refCount++;
+
+	        /**
+	         * Represents the vertex and fragment shaders that processes the geometry and runs on the GPU.
+	         * Can be shared between multiple Graphics objects.
+	         * @member {PIXI.Shader}
+	         */
+	        this.shader = null;
+
+	        /**
+	         * Represents the WebGL state the Graphics required to render, excludes shader and geometry. E.g.,
+	         * blend mode, culling, depth testing, direction of rendering triangles, backface, etc.
+	         * @member {PIXI.State}
+	         */
+	        this.state = State.for2d();
+
+	        /**
+	         * Current fill style
+	         *
+	         * @member {PIXI.FillStyle}
+	         * @protected
+	         */
+	        this._fillStyle = new FillStyle();
+
+	        /**
+	         * Current line style
+	         *
+	         * @member {PIXI.LineStyle}
+	         * @protected
+	         */
+	        this._lineStyle = new LineStyle();
+
+	        /**
+	         * Current shape transform matrix.
+	         *
+	         * @member {PIXI.Matrix}
+	         * @protected
+	         */
+	        this._matrix = null;
+
+	        /**
+	         * Current hole mode is enabled.
+	         *
+	         * @member {boolean}
+	         * @default false
+	         * @protected
+	         */
+	        this._holeMode = false;
+
+	        /**
+	         * Current path
+	         *
+	         * @member {PIXI.Polygon}
+	         * @protected
+	         */
+	        this.currentPath = null;
+
+	        /**
+	         * When cacheAsBitmap is set to true the graphics object will be rendered as if it was a sprite.
+	         * This is useful if your graphics element does not change often, as it will speed up the rendering
+	         * of the object in exchange for taking up texture memory. It is also useful if you need the graphics
+	         * object to be anti-aliased, because it will be rendered using canvas. This is not recommended if
+	         * you are constantly redrawing the graphics element.
+	         *
+	         * @name cacheAsBitmap
+	         * @member {boolean}
+	         * @memberof PIXI.Graphics#
+	         * @default false
+	         */
+
+	        /**
+	         * A collections of batches! These can be drawn by the renderer batch system.
+	         *
+	         * @protected
+	         * @member {object[]}
+	         */
+	        this.batches = [];
+
+	        /**
+	         * Update dirty for limiting calculating tints for batches.
+	         *
+	         * @protected
+	         * @member {number}
+	         * @default -1
+	         */
+	        this.batchTint = -1;
+
+	        /**
+	         * Copy of the object vertex data.
+	         *
+	         * @protected
+	         * @member {Float32Array}
+	         */
+	        this.vertexData = null;
+
+	        this._transformID = -1;
+	        this.batchDirty = -1;
+
+	        /**
+	         * Renderer plugin for batching
+	         *
+	         * @member {string}
+	         * @default 'batch'
+	         */
+	        this.pluginName = 'batch';
+
+	        // Set default
+	        this.tint = 0xFFFFFF;
+	        this.blendMode = BLEND_MODES.NORMAL;
+	    }
+
+	    if ( Container ) { Graphics.__proto__ = Container; }
+	    Graphics.prototype = Object.create( Container && Container.prototype );
+	    Graphics.prototype.constructor = Graphics;
+
+	    var prototypeAccessors = { blendMode: { configurable: true },tint: { configurable: true },fill: { configurable: true },line: { configurable: true } };
+
+	    /**
+	     * Creates a new Graphics object with the same values as this one.
+	     * Note that the only the properties of the object are cloned, not its transform (position,scale,etc)
+	     *
+	     * @return {PIXI.Graphics} A clone of the graphics object
+	     */
+	    Graphics.prototype.clone = function clone ()
+	    {
+	        this.finishPoly();
+
+	        return new Graphics(this.geometry);
+	    };
+
+	    /**
+	     * The blend mode to be applied to the graphic shape. Apply a value of
+	     * `PIXI.BLEND_MODES.NORMAL` to reset the blend mode.
+	     *
+	     * @member {number}
+	     * @default PIXI.BLEND_MODES.NORMAL;
+	     * @see PIXI.BLEND_MODES
+	     */
+	    prototypeAccessors.blendMode.set = function (value)
+	    {
+	        this.state.blendMode = value;
+	    };
+
+	    prototypeAccessors.blendMode.get = function ()
+	    {
+	        return this.state.blendMode;
+	    };
+
+	    /**
+	     * The tint applied to the graphic shape. This is a hex value. A value of
+	     * 0xFFFFFF will remove any tint effect.
+	     *
+	     * @member {number}
+	     * @default 0xFFFFFF
+	     */
+	    prototypeAccessors.tint.get = function ()
+	    {
+	        return this._tint;
+	    };
+	    prototypeAccessors.tint.set = function (value)
+	    {
+	        this._tint = value;
+	    };
+
+	    /**
+	     * The current fill style.
+	     *
+	     * @member {PIXI.FillStyle}
+	     * @readonly
+	     */
+	    prototypeAccessors.fill.get = function ()
+	    {
+	        return this._fillStyle;
+	    };
+
+	    /**
+	     * The current line style.
+	     *
+	     * @member {PIXI.LineStyle}
+	     * @readonly
+	     */
+	    prototypeAccessors.line.get = function ()
+	    {
+	        return this._lineStyle;
+	    };
+
+	    /**
+	     * Specifies the line style used for subsequent calls to Graphics methods such as the lineTo()
+	     * method or the drawCircle() method.
+	     *
+	     * @param {number} [width=0] - width of the line to draw, will update the objects stored style
+	     * @param {number} [color=0] - color of the line to draw, will update the objects stored style
+	     * @param {number} [alpha=1] - alpha of the line to draw, will update the objects stored style
+	     * @param {number} [alignment=0.5] - alignment of the line to draw, (0 = inner, 0.5 = middle, 1 = outter)
+	     * @param {boolean} [native=false] - If true the lines will be draw using LINES instead of TRIANGLE_STRIP
+	     * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls
+	     */
+	    Graphics.prototype.lineStyle = function lineStyle (width, color, alpha, alignment, native)
+	    {
+	        if ( width === void 0 ) { width = 0; }
+	        if ( color === void 0 ) { color = 0; }
+	        if ( alpha === void 0 ) { alpha = 1; }
+	        if ( alignment === void 0 ) { alignment = 0.5; }
+	        if ( native === void 0 ) { native = false; }
+
+	        this.lineTextureStyle(width, Texture.WHITE, color, alpha, null, alignment, native);
+
+	        return this;
+	    };
+
+	    /**
+	     * Like line style but support texture for line fill.
+	     *
+	     * @param {number} [width=0] - width of the line to draw, will update the objects stored style
+	     * @param {PIXI.Texture} [texture=PIXI.Texture.WHITE] - Texture to use
+	     * @param {number} [color=0] - color of the line to draw, will update the objects stored style
+	     * @param {number} [alpha=1] - alpha of the line to draw, will update the objects stored style
+	     * @param {PIXI.Matrix} [matrix=null] Texture matrix to transform texture
+	     * @param {number} [alignment=0.5] - alignment of the line to draw, (0 = inner, 0.5 = middle, 1 = outter)
+	     * @param {boolean} [native=false] - If true the lines will be draw using LINES instead of TRIANGLE_STRIP
+	     * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls
+	     */
+	    Graphics.prototype.lineTextureStyle = function lineTextureStyle (width, texture, color, alpha,
+	        matrix, alignment, native)
+	    {
+	        if ( width === void 0 ) { width = 0; }
+	        if ( texture === void 0 ) { texture = Texture.WHITE; }
+	        if ( color === void 0 ) { color = 0xFFFFFF; }
+	        if ( alpha === void 0 ) { alpha = 1; }
+	        if ( matrix === void 0 ) { matrix = null; }
+	        if ( alignment === void 0 ) { alignment = 0.5; }
+	        if ( native === void 0 ) { native = false; }
+
+	        if (this.currentPath)
+	        {
+	            this.startPoly();
+	        }
+
+	        var visible = width > 0 && alpha > 0;
+
+	        if (!visible)
+	        {
+	            this._lineStyle.reset();
+	        }
+	        else
+	        {
+	            if (matrix)
+	            {
+	                matrix = matrix.clone();
+	                matrix.invert();
+	            }
+
+	            Object.assign(this._lineStyle, {
+	                color: color,
+	                width: width,
+	                alpha: alpha,
+	                matrix: matrix,
+	                texture: texture,
+	                alignment: alignment,
+	                native: native,
+	                visible: visible,
+	            });
+	        }
+
+	        return this;
+	    };
+
+	    /**
+	     * Start a polygon object internally
+	     * @protected
+	     */
+	    Graphics.prototype.startPoly = function startPoly ()
+	    {
+	        if (this.currentPath)
+	        {
+	            var points = this.currentPath.points;
+	            var len = this.currentPath.points.length;
+
+	            if (len > 2)
+	            {
+	                this.drawShape(this.currentPath);
+	                this.currentPath = new Polygon();
+	                this.currentPath.closeStroke = false;
+	                this.currentPath.points.push(points[len - 2], points[len - 1]);
+	            }
+	        }
+	        else
+	        {
+	            this.currentPath = new Polygon();
+	            this.currentPath.closeStroke = false;
+	        }
+	    };
+
+	    /**
+	     * Finish the polygon object.
+	     * @protected
+	     */
+	    Graphics.prototype.finishPoly = function finishPoly ()
+	    {
+	        if (this.currentPath)
+	        {
+	            if (this.currentPath.points.length > 2)
+	            {
+	                this.drawShape(this.currentPath);
+	                this.currentPath = null;
+	            }
+	            else
+	            {
+	                this.currentPath.points.length = 0;
+	            }
+	        }
+	    };
+
+	    /**
+	     * Moves the current drawing position to x, y.
+	     *
+	     * @param {number} x - the X coordinate to move to
+	     * @param {number} y - the Y coordinate to move to
+	     * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls
+	     */
+	    Graphics.prototype.moveTo = function moveTo (x, y)
+	    {
+	        this.startPoly();
+	        this.currentPath.points[0] = x;
+	        this.currentPath.points[1] = y;
+
+	        return this;
+	    };
+
+	    /**
+	     * Draws a line using the current line style from the current drawing position to (x, y);
+	     * The current drawing position is then set to (x, y).
+	     *
+	     * @param {number} x - the X coordinate to draw to
+	     * @param {number} y - the Y coordinate to draw to
+	     * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls
+	     */
+	    Graphics.prototype.lineTo = function lineTo (x, y)
+	    {
+	        if (!this.currentPath)
+	        {
+	            this.moveTo(0, 0);
+	        }
+
+	        // remove duplicates..
+	        var points = this.currentPath.points;
+	        var fromX = points[points.length - 2];
+	        var fromY = points[points.length - 1];
+
+	        if (fromX !== x || fromY !== y)
+	        {
+	            points.push(x, y);
+	        }
+
+	        return this;
+	    };
+
+	    /**
+	     * Initialize the curve
+	     *
+	     * @protected
+	     * @param {number} [x=0]
+	     * @param {number} [y=0]
+	     */
+	    Graphics.prototype._initCurve = function _initCurve (x, y)
+	    {
+	        if ( x === void 0 ) { x = 0; }
+	        if ( y === void 0 ) { y = 0; }
+
+	        if (this.currentPath)
+	        {
+	            if (this.currentPath.points.length === 0)
+	            {
+	                this.currentPath.points = [x, y];
+	            }
+	        }
+	        else
+	        {
+	            this.moveTo(x, y);
+	        }
+	    };
+
+	    /**
+	     * Calculate the points for a quadratic bezier curve and then draws it.
+	     * Based on: https://stackoverflow.com/questions/785097/how-do-i-implement-a-bezier-curve-in-c
+	     *
+	     * @param {number} cpX - Control point x
+	     * @param {number} cpY - Control point y
+	     * @param {number} toX - Destination point x
+	     * @param {number} toY - Destination point y
+	     * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls
+	     */
+	    Graphics.prototype.quadraticCurveTo = function quadraticCurveTo (cpX, cpY, toX, toY)
+	    {
+	        this._initCurve();
+
+	        var points = this.currentPath.points;
+
+	        if (points.length === 0)
+	        {
+	            this.moveTo(0, 0);
+	        }
+
+	        QuadraticUtils.curveTo(cpX, cpY, toX, toY, points);
+
+	        return this;
+	    };
+
+	    /**
+	     * Calculate the points for a bezier curve and then draws it.
+	     *
+	     * @param {number} cpX - Control point x
+	     * @param {number} cpY - Control point y
+	     * @param {number} cpX2 - Second Control point x
+	     * @param {number} cpY2 - Second Control point y
+	     * @param {number} toX - Destination point x
+	     * @param {number} toY - Destination point y
+	     * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls
+	     */
+	    Graphics.prototype.bezierCurveTo = function bezierCurveTo (cpX, cpY, cpX2, cpY2, toX, toY)
+	    {
+	        this._initCurve();
+
+	        BezierUtils.curveTo(cpX, cpY, cpX2, cpY2, toX, toY, this.currentPath.points);
+
+	        return this;
+	    };
+
+	    /**
+	     * The arcTo() method creates an arc/curve between two tangents on the canvas.
+	     *
+	     * "borrowed" from https://code.google.com/p/fxcanvas/ - thanks google!
+	     *
+	     * @param {number} x1 - The x-coordinate of the first tangent point of the arc
+	     * @param {number} y1 - The y-coordinate of the first tangent point of the arc
+	     * @param {number} x2 - The x-coordinate of the end of the arc
+	     * @param {number} y2 - The y-coordinate of the end of the arc
+	     * @param {number} radius - The radius of the arc
+	     * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls
+	     */
+	    Graphics.prototype.arcTo = function arcTo (x1, y1, x2, y2, radius)
+	    {
+	        this._initCurve(x1, y1);
+
+	        var points = this.currentPath.points;
+
+	        var result = ArcUtils.curveTo(x1, y1, x2, y2, radius, points);
+
+	        if (result)
+	        {
+	            var cx = result.cx;
+	            var cy = result.cy;
+	            var radius$1 = result.radius;
+	            var startAngle = result.startAngle;
+	            var endAngle = result.endAngle;
+	            var anticlockwise = result.anticlockwise;
+
+	            this.arc(cx, cy, radius$1, startAngle, endAngle, anticlockwise);
+	        }
+
+	        return this;
+	    };
+
+	    /**
+	     * The arc method creates an arc/curve (used to create circles, or parts of circles).
+	     *
+	     * @param {number} cx - The x-coordinate of the center of the circle
+	     * @param {number} cy - The y-coordinate of the center of the circle
+	     * @param {number} radius - The radius of the circle
+	     * @param {number} startAngle - The starting angle, in radians (0 is at the 3 o'clock position
+	     *  of the arc's circle)
+	     * @param {number} endAngle - The ending angle, in radians
+	     * @param {boolean} [anticlockwise=false] - Specifies whether the drawing should be
+	     *  counter-clockwise or clockwise. False is default, and indicates clockwise, while true
+	     *  indicates counter-clockwise.
+	     * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls
+	     */
+	    Graphics.prototype.arc = function arc (cx, cy, radius, startAngle, endAngle, anticlockwise)
+	    {
+	        if ( anticlockwise === void 0 ) { anticlockwise = false; }
+
+	        if (startAngle === endAngle)
+	        {
+	            return this;
+	        }
+
+	        if (!anticlockwise && endAngle <= startAngle)
+	        {
+	            endAngle += PI_2;
+	        }
+	        else if (anticlockwise && startAngle <= endAngle)
+	        {
+	            startAngle += PI_2;
+	        }
+
+	        var sweep = endAngle - startAngle;
+
+	        if (sweep === 0)
+	        {
+	            return this;
+	        }
+
+	        var startX = cx + (Math.cos(startAngle) * radius);
+	        var startY = cy + (Math.sin(startAngle) * radius);
+	        var eps = this.geometry.closePointEps;
+
+	        // If the currentPath exists, take its points. Otherwise call `moveTo` to start a path.
+	        var points = this.currentPath ? this.currentPath.points : null;
+
+	        if (points)
+	        {
+	            // TODO: make a better fix.
+
+	            // We check how far our start is from the last existing point
+	            var xDiff = Math.abs(points[points.length - 2] - startX);
+	            var yDiff = Math.abs(points[points.length - 1] - startY);
+
+	            if (xDiff < eps && yDiff < eps)
+	            { ; }
+	            else
+	            {
+	                points.push(startX, startY);
+	            }
+	        }
+	        else
+	        {
+	            this.moveTo(startX, startY);
+	            points = this.currentPath.points;
+	        }
+
+	        ArcUtils.arc(startX, startY, cx, cy, radius, startAngle, endAngle, anticlockwise, points);
+
+	        return this;
+	    };
+
+	    /**
+	     * Specifies a simple one-color fill that subsequent calls to other Graphics methods
+	     * (such as lineTo() or drawCircle()) use when drawing.
+	     *
+	     * @param {number} [color=0] - the color of the fill
+	     * @param {number} [alpha=1] - the alpha of the fill
+	     * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls
+	     */
+	    Graphics.prototype.beginFill = function beginFill (color, alpha)
+	    {
+	        if ( color === void 0 ) { color = 0; }
+	        if ( alpha === void 0 ) { alpha = 1; }
+
+	        return this.beginTextureFill(Texture.WHITE, color, alpha);
+	    };
+
+	    /**
+	     * Begin the texture fill
+	     *
+	     * @param {PIXI.Texture} [texture=PIXI.Texture.WHITE] - Texture to fill
+	     * @param {number} [color=0xffffff] - Background to fill behind texture
+	     * @param {number} [alpha=1] - Alpha of fill
+	     * @param {PIXI.Matrix} [matrix=null] - Transform matrix
+	     * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls
+	     */
+	    Graphics.prototype.beginTextureFill = function beginTextureFill (texture, color, alpha, matrix)
+	    {
+	        if ( texture === void 0 ) { texture = Texture.WHITE; }
+	        if ( color === void 0 ) { color = 0xFFFFFF; }
+	        if ( alpha === void 0 ) { alpha = 1; }
+	        if ( matrix === void 0 ) { matrix = null; }
+
+	        if (this.currentPath)
+	        {
+	            this.startPoly();
+	        }
+
+	        var visible = alpha > 0;
+
+	        if (!visible)
+	        {
+	            this._fillStyle.reset();
+	        }
+	        else
+	        {
+	            if (matrix)
+	            {
+	                matrix = matrix.clone();
+	                matrix.invert();
+	            }
+
+	            Object.assign(this._fillStyle, {
+	                color: color,
+	                alpha: alpha,
+	                texture: texture,
+	                matrix: matrix,
+	                visible: visible,
+	            });
+	        }
+
+	        return this;
+	    };
+
+	    /**
+	     * Applies a fill to the lines and shapes that were added since the last call to the beginFill() method.
+	     *
+	     * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls
+	     */
+	    Graphics.prototype.endFill = function endFill ()
+	    {
+	        this.finishPoly();
+
+	        this._fillStyle.reset();
+
+	        return this;
+	    };
+
+	    /**
+	     * Draws a rectangle shape.
+	     *
+	     * @param {number} x - The X coord of the top-left of the rectangle
+	     * @param {number} y - The Y coord of the top-left of the rectangle
+	     * @param {number} width - The width of the rectangle
+	     * @param {number} height - The height of the rectangle
+	     * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls
+	     */
+	    Graphics.prototype.drawRect = function drawRect (x, y, width, height)
+	    {
+	        return this.drawShape(new Rectangle(x, y, width, height));
+	    };
+
+	    /**
+	     * Draw a rectangle shape with rounded/beveled corners.
+	     *
+	     * @param {number} x - The X coord of the top-left of the rectangle
+	     * @param {number} y - The Y coord of the top-left of the rectangle
+	     * @param {number} width - The width of the rectangle
+	     * @param {number} height - The height of the rectangle
+	     * @param {number} radius - Radius of the rectangle corners
+	     * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls
+	     */
+	    Graphics.prototype.drawRoundedRect = function drawRoundedRect (x, y, width, height, radius)
+	    {
+	        return this.drawShape(new RoundedRectangle(x, y, width, height, radius));
+	    };
+
+	    /**
+	     * Draws a circle.
+	     *
+	     * @param {number} x - The X coordinate of the center of the circle
+	     * @param {number} y - The Y coordinate of the center of the circle
+	     * @param {number} radius - The radius of the circle
+	     * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls
+	     */
+	    Graphics.prototype.drawCircle = function drawCircle (x, y, radius)
+	    {
+	        return this.drawShape(new Circle(x, y, radius));
+	    };
+
+	    /**
+	     * Draws an ellipse.
+	     *
+	     * @param {number} x - The X coordinate of the center of the ellipse
+	     * @param {number} y - The Y coordinate of the center of the ellipse
+	     * @param {number} width - The half width of the ellipse
+	     * @param {number} height - The half height of the ellipse
+	     * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls
+	     */
+	    Graphics.prototype.drawEllipse = function drawEllipse (x, y, width, height)
+	    {
+	        return this.drawShape(new Ellipse(x, y, width, height));
+	    };
+
+	    /**
+	     * Draws a polygon using the given path.
+	     *
+	     * @param {number[]|PIXI.Point[]|PIXI.Polygon} path - The path data used to construct the polygon.
+	     * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls
+	     */
+	    Graphics.prototype.drawPolygon = function drawPolygon (path)
+	    {
+	        var arguments$1 = arguments;
+
+	        // prevents an argument assignment deopt
+	        // see section 3.1: https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#3-managing-arguments
+	        var points = path;
+
+	        var closeStroke = true;// !!this._fillStyle;
+
+	        // check if data has points..
+	        if (points.points)
+	        {
+	            closeStroke = points.closeStroke;
+	            points = points.points;
+	        }
+
+	        if (!Array.isArray(points))
+	        {
+	            // prevents an argument leak deopt
+	            // see section 3.2: https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#3-managing-arguments
+	            points = new Array(arguments.length);
+
+	            for (var i = 0; i < points.length; ++i)
+	            {
+	                points[i] = arguments$1[i]; // eslint-disable-line prefer-rest-params
+	            }
+	        }
+
+	        var shape = new Polygon(points);
+
+	        shape.closeStroke = closeStroke;
+
+	        this.drawShape(shape);
+
+	        return this;
+	    };
+
+	    /**
+	     * Draw any shape.
+	     *
+	     * @param {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} shape - Shape to draw
+	     * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls
+	     */
+	    Graphics.prototype.drawShape = function drawShape (shape)
+	    {
+	        if (!this._holeMode)
+	        {
+	            this.geometry.drawShape(
+	                shape,
+	                this._fillStyle.clone(),
+	                this._lineStyle.clone(),
+	                this._matrix
+	            );
+	        }
+	        else
+	        {
+	            this.geometry.drawHole(shape, this._matrix);
+	        }
+
+	        return this;
+	    };
+
+	    /**
+	     * Draw a star shape with an arbitrary number of points.
+	     *
+	     * @param {number} x - Center X position of the star
+	     * @param {number} y - Center Y position of the star
+	     * @param {number} points - The number of points of the star, must be > 1
+	     * @param {number} radius - The outer radius of the star
+	     * @param {number} [innerRadius] - The inner radius between points, default half `radius`
+	     * @param {number} [rotation=0] - The rotation of the star in radians, where 0 is vertical
+	     * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls
+	     */
+	    Graphics.prototype.drawStar = function drawStar (x, y, points, radius, innerRadius, rotation)
+	    {
+	        if ( rotation === void 0 ) { rotation = 0; }
+
+	        return this.drawPolygon(new Star(x, y, points, radius, innerRadius, rotation));
+	    };
+
+	    /**
+	     * Clears the graphics that were drawn to this Graphics object, and resets fill and line style settings.
+	     *
+	     * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls
+	     */
+	    Graphics.prototype.clear = function clear ()
+	    {
+	        this.geometry.clear();
+	        this._lineStyle.reset();
+	        this._fillStyle.reset();
+
+	        this._matrix = null;
+	        this._holeMode = false;
+	        this.currentPath = null;
+
+	        return this;
+	    };
+
+	    /**
+	     * True if graphics consists of one rectangle, and thus, can be drawn like a Sprite and
+	     * masked with gl.scissor.
+	     *
+	     * @returns {boolean} True if only 1 rect.
+	     */
+	    Graphics.prototype.isFastRect = function isFastRect ()
+	    {
+	        // will fix this!
+	        return false;
+	        // this.graphicsData.length === 1
+	        //  && this.graphicsData[0].shape.type === SHAPES.RECT
+	        // && !this.graphicsData[0].lineWidth;
+	    };
+
+	    /**
+	     * Renders the object using the WebGL renderer
+	     *
+	     * @protected
+	     * @param {PIXI.Renderer} renderer - The renderer
+	     */
+	    Graphics.prototype._render = function _render (renderer)
+	    {
+	        this.finishPoly();
+
+	        var geometry = this.geometry;
+
+	        // batch part..
+	        // batch it!
+	        geometry.updateBatches();
+
+	        if (geometry.batchable)
+	        {
+	            if (this.batchDirty !== geometry.batchDirty)
+	            {
+	                this._populateBatches();
+	            }
+
+	            this._renderBatched(renderer);
+	        }
+	        else
+	        {
+	            // no batching...
+	            renderer.batch.flush();
+
+	            this._renderDirect(renderer);
+	        }
+	    };
+
+	    /**
+	     * Populating batches for rendering
+	     *
+	     * @protected
+	     */
+	    Graphics.prototype._populateBatches = function _populateBatches ()
+	    {
+	        var geometry = this.geometry;
+	        var blendMode = this.blendMode;
+
+	        this.batches = [];
+	        this.batchTint = -1;
+	        this._transformID = -1;
+	        this.batchDirty = geometry.batchDirty;
+
+	        this.vertexData = new Float32Array(geometry.points);
+
+	        for (var i = 0, l = geometry.batches.length; i < l; i++)
+	        {
+	            var gI = geometry.batches[i];
+	            var color = gI.style.color;
+	            var vertexData = new Float32Array(this.vertexData.buffer,
+	                gI.attribStart * 4 * 2,
+	                gI.attribSize * 2);
+
+	            var uvs = new Float32Array(geometry.uvsFloat32.buffer,
+	                gI.attribStart * 4 * 2,
+	                gI.attribSize * 2);
+
+	            var indices = new Uint16Array(geometry.indicesUint16.buffer,
+	                gI.start * 2,
+	                gI.size);
+
+	            var batch = {
+	                vertexData: vertexData,
+	                blendMode: blendMode,
+	                indices: indices,
+	                uvs: uvs,
+	                _batchRGB: hex2rgb(color),
+	                _tintRGB: color,
+	                _texture: gI.style.texture,
+	                alpha: gI.style.alpha,
+	                worldAlpha: 1 };
+
+	            this.batches[i] = batch;
+	        }
+	    };
+
+	    /**
+	     * Renders the batches using the BathedRenderer plugin
+	     *
+	     * @protected
+	     * @param {PIXI.Renderer} renderer - The renderer
+	     */
+	    Graphics.prototype._renderBatched = function _renderBatched (renderer)
+	    {
+	        if (!this.batches.length)
+	        {
+	            return;
+	        }
+
+	        renderer.batch.setObjectRenderer(renderer.plugins[this.pluginName]);
+
+	        this.calculateVertices();
+	        this.calculateTints();
+
+	        for (var i = 0, l = this.batches.length; i < l; i++)
+	        {
+	            var batch = this.batches[i];
+
+	            batch.worldAlpha = this.worldAlpha * batch.alpha;
+
+	            renderer.plugins[this.pluginName].render(batch);
+	        }
+	    };
+
+	    /**
+	     * Renders the graphics direct
+	     *
+	     * @protected
+	     * @param {PIXI.Renderer} renderer - The renderer
+	     */
+	    Graphics.prototype._renderDirect = function _renderDirect (renderer)
+	    {
+	        var shader = this._resolveDirectShader(renderer);
+
+	        var geometry = this.geometry;
+	        var tint = this.tint;
+	        var worldAlpha = this.worldAlpha;
+	        var uniforms = shader.uniforms;
+	        var drawCalls = geometry.drawCalls;
+
+	        // lets set the transfomr
+	        uniforms.translationMatrix = this.transform.worldTransform;
+
+	        // and then lets set the tint..
+	        uniforms.tint[0] = (((tint >> 16) & 0xFF) / 255) * worldAlpha;
+	        uniforms.tint[1] = (((tint >> 8) & 0xFF) / 255) * worldAlpha;
+	        uniforms.tint[2] = ((tint & 0xFF) / 255) * worldAlpha;
+	        uniforms.tint[3] = worldAlpha;
+
+	        // the first draw call, we can set the uniforms of the shader directly here.
+
+	        // this means that we can tack advantage of the sync function of pixi!
+	        // bind and sync uniforms..
+	        // there is a way to optimise this..
+	        renderer.shader.bind(shader);
+	        renderer.geometry.bind(geometry, shader);
+
+	        // set state..
+	        renderer.state.set(this.state);
+
+	        // then render the rest of them...
+	        for (var i = 0, l = drawCalls.length; i < l; i++)
+	        {
+	            this._renderDrawCallDirect(renderer, geometry.drawCalls[i]);
+	        }
+	    };
+
+	    /**
+	     * Renders specific DrawCall
+	     *
+	     * @param {PIXI.Renderer} renderer
+	     * @param {PIXI.BatchDrawCall} drawCall
+	     */
+	    Graphics.prototype._renderDrawCallDirect = function _renderDrawCallDirect (renderer, drawCall)
+	    {
+	        var groupTextureCount = drawCall.textureCount;
+
+	        for (var j = 0; j < groupTextureCount; j++)
+	        {
+	            renderer.texture.bind(drawCall.textures[j], j);
+	        }
+
+	        renderer.geometry.draw(drawCall.type, drawCall.size, drawCall.start);
+	    };
+
+	    /**
+	     * Resolves shader for direct rendering
+	     *
+	     * @protected
+	     * @param {PIXI.Renderer} renderer - The renderer
+	     */
+	    Graphics.prototype._resolveDirectShader = function _resolveDirectShader (renderer)
+	    {
+	        var shader = this.shader;
+
+	        var pluginName = this.pluginName;
+
+	        if (!shader)
+	        {
+	            // if there is no shader here, we can use the default shader.
+	            // and that only gets created if we actually need it..
+	            // but may be more than one plugins for graphics
+	            if (!DEFAULT_SHADERS[pluginName])
+	            {
+	                var sampleValues = new Int32Array(16);
+
+	                for (var i = 0; i < 16; i++)
+	                {
+	                    sampleValues[i] = i;
+	                }
+
+	                var uniforms = {
+	                    tint: new Float32Array([1, 1, 1, 1]),
+	                    translationMatrix: new Matrix(),
+	                    default: UniformGroup.from({ uSamplers: sampleValues }, true),
+	                };
+
+	                var program = renderer.plugins[pluginName]._shader.program;
+
+	                DEFAULT_SHADERS[pluginName] = new Shader(program, uniforms);
+	            }
+
+	            shader = DEFAULT_SHADERS[pluginName];
+	        }
+
+	        return shader;
+	    };
+
+	    /**
+	     * Retrieves the bounds of the graphic shape as a rectangle object
+	     *
+	     * @protected
+	     */
+	    Graphics.prototype._calculateBounds = function _calculateBounds ()
+	    {
+	        this.finishPoly();
+	        var lb = this.geometry.bounds;
+
+	        this._bounds.addFrame(this.transform, lb.minX, lb.minY, lb.maxX, lb.maxY);
+	    };
+
+	    /**
+	     * Tests if a point is inside this graphics object
+	     *
+	     * @param {PIXI.Point} point - the point to test
+	     * @return {boolean} the result of the test
+	     */
+	    Graphics.prototype.containsPoint = function containsPoint (point)
+	    {
+	        this.worldTransform.applyInverse(point, Graphics._TEMP_POINT);
+
+	        return this.geometry.containsPoint(Graphics._TEMP_POINT);
+	    };
+
+	    /**
+	     * Recalcuate the tint by applying tin to batches using Graphics tint.
+	     * @protected
+	     */
+	    Graphics.prototype.calculateTints = function calculateTints ()
+	    {
+	        if (this.batchTint !== this.tint)
+	        {
+	            this.batchTint = this.tint;
+
+	            var tintRGB = hex2rgb(this.tint, temp);
+
+	            for (var i = 0; i < this.batches.length; i++)
+	            {
+	                var batch = this.batches[i];
+
+	                var batchTint = batch._batchRGB;
+
+	                var r = (tintRGB[0] * batchTint[0]) * 255;
+	                var g = (tintRGB[1] * batchTint[1]) * 255;
+	                var b = (tintRGB[2] * batchTint[2]) * 255;
+
+	                // TODO Ivan, can this be done in one go?
+	                var color = (r << 16) + (g << 8) + (b | 0);
+
+	                batch._tintRGB = (color >> 16)
+	                        + (color & 0xff00)
+	                        + ((color & 0xff) << 16);
+	            }
+	        }
+	    };
+
+	    /**
+	     * If there's a transform update or a change to the shape of the
+	     * geometry, recaculate the vertices.
+	     * @protected
+	     */
+	    Graphics.prototype.calculateVertices = function calculateVertices ()
+	    {
+	        if (this._transformID === this.transform._worldID)
+	        {
+	            return;
+	        }
+
+	        this._transformID = this.transform._worldID;
+
+	        var wt = this.transform.worldTransform;
+	        var a = wt.a;
+	        var b = wt.b;
+	        var c = wt.c;
+	        var d = wt.d;
+	        var tx = wt.tx;
+	        var ty = wt.ty;
+
+	        var data = this.geometry.points;// batch.vertexDataOriginal;
+	        var vertexData = this.vertexData;
+
+	        var count = 0;
+
+	        for (var i = 0; i < data.length; i += 2)
+	        {
+	            var x = data[i];
+	            var y = data[i + 1];
+
+	            vertexData[count++] = (a * x) + (c * y) + tx;
+	            vertexData[count++] = (d * y) + (b * x) + ty;
+	        }
+	    };
+
+	    /**
+	     * Closes the current path.
+	     *
+	     * @return {PIXI.Graphics} Returns itself.
+	     */
+	    Graphics.prototype.closePath = function closePath ()
+	    {
+	        var currentPath = this.currentPath;
+
+	        if (currentPath)
+	        {
+	            // we don't need to add extra point in the end because buildLine will take care of that
+	            currentPath.closeStroke = true;
+	        }
+
+	        return this;
+	    };
+
+	    /**
+	     * Apply a matrix to the positional data.
+	     *
+	     * @param {PIXI.Matrix} matrix - Matrix to use for transform current shape.
+	     * @return {PIXI.Graphics} Returns itself.
+	     */
+	    Graphics.prototype.setMatrix = function setMatrix (matrix)
+	    {
+	        this._matrix = matrix;
+
+	        return this;
+	    };
+
+	    /**
+	     * Begin adding holes to the last draw shape
+	     * IMPORTANT: holes must be fully inside a shape to work
+	     * Also weirdness ensues if holes overlap!
+	     * Ellipses, Circles, Rectangles and Rounded Rectangles cannot be holes or host for holes in CanvasRenderer,
+	     * please use `moveTo` `lineTo`, `quadraticCurveTo` if you rely on pixi-legacy bundle.
+	     * @return {PIXI.Graphics} Returns itself.
+	     */
+	    Graphics.prototype.beginHole = function beginHole ()
+	    {
+	        this.finishPoly();
+	        this._holeMode = true;
+
+	        return this;
+	    };
+
+	    /**
+	     * End adding holes to the last draw shape
+	     * @return {PIXI.Graphics} Returns itself.
+	     */
+	    Graphics.prototype.endHole = function endHole ()
+	    {
+	        this.finishPoly();
+	        this._holeMode = false;
+
+	        return this;
+	    };
+
+	    /**
+	     * Destroys the Graphics object.
+	     *
+	     * @param {object|boolean} [options] - Options parameter. A boolean will act as if all
+	     *  options have been set to that value
+	     * @param {boolean} [options.children=false] - if set to true, all the children will have
+	     *  their destroy method called as well. 'options' will be passed on to those calls.
+	     * @param {boolean} [options.texture=false] - Only used for child Sprites if options.children is set to true
+	     *  Should it destroy the texture of the child sprite
+	     * @param {boolean} [options.baseTexture=false] - Only used for child Sprites if options.children is set to true
+	     *  Should it destroy the base texture of the child sprite
+	     */
+	    Graphics.prototype.destroy = function destroy (options)
+	    {
+	        Container.prototype.destroy.call(this, options);
+
+	        this.geometry.refCount--;
+	        if (this.geometry.refCount === 0)
+	        {
+	            this.geometry.dispose();
+	        }
+
+	        this._matrix = null;
+	        this.currentPath = null;
+	        this._lineStyle.destroy();
+	        this._lineStyle = null;
+	        this._fillStyle.destroy();
+	        this._fillStyle = null;
+	        this.geometry = null;
+	        this.shader = null;
+	        this.vertexData = null;
+	        this.batches.length = 0;
+	        this.batches = null;
+
+	        Container.prototype.destroy.call(this, options);
+	    };
+
+	    Object.defineProperties( Graphics.prototype, prototypeAccessors );
+
+	    return Graphics;
+	}(Container));
+
+	/**
+	 * Temporary point to use for containsPoint
+	 *
+	 * @static
+	 * @private
+	 * @member {PIXI.Point}
+	 */
+	Graphics._TEMP_POINT = new Point();
+
+	/*!
+	 * @pixi/sprite - v5.1.4
+	 * Compiled Fri, 20 Sep 2019 17:22:13 UTC
+	 *
+	 * @pixi/sprite is licensed under the MIT License.
+	 * http://www.opensource.org/licenses/mit-license
+	 */
+
+	var tempPoint = new Point();
+	var indices = new Uint16Array([0, 1, 2, 0, 2, 3]);
+
+	/**
+	 * The Sprite object is the base for all textured objects that are rendered to the screen
+	*
+	 * A sprite can be created directly from an image like this:
+	 *
+	 * ```js
+	 * let sprite = PIXI.Sprite.from('assets/image.png');
+	 * ```
+	 *
+	 * The more efficient way to create sprites is using a {@link PIXI.Spritesheet},
+	 * as swapping base textures when rendering to the screen is inefficient.
+	 *
+	 * ```js
+	 * PIXI.Loader.shared.add("assets/spritesheet.json").load(setup);
+	 *
+	 * function setup() {
+	 *   let sheet = PIXI.Loader.shared.resources["assets/spritesheet.json"].spritesheet;
+	 *   let sprite = new PIXI.Sprite(sheet.textures["image.png"]);
+	 *   ...
+	 * }
+	 * ```
+	 *
+	 * @class
+	 * @extends PIXI.Container
+	 * @memberof PIXI
+	 */
+	var Sprite = /*@__PURE__*/(function (Container) {
+	    function Sprite(texture)
+	    {
+	        Container.call(this);
+
+	        /**
+	         * The anchor point defines the normalized coordinates
+	         * in the texture that map to the position of this
+	         * sprite.
+	         *
+	         * By default, this is `(0,0)` (or `texture.defaultAnchor`
+	         * if you have modified that), which means the position
+	         * `(x,y)` of this `Sprite` will be the top-left corner.
+	         *
+	         * Note: Updating `texture.defaultAnchor` after
+	         * constructing a `Sprite` does _not_ update its anchor.
+	         *
+	         * {@link https://docs.cocos2d-x.org/cocos2d-x/en/sprites/manipulation.html}
+	         *
+	         * @default `texture.defaultAnchor`
+	         * @member {PIXI.ObservablePoint}
+	         * @private
+	         */
+	        this._anchor = new ObservablePoint(
+	            this._onAnchorUpdate,
+	            this,
+	            (texture ? texture.defaultAnchor.x : 0),
+	            (texture ? texture.defaultAnchor.y : 0)
+	        );
+
+	        /**
+	         * The texture that the sprite is using
+	         *
+	         * @private
+	         * @member {PIXI.Texture}
+	         */
+	        this._texture = null;
+
+	        /**
+	         * The width of the sprite (this is initially set by the texture)
+	         *
+	         * @private
+	         * @member {number}
+	         */
+	        this._width = 0;
+
+	        /**
+	         * The height of the sprite (this is initially set by the texture)
+	         *
+	         * @private
+	         * @member {number}
+	         */
+	        this._height = 0;
+
+	        /**
+	         * The tint applied to the sprite. This is a hex value. A value of 0xFFFFFF will remove any tint effect.
+	         *
+	         * @private
+	         * @member {number}
+	         * @default 0xFFFFFF
+	         */
+	        this._tint = null;
+	        this._tintRGB = null;
+	        this.tint = 0xFFFFFF;
+
+	        /**
+	         * The blend mode to be applied to the sprite. Apply a value of `PIXI.BLEND_MODES.NORMAL` to reset the blend mode.
+	         *
+	         * @member {number}
+	         * @default PIXI.BLEND_MODES.NORMAL
+	         * @see PIXI.BLEND_MODES
+	         */
+	        this.blendMode = BLEND_MODES.NORMAL;
+
+	        /**
+	         * The shader that will be used to render the sprite. Set to null to remove a current shader.
+	         *
+	         * @member {PIXI.Filter|PIXI.Shader}
+	         */
+	        this.shader = null;
+
+	        /**
+	         * Cached tint value so we can tell when the tint is changed.
+	         * Value is used for 2d CanvasRenderer.
+	         *
+	         * @protected
+	         * @member {number}
+	         * @default 0xFFFFFF
+	         */
+	        this._cachedTint = 0xFFFFFF;
+
+	        /**
+	         * this is used to store the uvs data of the sprite, assigned at the same time
+	         * as the vertexData in calculateVertices()
+	         *
+	         * @private
+	         * @member {Float32Array}
+	         */
+	        this.uvs = null;
+
+	        // call texture setter
+	        this.texture = texture || Texture.EMPTY;
+
+	        /**
+	         * this is used to store the vertex data of the sprite (basically a quad)
+	         *
+	         * @private
+	         * @member {Float32Array}
+	         */
+	        this.vertexData = new Float32Array(8);
+
+	        /**
+	         * This is used to calculate the bounds of the object IF it is a trimmed sprite
+	         *
+	         * @private
+	         * @member {Float32Array}
+	         */
+	        this.vertexTrimmedData = null;
+
+	        this._transformID = -1;
+	        this._textureID = -1;
+
+	        this._transformTrimmedID = -1;
+	        this._textureTrimmedID = -1;
+
+	        // Batchable stuff..
+	        // TODO could make this a mixin?
+	        this.indices = indices;
+	        this.size = 4;
+	        this.start = 0;
+
+	        /**
+	         * Plugin that is responsible for rendering this element.
+	         * Allows to customize the rendering process without overriding '_render' & '_renderCanvas' methods.
+	         *
+	         * @member {string}
+	         * @default 'batch'
+	         */
+	        this.pluginName = 'batch';
+
+	        /**
+	         * used to fast check if a sprite is.. a sprite!
+	         * @member {boolean}
+	         */
+	        this.isSprite = true;
+
+	        /**
+	         * Internal roundPixels field
+	         *
+	         * @member {boolean}
+	         * @private
+	         */
+	        this._roundPixels = settings.ROUND_PIXELS;
+	    }
+
+	    if ( Container ) { Sprite.__proto__ = Container; }
+	    Sprite.prototype = Object.create( Container && Container.prototype );
+	    Sprite.prototype.constructor = Sprite;
+
+	    var prototypeAccessors = { roundPixels: { configurable: true },width: { configurable: true },height: { configurable: true },anchor: { configurable: true },tint: { configurable: true },texture: { configurable: true } };
+
+	    /**
+	     * When the texture is updated, this event will fire to update the scale and frame
+	     *
+	     * @private
+	     */
+	    Sprite.prototype._onTextureUpdate = function _onTextureUpdate ()
+	    {
+	        this._textureID = -1;
+	        this._textureTrimmedID = -1;
+	        this._cachedTint = 0xFFFFFF;
+
+	        // so if _width is 0 then width was not set..
+	        if (this._width)
+	        {
+	            this.scale.x = sign$1(this.scale.x) * this._width / this._texture.orig.width;
+	        }
+
+	        if (this._height)
+	        {
+	            this.scale.y = sign$1(this.scale.y) * this._height / this._texture.orig.height;
+	        }
+	    };
+
+	    /**
+	     * Called when the anchor position updates.
+	     *
+	     * @private
+	     */
+	    Sprite.prototype._onAnchorUpdate = function _onAnchorUpdate ()
+	    {
+	        this._transformID = -1;
+	        this._transformTrimmedID = -1;
+	    };
+
+	    /**
+	     * calculates worldTransform * vertices, store it in vertexData
+	     */
+	    Sprite.prototype.calculateVertices = function calculateVertices ()
+	    {
+	        var texture = this._texture;
+
+	        if (this._transformID === this.transform._worldID && this._textureID === texture._updateID)
+	        {
+	            return;
+	        }
+
+	        // update texture UV here, because base texture can be changed without calling `_onTextureUpdate`
+	        if (this._textureID !== texture._updateID)
+	        {
+	            this.uvs = this._texture._uvs.uvsFloat32;
+	        }
+
+	        this._transformID = this.transform._worldID;
+	        this._textureID = texture._updateID;
+
+	        // set the vertex data
+
+	        var wt = this.transform.worldTransform;
+	        var a = wt.a;
+	        var b = wt.b;
+	        var c = wt.c;
+	        var d = wt.d;
+	        var tx = wt.tx;
+	        var ty = wt.ty;
+	        var vertexData = this.vertexData;
+	        var trim = texture.trim;
+	        var orig = texture.orig;
+	        var anchor = this._anchor;
+
+	        var w0 = 0;
+	        var w1 = 0;
+	        var h0 = 0;
+	        var h1 = 0;
+
+	        if (trim)
+	        {
+	            // if the sprite is trimmed and is not a tilingsprite then we need to add the extra
+	            // space before transforming the sprite coords.
+	            w1 = trim.x - (anchor._x * orig.width);
+	            w0 = w1 + trim.width;
+
+	            h1 = trim.y - (anchor._y * orig.height);
+	            h0 = h1 + trim.height;
+	        }
+	        else
+	        {
+	            w1 = -anchor._x * orig.width;
+	            w0 = w1 + orig.width;
+
+	            h1 = -anchor._y * orig.height;
+	            h0 = h1 + orig.height;
+	        }
+
+	        // xy
+	        vertexData[0] = (a * w1) + (c * h1) + tx;
+	        vertexData[1] = (d * h1) + (b * w1) + ty;
+
+	        // xy
+	        vertexData[2] = (a * w0) + (c * h1) + tx;
+	        vertexData[3] = (d * h1) + (b * w0) + ty;
+
+	        // xy
+	        vertexData[4] = (a * w0) + (c * h0) + tx;
+	        vertexData[5] = (d * h0) + (b * w0) + ty;
+
+	        // xy
+	        vertexData[6] = (a * w1) + (c * h0) + tx;
+	        vertexData[7] = (d * h0) + (b * w1) + ty;
+
+	        if (this._roundPixels)
+	        {
+	            for (var i = 0; i < 8; i++)
+	            {
+	                vertexData[i] = Math.round(vertexData[i]);
+	            }
+	        }
+	    };
+
+	    /**
+	     * calculates worldTransform * vertices for a non texture with a trim. store it in vertexTrimmedData
+	     * This is used to ensure that the true width and height of a trimmed texture is respected
+	     */
+	    Sprite.prototype.calculateTrimmedVertices = function calculateTrimmedVertices ()
+	    {
+	        if (!this.vertexTrimmedData)
+	        {
+	            this.vertexTrimmedData = new Float32Array(8);
+	        }
+	        else if (this._transformTrimmedID === this.transform._worldID && this._textureTrimmedID === this._texture._updateID)
+	        {
+	            return;
+	        }
+
+	        this._transformTrimmedID = this.transform._worldID;
+	        this._textureTrimmedID = this._texture._updateID;
+
+	        // lets do some special trim code!
+	        var texture = this._texture;
+	        var vertexData = this.vertexTrimmedData;
+	        var orig = texture.orig;
+	        var anchor = this._anchor;
+
+	        // lets calculate the new untrimmed bounds..
+	        var wt = this.transform.worldTransform;
+	        var a = wt.a;
+	        var b = wt.b;
+	        var c = wt.c;
+	        var d = wt.d;
+	        var tx = wt.tx;
+	        var ty = wt.ty;
+
+	        var w1 = -anchor._x * orig.width;
+	        var w0 = w1 + orig.width;
+
+	        var h1 = -anchor._y * orig.height;
+	        var h0 = h1 + orig.height;
+
+	        // xy
+	        vertexData[0] = (a * w1) + (c * h1) + tx;
+	        vertexData[1] = (d * h1) + (b * w1) + ty;
+
+	        // xy
+	        vertexData[2] = (a * w0) + (c * h1) + tx;
+	        vertexData[3] = (d * h1) + (b * w0) + ty;
+
+	        // xy
+	        vertexData[4] = (a * w0) + (c * h0) + tx;
+	        vertexData[5] = (d * h0) + (b * w0) + ty;
+
+	        // xy
+	        vertexData[6] = (a * w1) + (c * h0) + tx;
+	        vertexData[7] = (d * h0) + (b * w1) + ty;
+	    };
+
+	    /**
+	    *
+	    * Renders the object using the WebGL renderer
+	    *
+	    * @protected
+	    * @param {PIXI.Renderer} renderer - The webgl renderer to use.
+	    */
+	    Sprite.prototype._render = function _render (renderer)
+	    {
+	        this.calculateVertices();
+
+	        renderer.batch.setObjectRenderer(renderer.plugins[this.pluginName]);
+	        renderer.plugins[this.pluginName].render(this);
+	    };
+
+	    /**
+	     * Updates the bounds of the sprite.
+	     *
+	     * @protected
+	     */
+	    Sprite.prototype._calculateBounds = function _calculateBounds ()
+	    {
+	        var trim = this._texture.trim;
+	        var orig = this._texture.orig;
+
+	        // First lets check to see if the current texture has a trim..
+	        if (!trim || (trim.width === orig.width && trim.height === orig.height))
+	        {
+	            // no trim! lets use the usual calculations..
+	            this.calculateVertices();
+	            this._bounds.addQuad(this.vertexData);
+	        }
+	        else
+	        {
+	            // lets calculate a special trimmed bounds...
+	            this.calculateTrimmedVertices();
+	            this._bounds.addQuad(this.vertexTrimmedData);
+	        }
+	    };
+
+	    /**
+	     * Gets the local bounds of the sprite object.
+	     *
+	     * @param {PIXI.Rectangle} [rect] - The output rectangle.
+	     * @return {PIXI.Rectangle} The bounds.
+	     */
+	    Sprite.prototype.getLocalBounds = function getLocalBounds (rect)
+	    {
+	        // we can do a fast local bounds if the sprite has no children!
+	        if (this.children.length === 0)
+	        {
+	            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);
+
+	            if (!rect)
+	            {
+	                if (!this._localBoundsRect)
+	                {
+	                    this._localBoundsRect = new Rectangle();
+	                }
+
+	                rect = this._localBoundsRect;
+	            }
+
+	            return this._bounds.getRectangle(rect);
+	        }
+
+	        return Container.prototype.getLocalBounds.call(this, rect);
+	    };
+
+	    /**
+	     * Tests if a point is inside this sprite
+	     *
+	     * @param {PIXI.Point} point - the point to test
+	     * @return {boolean} the result of the test
+	     */
+	    Sprite.prototype.containsPoint = function containsPoint (point)
+	    {
+	        this.worldTransform.applyInverse(point, tempPoint);
+
+	        var width = this._texture.orig.width;
+	        var height = this._texture.orig.height;
+	        var x1 = -width * this.anchor.x;
+	        var y1 = 0;
+
+	        if (tempPoint.x >= x1 && tempPoint.x < x1 + width)
+	        {
+	            y1 = -height * this.anchor.y;
+
+	            if (tempPoint.y >= y1 && tempPoint.y < y1 + height)
+	            {
+	                return true;
+	            }
+	        }
+
+	        return false;
+	    };
+
+	    /**
+	     * Destroys this sprite and optionally its texture and children
+	     *
+	     * @param {object|boolean} [options] - Options parameter. A boolean will act as if all options
+	     *  have been set to that value
+	     * @param {boolean} [options.children=false] - if set to true, all the children will have their destroy
+	     *      method called as well. 'options' will be passed on to those calls.
+	     * @param {boolean} [options.texture=false] - Should it destroy the current texture of the sprite as well
+	     * @param {boolean} [options.baseTexture=false] - Should it destroy the base texture of the sprite as well
+	     */
+	    Sprite.prototype.destroy = function destroy (options)
+	    {
+	        Container.prototype.destroy.call(this, options);
+
+	        this._texture.off('update', this._onTextureUpdate, this);
+
+	        this._anchor = null;
+
+	        var destroyTexture = typeof options === 'boolean' ? options : options && options.texture;
+
+	        if (destroyTexture)
+	        {
+	            var destroyBaseTexture = typeof options === 'boolean' ? options : options && options.baseTexture;
+
+	            this._texture.destroy(!!destroyBaseTexture);
+	        }
+
+	        this._texture = null;
+	        this.shader = null;
+	    };
+
+	    // some helper functions..
+
+	    /**
+	     * Helper function that creates a new sprite based on the source you provide.
+	     * The source can be - frame id, image url, video url, canvas element, video element, base texture
+	     *
+	     * @static
+	     * @param {number|string|PIXI.Texture|HTMLCanvasElement|HTMLVideoElement} source Source to create texture from
+	     * @param {object} [options] See {@link PIXI.BaseTexture}'s constructor for options.
+	     * @return {PIXI.Sprite} The newly created sprite
+	     */
+	    Sprite.from = function from (source, options)
+	    {
+	        var texture = (source instanceof Texture)
+	            ? source
+	            : Texture.from(source, options);
+
+	        return new Sprite(texture);
+	    };
+
+	    /**
+	     * If true PixiJS will Math.floor() x/y values when rendering, stopping pixel interpolation.
+	     * Advantages can include sharper image quality (like text) and faster rendering on canvas.
+	     * The main disadvantage is movement of objects may appear less smooth.
+	     * To set the global default, change {@link PIXI.settings.ROUND_PIXELS}
+	     *
+	     * @member {boolean}
+	     * @default false
+	     */
+	    prototypeAccessors.roundPixels.set = function (value)
+	    {
+	        if (this._roundPixels !== value)
+	        {
+	            this._transformID = -1;
+	        }
+	        this._roundPixels = value;
+	    };
+
+	    prototypeAccessors.roundPixels.get = function ()
+	    {
+	        return this._roundPixels;
+	    };
+
+	    /**
+	     * The width of the sprite, setting this will actually modify the scale to achieve the value set
+	     *
+	     * @member {number}
+	     */
+	    prototypeAccessors.width.get = function ()
+	    {
+	        return Math.abs(this.scale.x) * this._texture.orig.width;
+	    };
+
+	    prototypeAccessors.width.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        var s = sign$1(this.scale.x) || 1;
+
+	        this.scale.x = s * value / this._texture.orig.width;
+	        this._width = value;
+	    };
+
+	    /**
+	     * The height of the sprite, setting this will actually modify the scale to achieve the value set
+	     *
+	     * @member {number}
+	     */
+	    prototypeAccessors.height.get = function ()
+	    {
+	        return Math.abs(this.scale.y) * this._texture.orig.height;
+	    };
+
+	    prototypeAccessors.height.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        var s = sign$1(this.scale.y) || 1;
+
+	        this.scale.y = s * value / this._texture.orig.height;
+	        this._height = value;
+	    };
+
+	    /**
+	     * The anchor sets the origin point of the text. The default value is taken from the {@link PIXI.Texture|Texture}
+	     * and passed to the constructor.
+	     *
+	     * The default is `(0,0)`, this means the text's origin is the top left.
+	     *
+	     * Setting the anchor to `(0.5,0.5)` means the text's origin is centered.
+	     *
+	     * Setting the anchor to `(1,1)` would mean the text's origin point will be the bottom right corner.
+	     *
+	     * If you pass only single parameter, it will set both x and y to the same value as shown in the example below.
+	     *
+	     * @example
+	     * const sprite = new PIXI.Sprite(texture);
+	     * sprite.anchor.set(0.5); // This will set the origin to center. (0.5) is same as (0.5, 0.5).
+	     *
+	     * @member {PIXI.ObservablePoint}
+	     */
+	    prototypeAccessors.anchor.get = function ()
+	    {
+	        return this._anchor;
+	    };
+
+	    prototypeAccessors.anchor.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        this._anchor.copyFrom(value);
+	    };
+
+	    /**
+	     * The tint applied to the sprite. This is a hex value.
+	     * A value of 0xFFFFFF will remove any tint effect.
+	     *
+	     * @member {number}
+	     * @default 0xFFFFFF
+	     */
+	    prototypeAccessors.tint.get = function ()
+	    {
+	        return this._tint;
+	    };
+
+	    prototypeAccessors.tint.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        this._tint = value;
+	        this._tintRGB = (value >> 16) + (value & 0xff00) + ((value & 0xff) << 16);
+	    };
+
+	    /**
+	     * The texture that the sprite is using
+	     *
+	     * @member {PIXI.Texture}
+	     */
+	    prototypeAccessors.texture.get = function ()
+	    {
+	        return this._texture;
+	    };
+
+	    prototypeAccessors.texture.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        if (this._texture === value)
+	        {
+	            return;
+	        }
+
+	        this._texture = value || Texture.EMPTY;
+	        this._cachedTint = 0xFFFFFF;
+
+	        this._textureID = -1;
+	        this._textureTrimmedID = -1;
+
+	        if (value)
+	        {
+	            // wait for the texture to load
+	            if (value.baseTexture.valid)
+	            {
+	                this._onTextureUpdate();
+	            }
+	            else
+	            {
+	                value.once('update', this._onTextureUpdate, this);
+	            }
+	        }
+	    };
+
+	    Object.defineProperties( Sprite.prototype, prototypeAccessors );
+
+	    return Sprite;
+	}(Container));
+
+	/*!
+	 * @pixi/text - v5.1.4
+	 * Compiled Fri, 20 Sep 2019 17:22:13 UTC
+	 *
+	 * @pixi/text is licensed under the MIT License.
+	 * http://www.opensource.org/licenses/mit-license
+	 */
+
+	/**
+	 * Constants that define the type of gradient on text.
+	 *
+	 * @static
+	 * @constant
+	 * @name TEXT_GRADIENT
+	 * @memberof PIXI
+	 * @type {object}
+	 * @property {number} LINEAR_VERTICAL Vertical gradient
+	 * @property {number} LINEAR_HORIZONTAL Linear gradient
+	 */
+	var TEXT_GRADIENT = {
+	    LINEAR_VERTICAL: 0,
+	    LINEAR_HORIZONTAL: 1,
+	};
+
+	// disabling eslint for now, going to rewrite this in v5
+
+	var defaultStyle = {
+	    align: 'left',
+	    breakWords: false,
+	    dropShadow: false,
+	    dropShadowAlpha: 1,
+	    dropShadowAngle: Math.PI / 6,
+	    dropShadowBlur: 0,
+	    dropShadowColor: 'black',
+	    dropShadowDistance: 5,
+	    fill: 'black',
+	    fillGradientType: 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: false,
+	    whiteSpace: 'pre',
+	    wordWrap: false,
+	    wordWrapWidth: 100,
+	    leading: 0,
+	};
+
+	var genericFontFamilies = [
+	    'serif',
+	    'sans-serif',
+	    'monospace',
+	    'cursive',
+	    'fantasy',
+	    'system-ui' ];
+
+	/**
+	 * A TextStyle Object contains information to decorate a Text objects.
+	 *
+	 * An instance can be shared between multiple Text objects; then changing the style will update all text objects using it.
+	 *
+	 * A tool can be used to generate a text style [here](https://pixijs.io/pixi-text-style).
+	 *
+	 * @class
+	 * @memberof PIXI
+	 */
+	var TextStyle = function TextStyle(style)
+	{
+	    this.styleID = 0;
+
+	    this.reset();
+
+	    deepCopyProperties(this, style, style);
+	};
+
+	var prototypeAccessors$7 = { align: { configurable: true },breakWords: { configurable: true },dropShadow: { configurable: true },dropShadowAlpha: { configurable: true },dropShadowAngle: { configurable: true },dropShadowBlur: { configurable: true },dropShadowColor: { configurable: true },dropShadowDistance: { configurable: true },fill: { configurable: true },fillGradientType: { configurable: true },fillGradientStops: { configurable: true },fontFamily: { configurable: true },fontSize: { configurable: true },fontStyle: { configurable: true },fontVariant: { configurable: true },fontWeight: { configurable: true },letterSpacing: { configurable: true },lineHeight: { configurable: true },leading: { configurable: true },lineJoin: { configurable: true },miterLimit: { configurable: true },padding: { configurable: true },stroke: { configurable: true },strokeThickness: { configurable: true },textBaseline: { configurable: true },trim: { configurable: true },whiteSpace: { configurable: true },wordWrap: { configurable: true },wordWrapWidth: { configurable: true } };
+
+	/**
+	 * Creates a new TextStyle object with the same values as this one.
+	 * Note that the only the properties of the object are cloned.
+	 *
+	 * @return {PIXI.TextStyle} New cloned TextStyle object
+	 */
+	TextStyle.prototype.clone = function clone ()
+	{
+	    var clonedProperties = {};
+
+	    deepCopyProperties(clonedProperties, this, defaultStyle);
+
+	    return new TextStyle(clonedProperties);
+	};
+
+	/**
+	 * Resets all properties to the defaults specified in TextStyle.prototype._default
+	 */
+	TextStyle.prototype.reset = function reset ()
+	{
+	    deepCopyProperties(this, defaultStyle, defaultStyle);
+	};
+
+	/**
+	 * Alignment for multiline text ('left', 'center' or 'right'), does not affect single line text
+	 *
+	 * @member {string}
+	 */
+	prototypeAccessors$7.align.get = function ()
+	{
+	    return this._align;
+	};
+	prototypeAccessors$7.align.set = function (align) // eslint-disable-line require-jsdoc
+	{
+	    if (this._align !== align)
+	    {
+	        this._align = align;
+	        this.styleID++;
+	    }
+	};
+
+	/**
+	 * Indicates if lines can be wrapped within words, it needs wordWrap to be set to true
+	 *
+	 * @member {boolean}
+	 */
+	prototypeAccessors$7.breakWords.get = function ()
+	{
+	    return this._breakWords;
+	};
+	prototypeAccessors$7.breakWords.set = function (breakWords) // eslint-disable-line require-jsdoc
+	{
+	    if (this._breakWords !== breakWords)
+	    {
+	        this._breakWords = breakWords;
+	        this.styleID++;
+	    }
+	};
+
+	/**
+	 * Set a drop shadow for the text
+	 *
+	 * @member {boolean}
+	 */
+	prototypeAccessors$7.dropShadow.get = function ()
+	{
+	    return this._dropShadow;
+	};
+	prototypeAccessors$7.dropShadow.set = function (dropShadow) // eslint-disable-line require-jsdoc
+	{
+	    if (this._dropShadow !== dropShadow)
+	    {
+	        this._dropShadow = dropShadow;
+	        this.styleID++;
+	    }
+	};
+
+	/**
+	 * Set alpha for the drop shadow
+	 *
+	 * @member {number}
+	 */
+	prototypeAccessors$7.dropShadowAlpha.get = function ()
+	{
+	    return this._dropShadowAlpha;
+	};
+	prototypeAccessors$7.dropShadowAlpha.set = function (dropShadowAlpha) // eslint-disable-line require-jsdoc
+	{
+	    if (this._dropShadowAlpha !== dropShadowAlpha)
+	    {
+	        this._dropShadowAlpha = dropShadowAlpha;
+	        this.styleID++;
+	    }
+	};
+
+	/**
+	 * Set a angle of the drop shadow
+	 *
+	 * @member {number}
+	 */
+	prototypeAccessors$7.dropShadowAngle.get = function ()
+	{
+	    return this._dropShadowAngle;
+	};
+	prototypeAccessors$7.dropShadowAngle.set = function (dropShadowAngle) // eslint-disable-line require-jsdoc
+	{
+	    if (this._dropShadowAngle !== dropShadowAngle)
+	    {
+	        this._dropShadowAngle = dropShadowAngle;
+	        this.styleID++;
+	    }
+	};
+
+	/**
+	 * Set a shadow blur radius
+	 *
+	 * @member {number}
+	 */
+	prototypeAccessors$7.dropShadowBlur.get = function ()
+	{
+	    return this._dropShadowBlur;
+	};
+	prototypeAccessors$7.dropShadowBlur.set = function (dropShadowBlur) // eslint-disable-line require-jsdoc
+	{
+	    if (this._dropShadowBlur !== dropShadowBlur)
+	    {
+	        this._dropShadowBlur = dropShadowBlur;
+	        this.styleID++;
+	    }
+	};
+
+	/**
+	 * A fill style to be used on the dropshadow e.g 'red', '#00FF00'
+	 *
+	 * @member {string|number}
+	 */
+	prototypeAccessors$7.dropShadowColor.get = function ()
+	{
+	    return this._dropShadowColor;
+	};
+	prototypeAccessors$7.dropShadowColor.set = function (dropShadowColor) // eslint-disable-line require-jsdoc
+	{
+	    var outputColor = getColor(dropShadowColor);
+	    if (this._dropShadowColor !== outputColor)
+	    {
+	        this._dropShadowColor = outputColor;
+	        this.styleID++;
+	    }
+	};
+
+	/**
+	 * Set a distance of the drop shadow
+	 *
+	 * @member {number}
+	 */
+	prototypeAccessors$7.dropShadowDistance.get = function ()
+	{
+	    return this._dropShadowDistance;
+	};
+	prototypeAccessors$7.dropShadowDistance.set = function (dropShadowDistance) // eslint-disable-line require-jsdoc
+	{
+	    if (this._dropShadowDistance !== dropShadowDistance)
+	    {
+	        this._dropShadowDistance = dropShadowDistance;
+	        this.styleID++;
+	    }
+	};
+
+	/**
+	 * A canvas fillstyle that will be used on the text e.g 'red', '#00FF00'.
+	 * Can be an array to create a gradient eg ['#000000','#FFFFFF']
+	 * {@link https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/fillStyle|MDN}
+	 *
+	 * @member {string|string[]|number|number[]|CanvasGradient|CanvasPattern}
+	 */
+	prototypeAccessors$7.fill.get = function ()
+	{
+	    return this._fill;
+	};
+	prototypeAccessors$7.fill.set = function (fill) // eslint-disable-line require-jsdoc
+	{
+	    var outputColor = getColor(fill);
+	    if (this._fill !== outputColor)
+	    {
+	        this._fill = outputColor;
+	        this.styleID++;
+	    }
+	};
+
+	/**
+	 * If fill is an array of colours to create a gradient, this can change the type/direction of the gradient.
+	 * See {@link PIXI.TEXT_GRADIENT}
+	 *
+	 * @member {number}
+	 */
+	prototypeAccessors$7.fillGradientType.get = function ()
+	{
+	    return this._fillGradientType;
+	};
+	prototypeAccessors$7.fillGradientType.set = function (fillGradientType) // eslint-disable-line require-jsdoc
+	{
+	    if (this._fillGradientType !== fillGradientType)
+	    {
+	        this._fillGradientType = fillGradientType;
+	        this.styleID++;
+	    }
+	};
+
+	/**
+	 * If fill is an array of colours to create a gradient, this array can set the stop points
+	 * (numbers between 0 and 1) for the color, overriding the default behaviour of evenly spacing them.
+	 *
+	 * @member {number[]}
+	 */
+	prototypeAccessors$7.fillGradientStops.get = function ()
+	{
+	    return this._fillGradientStops;
+	};
+	prototypeAccessors$7.fillGradientStops.set = function (fillGradientStops) // eslint-disable-line require-jsdoc
+	{
+	    if (!areArraysEqual(this._fillGradientStops,fillGradientStops))
+	    {
+	        this._fillGradientStops = fillGradientStops;
+	        this.styleID++;
+	    }
+	};
+
+	/**
+	 * The font family
+	 *
+	 * @member {string|string[]}
+	 */
+	prototypeAccessors$7.fontFamily.get = function ()
+	{
+	    return this._fontFamily;
+	};
+	prototypeAccessors$7.fontFamily.set = function (fontFamily) // eslint-disable-line require-jsdoc
+	{
+	    if (this.fontFamily !== fontFamily)
+	    {
+	        this._fontFamily = fontFamily;
+	        this.styleID++;
+	    }
+	};
+
+	/**
+	 * The font size
+	 * (as a number it converts to px, but as a string, equivalents are '26px','20pt','160%' or '1.6em')
+	 *
+	 * @member {number|string}
+	 */
+	prototypeAccessors$7.fontSize.get = function ()
+	{
+	    return this._fontSize;
+	};
+	prototypeAccessors$7.fontSize.set = function (fontSize) // eslint-disable-line require-jsdoc
+	{
+	    if (this._fontSize !== fontSize)
+	    {
+	        this._fontSize = fontSize;
+	        this.styleID++;
+	    }
+	};
+
+	/**
+	 * The font style
+	 * ('normal', 'italic' or 'oblique')
+	 *
+	 * @member {string}
+	 */
+	prototypeAccessors$7.fontStyle.get = function ()
+	{
+	    return this._fontStyle;
+	};
+	prototypeAccessors$7.fontStyle.set = function (fontStyle) // eslint-disable-line require-jsdoc
+	{
+	    if (this._fontStyle !== fontStyle)
+	    {
+	        this._fontStyle = fontStyle;
+	        this.styleID++;
+	    }
+	};
+
+	/**
+	 * The font variant
+	 * ('normal' or 'small-caps')
+	 *
+	 * @member {string}
+	 */
+	prototypeAccessors$7.fontVariant.get = function ()
+	{
+	    return this._fontVariant;
+	};
+	prototypeAccessors$7.fontVariant.set = function (fontVariant) // eslint-disable-line require-jsdoc
+	{
+	    if (this._fontVariant !== fontVariant)
+	    {
+	        this._fontVariant = fontVariant;
+	        this.styleID++;
+	    }
+	};
+
+	/**
+	 * The font weight
+	 * ('normal', 'bold', 'bolder', 'lighter' and '100', '200', '300', '400', '500', '600', '700', 800' or '900')
+	 *
+	 * @member {string}
+	 */
+	prototypeAccessors$7.fontWeight.get = function ()
+	{
+	    return this._fontWeight;
+	};
+	prototypeAccessors$7.fontWeight.set = function (fontWeight) // eslint-disable-line require-jsdoc
+	{
+	    if (this._fontWeight !== fontWeight)
+	    {
+	        this._fontWeight = fontWeight;
+	        this.styleID++;
+	    }
+	};
+
+	/**
+	 * The amount of spacing between letters, default is 0
+	 *
+	 * @member {number}
+	 */
+	prototypeAccessors$7.letterSpacing.get = function ()
+	{
+	    return this._letterSpacing;
+	};
+	prototypeAccessors$7.letterSpacing.set = function (letterSpacing) // eslint-disable-line require-jsdoc
+	{
+	    if (this._letterSpacing !== letterSpacing)
+	    {
+	        this._letterSpacing = letterSpacing;
+	        this.styleID++;
+	    }
+	};
+
+	/**
+	 * The line height, a number that represents the vertical space that a letter uses
+	 *
+	 * @member {number}
+	 */
+	prototypeAccessors$7.lineHeight.get = function ()
+	{
+	    return this._lineHeight;
+	};
+	prototypeAccessors$7.lineHeight.set = function (lineHeight) // eslint-disable-line require-jsdoc
+	{
+	    if (this._lineHeight !== lineHeight)
+	    {
+	        this._lineHeight = lineHeight;
+	        this.styleID++;
+	    }
+	};
+
+	/**
+	 * The space between lines
+	 *
+	 * @member {number}
+	 */
+	prototypeAccessors$7.leading.get = function ()
+	{
+	    return this._leading;
+	};
+	prototypeAccessors$7.leading.set = function (leading) // eslint-disable-line require-jsdoc
+	{
+	    if (this._leading !== leading)
+	    {
+	        this._leading = leading;
+	        this.styleID++;
+	    }
+	};
+
+	/**
+	 * The lineJoin property sets the type of corner created, it can resolve spiked text issues.
+	 * Default is 'miter' (creates a sharp corner).
+	 *
+	 * @member {string}
+	 */
+	prototypeAccessors$7.lineJoin.get = function ()
+	{
+	    return this._lineJoin;
+	};
+	prototypeAccessors$7.lineJoin.set = function (lineJoin) // eslint-disable-line require-jsdoc
+	{
+	    if (this._lineJoin !== lineJoin)
+	    {
+	        this._lineJoin = lineJoin;
+	        this.styleID++;
+	    }
+	};
+
+	/**
+	 * The miter limit to use when using the 'miter' lineJoin mode
+	 * This can reduce or increase the spikiness of rendered text.
+	 *
+	 * @member {number}
+	 */
+	prototypeAccessors$7.miterLimit.get = function ()
+	{
+	    return this._miterLimit;
+	};
+	prototypeAccessors$7.miterLimit.set = function (miterLimit) // eslint-disable-line require-jsdoc
+	{
+	    if (this._miterLimit !== miterLimit)
+	    {
+	        this._miterLimit = miterLimit;
+	        this.styleID++;
+	    }
+	};
+
+	/**
+	 * Occasionally some fonts are cropped. Adding some padding will prevent this from happening
+	 * by adding padding to all sides of the text.
+	 *
+	 * @member {number}
+	 */
+	prototypeAccessors$7.padding.get = function ()
+	{
+	    return this._padding;
+	};
+	prototypeAccessors$7.padding.set = function (padding) // eslint-disable-line require-jsdoc
+	{
+	    if (this._padding !== padding)
+	    {
+	        this._padding = padding;
+	        this.styleID++;
+	    }
+	};
+
+	/**
+	 * A canvas fillstyle that will be used on the text stroke
+	 * e.g 'blue', '#FCFF00'
+	 *
+	 * @member {string|number}
+	 */
+	prototypeAccessors$7.stroke.get = function ()
+	{
+	    return this._stroke;
+	};
+	prototypeAccessors$7.stroke.set = function (stroke) // eslint-disable-line require-jsdoc
+	{
+	    var outputColor = getColor(stroke);
+	    if (this._stroke !== outputColor)
+	    {
+	        this._stroke = outputColor;
+	        this.styleID++;
+	    }
+	};
+
+	/**
+	 * A number that represents the thickness of the stroke.
+	 * Default is 0 (no stroke)
+	 *
+	 * @member {number}
+	 */
+	prototypeAccessors$7.strokeThickness.get = function ()
+	{
+	    return this._strokeThickness;
+	};
+	prototypeAccessors$7.strokeThickness.set = function (strokeThickness) // eslint-disable-line require-jsdoc
+	{
+	    if (this._strokeThickness !== strokeThickness)
+	    {
+	        this._strokeThickness = strokeThickness;
+	        this.styleID++;
+	    }
+	};
+
+	/**
+	 * The baseline of the text that is rendered.
+	 *
+	 * @member {string}
+	 */
+	prototypeAccessors$7.textBaseline.get = function ()
+	{
+	    return this._textBaseline;
+	};
+	prototypeAccessors$7.textBaseline.set = function (textBaseline) // eslint-disable-line require-jsdoc
+	{
+	    if (this._textBaseline !== textBaseline)
+	    {
+	        this._textBaseline = textBaseline;
+	        this.styleID++;
+	    }
+	};
+
+	/**
+	 * Trim transparent borders
+	 *
+	 * @member {boolean}
+	 */
+	prototypeAccessors$7.trim.get = function ()
+	{
+	    return this._trim;
+	};
+	prototypeAccessors$7.trim.set = function (trim) // eslint-disable-line require-jsdoc
+	{
+	    if (this._trim !== trim)
+	    {
+	        this._trim = trim;
+	        this.styleID++;
+	    }
+	};
+
+	/**
+	 * How newlines and spaces should be handled.
+	 * Default is 'pre' (preserve, preserve).
+	 *
+	 *  value   | New lines |   Spaces
+	 *  ---     | ---       |   ---
+	 * 'normal' | Collapse  |   Collapse
+	 * 'pre'    | Preserve  |   Preserve
+	 * 'pre-line'   | Preserve  |   Collapse
+	 *
+	 * @member {string}
+	 */
+	prototypeAccessors$7.whiteSpace.get = function ()
+	{
+	    return this._whiteSpace;
+	};
+	prototypeAccessors$7.whiteSpace.set = function (whiteSpace) // eslint-disable-line require-jsdoc
+	{
+	    if (this._whiteSpace !== whiteSpace)
+	    {
+	        this._whiteSpace = whiteSpace;
+	        this.styleID++;
+	    }
+	};
+
+	/**
+	 * Indicates if word wrap should be used
+	 *
+	 * @member {boolean}
+	 */
+	prototypeAccessors$7.wordWrap.get = function ()
+	{
+	    return this._wordWrap;
+	};
+	prototypeAccessors$7.wordWrap.set = function (wordWrap) // eslint-disable-line require-jsdoc
+	{
+	    if (this._wordWrap !== wordWrap)
+	    {
+	        this._wordWrap = wordWrap;
+	        this.styleID++;
+	    }
+	};
+
+	/**
+	 * The width at which text will wrap, it needs wordWrap to be set to true
+	 *
+	 * @member {number}
+	 */
+	prototypeAccessors$7.wordWrapWidth.get = function ()
+	{
+	    return this._wordWrapWidth;
+	};
+	prototypeAccessors$7.wordWrapWidth.set = function (wordWrapWidth) // eslint-disable-line require-jsdoc
+	{
+	    if (this._wordWrapWidth !== wordWrapWidth)
+	    {
+	        this._wordWrapWidth = wordWrapWidth;
+	        this.styleID++;
+	    }
+	};
+
+	/**
+	 * Generates a font style string to use for `TextMetrics.measureFont()`.
+	 *
+	 * @return {string} Font style string, for passing to `TextMetrics.measureFont()`
+	 */
+	TextStyle.prototype.toFontString = function toFontString ()
+	{
+	    // build canvas api font setting from individual components. Convert a numeric this.fontSize to px
+	    var fontSizeString = (typeof this.fontSize === 'number') ? ((this.fontSize) + "px") : this.fontSize;
+
+	    // Clean-up fontFamily property by quoting each font name
+	    // this will support font names with spaces
+	    var fontFamilies = this.fontFamily;
+
+	    if (!Array.isArray(this.fontFamily))
+	    {
+	        fontFamilies = this.fontFamily.split(',');
+	    }
+
+	    for (var i = fontFamilies.length - 1; i >= 0; i--)
+	    {
+	        // Trim any extra white-space
+	        var fontFamily = fontFamilies[i].trim();
+
+	        // Check if font already contains strings
+	        if (!(/([\"\'])[^\'\"]+\1/).test(fontFamily) && genericFontFamilies.indexOf(fontFamily) < 0)
+	        {
+	            fontFamily = "\"" + fontFamily + "\"";
+	        }
+	        fontFamilies[i] = fontFamily;
+	    }
+
+	    return ((this.fontStyle) + " " + (this.fontVariant) + " " + (this.fontWeight) + " " + fontSizeString + " " + (fontFamilies.join(',')));
+	};
+
+	Object.defineProperties( TextStyle.prototype, prototypeAccessors$7 );
+
+	/**
+	 * Utility function to convert hexadecimal colors to strings, and simply return the color if it's a string.
+	 * @private
+	 * @param {number|number[]} color
+	 * @return {string} The color as a string.
+	 */
+	function getSingleColor(color)
+	{
+	    if (typeof color === 'number')
+	    {
+	        return hex2string(color);
+	    }
+	    else if ( typeof color === 'string' )
+	    {
+	        if ( color.indexOf('0x') === 0 )
+	        {
+	            color = color.replace('0x', '#');
+	        }
+	    }
+
+	    return color;
+	}
+
+	/**
+	 * Utility function to convert hexadecimal colors to strings, and simply return the color if it's a string.
+	 * This version can also convert array of colors
+	 * @private
+	 * @param {number|number[]} color
+	 * @return {string} The color as a string.
+	 */
+	function getColor(color)
+	{
+	    if (!Array.isArray(color))
+	    {
+	        return getSingleColor(color);
+	    }
+	    else
+	    {
+	        for (var i = 0; i < color.length; ++i)
+	        {
+	            color[i] = getSingleColor(color[i]);
+	        }
+
+	        return color;
+	    }
+	}
+
+	/**
+	 * Utility function to convert hexadecimal colors to strings, and simply return the color if it's a string.
+	 * This version can also convert array of colors
+	 * @private
+	 * @param {Array} array1 First array to compare
+	 * @param {Array} array2 Second array to compare
+	 * @return {boolean} Do the arrays contain the same values in the same order
+	 */
+	function areArraysEqual(array1, array2)
+	{
+	    if (!Array.isArray(array1) || !Array.isArray(array2))
+	    {
+	        return false;
+	    }
+
+	    if (array1.length !== array2.length)
+	    {
+	        return false;
+	    }
+
+	    for (var i = 0; i < array1.length; ++i)
+	    {
+	        if (array1[i] !== array2[i])
+	        {
+	            return false;
+	        }
+	    }
+
+	    return true;
+	}
+
+	/**
+	 * Utility function to ensure that object properties are copied by value, and not by reference
+	 * @private
+	 * @param {Object} target Target object to copy properties into
+	 * @param {Object} source Source object for the properties to copy
+	 * @param {string} propertyObj Object containing properties names we want to loop over
+	 */
+	function deepCopyProperties(target, source, propertyObj) {
+	    for (var prop in propertyObj) {
+	        if (Array.isArray(source[prop])) {
+	            target[prop] = source[prop].slice();
+	        } else {
+	            target[prop] = source[prop];
+	        }
+	    }
+	}
+
+	/**
+	 * The TextMetrics object represents the measurement of a block of text with a specified style.
+	 *
+	 * ```js
+	 * let style = new PIXI.TextStyle({fontFamily : 'Arial', fontSize: 24, fill : 0xff1010, align : 'center'})
+	 * let textMetrics = PIXI.TextMetrics.measureText('Your text', style)
+	 * ```
+	 *
+	 * @class
+	 * @memberof PIXI
+	 */
+	var TextMetrics = function TextMetrics(text, style, width, height, lines, lineWidths, lineHeight, maxLineWidth, fontProperties)
+	{
+	    /**
+	     * The text that was measured
+	     *
+	     * @member {string}
+	     */
+	    this.text = text;
+
+	    /**
+	     * The style that was measured
+	     *
+	     * @member {PIXI.TextStyle}
+	     */
+	    this.style = style;
+
+	    /**
+	     * The measured width of the text
+	     *
+	     * @member {number}
+	     */
+	    this.width = width;
+
+	    /**
+	     * The measured height of the text
+	     *
+	     * @member {number}
+	     */
+	    this.height = height;
+
+	    /**
+	     * An array of lines of the text broken by new lines and wrapping is specified in style
+	     *
+	     * @member {string[]}
+	     */
+	    this.lines = lines;
+
+	    /**
+	     * An array of the line widths for each line matched to `lines`
+	     *
+	     * @member {number[]}
+	     */
+	    this.lineWidths = lineWidths;
+
+	    /**
+	     * The measured line height for this style
+	     *
+	     * @member {number}
+	     */
+	    this.lineHeight = lineHeight;
+
+	    /**
+	     * The maximum line width for all measured lines
+	     *
+	     * @member {number}
+	     */
+	    this.maxLineWidth = maxLineWidth;
+
+	    /**
+	     * The font properties object from TextMetrics.measureFont
+	     *
+	     * @member {PIXI.IFontMetrics}
+	     */
+	    this.fontProperties = fontProperties;
+	};
+
+	/**
+	 * Measures the supplied string of text and returns a Rectangle.
+	 *
+	 * @param {string} text - the text to measure.
+	 * @param {PIXI.TextStyle} style - the text style to use for measuring
+	 * @param {boolean} [wordWrap] - optional override for if word-wrap should be applied to the text.
+	 * @param {HTMLCanvasElement} [canvas] - optional specification of the canvas to use for measuring.
+	 * @return {PIXI.TextMetrics} measured width and height of the text.
+	 */
+	TextMetrics.measureText = function measureText (text, style, wordWrap, canvas)
+	{
+	        if ( canvas === void 0 ) { canvas = TextMetrics._canvas; }
+
+	    wordWrap = (wordWrap === undefined || wordWrap === null) ? style.wordWrap : wordWrap;
+	    var font = style.toFontString();
+	    var fontProperties = TextMetrics.measureFont(font);
+
+	    // fallback in case UA disallow canvas data extraction
+	    // (toDataURI, getImageData functions)
+	    if (fontProperties.fontSize === 0)
+	    {
+	        fontProperties.fontSize = style.fontSize;
+	        fontProperties.ascent = style.fontSize;
+	    }
+
+	    var context = canvas.getContext('2d');
+
+	    context.font = font;
+
+	    var outputText = wordWrap ? TextMetrics.wordWrap(text, style, canvas) : text;
+	    var lines = outputText.split(/(?:\r\n|\r|\n)/);
+	    var lineWidths = new Array(lines.length);
+	    var maxLineWidth = 0;
+
+	    for (var i = 0; i < lines.length; i++)
+	    {
+	        var lineWidth = context.measureText(lines[i]).width + ((lines[i].length - 1) * style.letterSpacing);
+
+	        lineWidths[i] = lineWidth;
+	        maxLineWidth = Math.max(maxLineWidth, lineWidth);
+	    }
+	    var width = maxLineWidth + style.strokeThickness;
+
+	    if (style.dropShadow)
+	    {
+	        width += style.dropShadowDistance;
+	    }
+
+	    var lineHeight = style.lineHeight || fontProperties.fontSize + style.strokeThickness;
+	    var height = Math.max(lineHeight, fontProperties.fontSize + style.strokeThickness)
+	        + ((lines.length - 1) * (lineHeight + style.leading));
+
+	    if (style.dropShadow)
+	    {
+	        height += style.dropShadowDistance;
+	    }
+
+	    return new TextMetrics(
+	        text,
+	        style,
+	        width,
+	        height,
+	        lines,
+	        lineWidths,
+	        lineHeight + style.leading,
+	        maxLineWidth,
+	        fontProperties
+	    );
+	};
+
+	/**
+	 * Applies newlines to a string to have it optimally fit into the horizontal
+	 * bounds set by the Text object's wordWrapWidth property.
+	 *
+	 * @private
+	 * @param {string} text - String to apply word wrapping to
+	 * @param {PIXI.TextStyle} style - the style to use when wrapping
+	 * @param {HTMLCanvasElement} [canvas] - optional specification of the canvas to use for measuring.
+	 * @return {string} New string with new lines applied where required
+	 */
+	TextMetrics.wordWrap = function wordWrap (text, style, canvas)
+	{
+	        if ( canvas === void 0 ) { canvas = TextMetrics._canvas; }
+
+	    var context = canvas.getContext('2d');
+
+	    var width = 0;
+	    var line = '';
+	    var lines = '';
+
+	    var cache = {};
+	    var letterSpacing = style.letterSpacing;
+	        var whiteSpace = style.whiteSpace;
+
+	    // How to handle whitespaces
+	    var collapseSpaces = TextMetrics.collapseSpaces(whiteSpace);
+	    var collapseNewlines = TextMetrics.collapseNewlines(whiteSpace);
+
+	    // whether or not spaces may be added to the beginning of lines
+	    var canPrependSpaces = !collapseSpaces;
+
+	    // There is letterSpacing after every char except the last one
+	    // t_h_i_s_' '_i_s_' '_a_n_' '_e_x_a_m_p_l_e_' '_!
+	    // so for convenience the above needs to be compared to width + 1 extra letterSpace
+	    // t_h_i_s_' '_i_s_' '_a_n_' '_e_x_a_m_p_l_e_' '_!_
+	    // ________________________________________________
+	    // And then the final space is simply no appended to each line
+	    var wordWrapWidth = style.wordWrapWidth + letterSpacing;
+
+	    // break text into words, spaces and newline chars
+	    var tokens = TextMetrics.tokenize(text);
+
+	    for (var i = 0; i < tokens.length; i++)
+	    {
+	        // get the word, space or newlineChar
+	        var token = tokens[i];
+
+	        // if word is a new line
+	        if (TextMetrics.isNewline(token))
+	        {
+	            // keep the new line
+	            if (!collapseNewlines)
+	            {
+	                lines += TextMetrics.addLine(line);
+	                canPrependSpaces = !collapseSpaces;
+	                line = '';
+	                width = 0;
+	                continue;
+	            }
+
+	            // if we should collapse new lines
+	            // we simply convert it into a space
+	            token = ' ';
+	        }
+
+	        // if we should collapse repeated whitespaces
+	        if (collapseSpaces)
+	        {
+	            // check both this and the last tokens for spaces
+	            var currIsBreakingSpace = TextMetrics.isBreakingSpace(token);
+	            var lastIsBreakingSpace = TextMetrics.isBreakingSpace(line[line.length - 1]);
+
+	            if (currIsBreakingSpace && lastIsBreakingSpace)
+	            {
+	                continue;
+	            }
+	        }
+
+	        // get word width from cache if possible
+	        var tokenWidth = TextMetrics.getFromCache(token, letterSpacing, cache, context);
+
+	        // word is longer than desired bounds
+	        if (tokenWidth > wordWrapWidth)
+	        {
+	            // if we are not already at the beginning of a line
+	            if (line !== '')
+	            {
+	                // start newlines for overflow words
+	                lines += TextMetrics.addLine(line);
+	                line = '';
+	                width = 0;
+	            }
+
+	            // break large word over multiple lines
+	            if (TextMetrics.canBreakWords(token, style.breakWords))
+	            {
+	                // break word into characters
+	                var characters = token.split('');
+
+	                // loop the characters
+	                for (var j = 0; j < characters.length; j++)
+	                {
+	                    var char = characters[j];
+
+	                    var k = 1;
+	                    // we are not at the end of the token
+
+	                    while (characters[j + k])
+	                    {
+	                        var nextChar = characters[j + k];
+	                        var lastChar = char[char.length - 1];
+
+	                        // should not split chars
+	                        if (!TextMetrics.canBreakChars(lastChar, nextChar, token, j, style.breakWords))
+	                        {
+	                            // combine chars & move forward one
+	                            char += nextChar;
+	                        }
+	                        else
+	                        {
+	                            break;
+	                        }
+
+	                        k++;
+	                    }
+
+	                    j += char.length - 1;
+
+	                    var characterWidth = TextMetrics.getFromCache(char, letterSpacing, cache, context);
+
+	                    if (characterWidth + width > wordWrapWidth)
+	                    {
+	                        lines += TextMetrics.addLine(line);
+	                        canPrependSpaces = false;
+	                        line = '';
+	                        width = 0;
+	                    }
+
+	                    line += char;
+	                    width += characterWidth;
+	                }
+	            }
+
+	            // run word out of the bounds
+	            else
+	            {
+	                // if there are words in this line already
+	                // finish that line and start a new one
+	                if (line.length > 0)
+	                {
+	                    lines += TextMetrics.addLine(line);
+	                    line = '';
+	                    width = 0;
+	                }
+
+	                var isLastToken = i === tokens.length - 1;
+
+	                // give it its own line if it's not the end
+	                lines += TextMetrics.addLine(token, !isLastToken);
+	                canPrependSpaces = false;
+	                line = '';
+	                width = 0;
+	            }
+	        }
+
+	        // word could fit
+	        else
+	        {
+	            // word won't fit because of existing words
+	            // start a new line
+	            if (tokenWidth + width > wordWrapWidth)
+	            {
+	                // if its a space we don't want it
+	                canPrependSpaces = false;
+
+	                // add a new line
+	                lines += TextMetrics.addLine(line);
+
+	                // start a new line
+	                line = '';
+	                width = 0;
+	            }
+
+	            // don't add spaces to the beginning of lines
+	            if (line.length > 0 || !TextMetrics.isBreakingSpace(token) || canPrependSpaces)
+	            {
+	                // add the word to the current line
+	                line += token;
+
+	                // update width counter
+	                width += tokenWidth;
+	            }
+	        }
+	    }
+
+	    lines += TextMetrics.addLine(line, false);
+
+	    return lines;
+	};
+
+	/**
+	 * Convienience function for logging each line added during the wordWrap
+	 * method
+	 *
+	 * @private
+	 * @param  {string}   line    - The line of text to add
+	 * @param  {boolean}  newLine - Add new line character to end
+	 * @return {string}   A formatted line
+	 */
+	TextMetrics.addLine = function addLine (line, newLine)
+	{
+	        if ( newLine === void 0 ) { newLine = true; }
+
+	    line = TextMetrics.trimRight(line);
+
+	    line = (newLine) ? (line + "\n") : line;
+
+	    return line;
+	};
+
+	/**
+	 * Gets & sets the widths of calculated characters in a cache object
+	 *
+	 * @private
+	 * @param  {string}                key        The key
+	 * @param  {number}                letterSpacing  The letter spacing
+	 * @param  {object}                cache      The cache
+	 * @param  {CanvasRenderingContext2D}  context    The canvas context
+	 * @return {number}                The from cache.
+	 */
+	TextMetrics.getFromCache = function getFromCache (key, letterSpacing, cache, context)
+	{
+	    var width = cache[key];
+
+	    if (width === undefined)
+	    {
+	        var spacing = ((key.length) * letterSpacing);
+
+	        width = context.measureText(key).width + spacing;
+	        cache[key] = width;
+	    }
+
+	    return width;
+	};
+
+	/**
+	 * Determines whether we should collapse breaking spaces
+	 *
+	 * @private
+	 * @param  {string}   whiteSpace  The TextStyle property whiteSpace
+	 * @return {boolean}  should collapse
+	 */
+	TextMetrics.collapseSpaces = function collapseSpaces (whiteSpace)
+	{
+	    return (whiteSpace === 'normal' || whiteSpace === 'pre-line');
+	};
+
+	/**
+	 * Determines whether we should collapse newLine chars
+	 *
+	 * @private
+	 * @param  {string}   whiteSpace  The white space
+	 * @return {boolean}  should collapse
+	 */
+	TextMetrics.collapseNewlines = function collapseNewlines (whiteSpace)
+	{
+	    return (whiteSpace === 'normal');
+	};
+
+	/**
+	 * trims breaking whitespaces from string
+	 *
+	 * @private
+	 * @param  {string}  text  The text
+	 * @return {string}  trimmed string
+	 */
+	TextMetrics.trimRight = function trimRight (text)
+	{
+	    if (typeof text !== 'string')
+	    {
+	        return '';
+	    }
+
+	    for (var i = text.length - 1; i >= 0; i--)
+	    {
+	        var char = text[i];
+
+	        if (!TextMetrics.isBreakingSpace(char))
+	        {
+	            break;
+	        }
+
+	        text = text.slice(0, -1);
+	    }
+
+	    return text;
+	};
+
+	/**
+	 * Determines if char is a newline.
+	 *
+	 * @private
+	 * @param  {string}  char  The character
+	 * @return {boolean}  True if newline, False otherwise.
+	 */
+	TextMetrics.isNewline = function isNewline (char)
+	{
+	    if (typeof char !== 'string')
+	    {
+	        return false;
+	    }
+
+	    return (TextMetrics._newlines.indexOf(char.charCodeAt(0)) >= 0);
+	};
+
+	/**
+	 * Determines if char is a breaking whitespace.
+	 *
+	 * @private
+	 * @param  {string}  char  The character
+	 * @return {boolean}  True if whitespace, False otherwise.
+	 */
+	TextMetrics.isBreakingSpace = function isBreakingSpace (char)
+	{
+	    if (typeof char !== 'string')
+	    {
+	        return false;
+	    }
+
+	    return (TextMetrics._breakingSpaces.indexOf(char.charCodeAt(0)) >= 0);
+	};
+
+	/**
+	 * Splits a string into words, breaking-spaces and newLine characters
+	 *
+	 * @private
+	 * @param  {string}  text   The text
+	 * @return {string[]}  A tokenized array
+	 */
+	TextMetrics.tokenize = function tokenize (text)
+	{
+	    var tokens = [];
+	    var token = '';
+
+	    if (typeof text !== 'string')
+	    {
+	        return tokens;
+	    }
+
+	    for (var i = 0; i < text.length; i++)
+	    {
+	        var char = text[i];
+
+	        if (TextMetrics.isBreakingSpace(char) || TextMetrics.isNewline(char))
+	        {
+	            if (token !== '')
+	            {
+	                tokens.push(token);
+	                token = '';
+	            }
+
+	            tokens.push(char);
+
+	            continue;
+	        }
+
+	        token += char;
+	    }
+
+	    if (token !== '')
+	    {
+	        tokens.push(token);
+	    }
+
+	    return tokens;
+	};
+
+	/**
+	 * This method exists to be easily overridden
+	 * It allows one to customise which words should break
+	 * Examples are if the token is CJK or numbers.
+	 * It must return a boolean.
+	 *
+	 * @private
+	 * @param  {string}  token   The token
+	 * @param  {boolean}  breakWords  The style attr break words
+	 * @return {boolean} whether to break word or not
+	 */
+	TextMetrics.canBreakWords = function canBreakWords (token, breakWords)
+	{
+	    return breakWords;
+	};
+
+	/**
+	 * This method exists to be easily overridden
+	 * It allows one to determine whether a pair of characters
+	 * should be broken by newlines
+	 * For example certain characters in CJK langs or numbers.
+	 * It must return a boolean.
+	 *
+	 * @private
+	 * @param  {string}  char  The character
+	 * @param  {string}  nextChar  The next character
+	 * @param  {string}  token The token/word the characters are from
+	 * @param  {number}  index The index in the token of the char
+	 * @param  {boolean}  breakWords  The style attr break words
+	 * @return {boolean} whether to break word or not
+	 */
+	TextMetrics.canBreakChars = function canBreakChars (char, nextChar, token, index, breakWords) // eslint-disable-line no-unused-vars
+	{
+	    return true;
+	};
+
+	/**
+	 * Calculates the ascent, descent and fontSize of a given font-style
+	 *
+	 * @static
+	 * @param {string} font - String representing the style of the font
+	 * @return {PIXI.IFontMetrics} Font properties object
+	 */
+	TextMetrics.measureFont = function measureFont (font)
+	{
+	    // as this method is used for preparing assets, don't recalculate things if we don't need to
+	    if (TextMetrics._fonts[font])
+	    {
+	        return TextMetrics._fonts[font];
+	    }
+
+	    var properties = {};
+
+	    var canvas = TextMetrics._canvas;
+	    var context = TextMetrics._context;
+
+	    context.font = font;
+
+	    var metricsString = TextMetrics.METRICS_STRING + TextMetrics.BASELINE_SYMBOL;
+	    var width = Math.ceil(context.measureText(metricsString).width);
+	    var baseline = Math.ceil(context.measureText(TextMetrics.BASELINE_SYMBOL).width);
+	    var height = 2 * baseline;
+
+	    baseline = baseline * TextMetrics.BASELINE_MULTIPLIER | 0;
+
+	    canvas.width = width;
+	    canvas.height = height;
+
+	    context.fillStyle = '#f00';
+	    context.fillRect(0, 0, width, height);
+
+	    context.font = font;
+
+	    context.textBaseline = 'alphabetic';
+	    context.fillStyle = '#000';
+	    context.fillText(metricsString, 0, baseline);
+
+	    var imagedata = context.getImageData(0, 0, width, height).data;
+	    var pixels = imagedata.length;
+	    var line = width * 4;
+
+	    var i = 0;
+	    var idx = 0;
+	    var stop = false;
+
+	    // ascent. scan from top to bottom until we find a non red pixel
+	    for (i = 0; i < baseline; ++i)
+	    {
+	        for (var j = 0; j < line; j += 4)
+	        {
+	            if (imagedata[idx + j] !== 255)
+	            {
+	                stop = true;
+	                break;
+	            }
+	        }
+	        if (!stop)
+	        {
+	            idx += line;
+	        }
+	        else
+	        {
+	            break;
+	        }
+	    }
+
+	    properties.ascent = baseline - i;
+
+	    idx = pixels - line;
+	    stop = false;
+
+	    // descent. scan from bottom to top until we find a non red pixel
+	    for (i = height; i > baseline; --i)
+	    {
+	        for (var j$1 = 0; j$1 < line; j$1 += 4)
+	        {
+	            if (imagedata[idx + j$1] !== 255)
+	            {
+	                stop = true;
+	                break;
+	            }
+	        }
+
+	        if (!stop)
+	        {
+	            idx -= line;
+	        }
+	        else
+	        {
+	            break;
+	        }
+	    }
+
+	    properties.descent = i - baseline;
+	    properties.fontSize = properties.ascent + properties.descent;
+
+	    TextMetrics._fonts[font] = properties;
+
+	    return properties;
+	};
+
+	/**
+	 * Clear font metrics in metrics cache.
+	 *
+	 * @static
+	 * @param {string} [font] - font name. If font name not set then clear cache for all fonts.
+	 */
+	TextMetrics.clearMetrics = function clearMetrics (font)
+	{
+	        if ( font === void 0 ) { font = ''; }
+
+	    if (font)
+	    {
+	        delete TextMetrics._fonts[font];
+	    }
+	    else
+	    {
+	        TextMetrics._fonts = {};
+	    }
+	};
+
+	/**
+	 * Internal return object for {@link PIXI.TextMetrics.measureFont `TextMetrics.measureFont`}.
+	 *
+	 * @typedef {object} FontMetrics
+	 * @property {number} ascent - The ascent distance
+	 * @property {number} descent - The descent distance
+	 * @property {number} fontSize - Font size from ascent to descent
+	 * @memberof PIXI.TextMetrics
+	 * @private
+	 */
+
+	var canvas = (function () {
+	    try
+	    {
+	        // OffscreenCanvas2D measureText can be up to 40% faster.
+	        var c = new OffscreenCanvas(0, 0);
+
+	        return c.getContext('2d') ? c : document.createElement('canvas');
+	    }
+	    catch (ex)
+	    {
+	        return document.createElement('canvas');
+	    }
+	})();
+
+	canvas.width = canvas.height = 10;
+
+	/**
+	 * Cached canvas element for measuring text
+	 *
+	 * @memberof PIXI.TextMetrics
+	 * @type {HTMLCanvasElement}
+	 * @private
+	 */
+	TextMetrics._canvas = canvas;
+
+	/**
+	 * Cache for context to use.
+	 *
+	 * @memberof PIXI.TextMetrics
+	 * @type {CanvasRenderingContext2D}
+	 * @private
+	 */
+	TextMetrics._context = canvas.getContext('2d');
+
+	/**
+	 * Cache of {@see PIXI.TextMetrics.FontMetrics} objects.
+	 *
+	 * @memberof PIXI.TextMetrics
+	 * @type {Object}
+	 * @private
+	 */
+	TextMetrics._fonts = {};
+
+	/**
+	 * String used for calculate font metrics.
+	 * These characters are all tall to help calculate the height required for text.
+	 *
+	 * @static
+	 * @memberof PIXI.TextMetrics
+	 * @name METRICS_STRING
+	 * @type {string}
+	 * @default |ÉqÅ
+	 */
+	TextMetrics.METRICS_STRING = '|ÉqÅ';
+
+	/**
+	 * Baseline symbol for calculate font metrics.
+	 *
+	 * @static
+	 * @memberof PIXI.TextMetrics
+	 * @name BASELINE_SYMBOL
+	 * @type {string}
+	 * @default M
+	 */
+	TextMetrics.BASELINE_SYMBOL = 'M';
+
+	/**
+	 * Baseline multiplier for calculate font metrics.
+	 *
+	 * @static
+	 * @memberof PIXI.TextMetrics
+	 * @name BASELINE_MULTIPLIER
+	 * @type {number}
+	 * @default 1.4
+	 */
+	TextMetrics.BASELINE_MULTIPLIER = 1.4;
+
+	/**
+	 * Cache of new line chars.
+	 *
+	 * @memberof PIXI.TextMetrics
+	 * @type {number[]}
+	 * @private
+	 */
+	TextMetrics._newlines = [
+	    0x000A, // line feed
+	    0x000D ];
+
+	/**
+	 * Cache of breaking spaces.
+	 *
+	 * @memberof PIXI.TextMetrics
+	 * @type {number[]}
+	 * @private
+	 */
+	TextMetrics._breakingSpaces = [
+	    0x0009, // character tabulation
+	    0x0020, // space
+	    0x2000, // en quad
+	    0x2001, // em quad
+	    0x2002, // en space
+	    0x2003, // em space
+	    0x2004, // three-per-em space
+	    0x2005, // four-per-em space
+	    0x2006, // six-per-em space
+	    0x2008, // punctuation space
+	    0x2009, // thin space
+	    0x200A, // hair space
+	    0x205F, // medium mathematical space
+	    0x3000 ];
+
+	/**
+	 * A number, or a string containing a number.
+	 *
+	 * @memberof PIXI
+	 * @typedef IFontMetrics
+	 * @property {number} ascent - Font ascent
+	 * @property {number} descent - Font descent
+	 * @property {number} fontSize - Font size
+	 */
+
+	/* eslint max-depth: [2, 8] */
+
+	var defaultDestroyOptions = {
+	    texture: true,
+	    children: false,
+	    baseTexture: true,
+	};
+
+	/**
+	 * A Text Object will create a line or multiple lines of text.
+	 *
+	 * The text is created using the [Canvas API](https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API).
+	 *
+	 * The primary advantage of this class over BitmapText is that you have great control over the style of the next,
+	 * which you can change at runtime.
+	 *
+	 * The primary disadvantages is that each piece of text has it's own texture, which can use more memory.
+	 * When text changes, this texture has to be re-generated and re-uploaded to the GPU, taking up time.
+	 *
+	 * To split a line you can use '\n' in your text string, or, on the `style` object,
+	 * change its `wordWrap` property to true and and give the `wordWrapWidth` property a value.
+	 *
+	 * A Text can be created directly from a string and a style object,
+	 * which can be generated [here](https://pixijs.io/pixi-text-style).
+	 *
+	 * ```js
+	 * let text = new PIXI.Text('This is a PixiJS text',{fontFamily : 'Arial', fontSize: 24, fill : 0xff1010, align : 'center'});
+	 * ```
+	 *
+	 * @class
+	 * @extends PIXI.Sprite
+	 * @memberof PIXI
+	 */
+	var Text = /*@__PURE__*/(function (Sprite) {
+	    function Text(text, style, canvas)
+	    {
+	        canvas = canvas || document.createElement('canvas');
+
+	        canvas.width = 3;
+	        canvas.height = 3;
+
+	        var texture = Texture.from(canvas);
+
+	        texture.orig = new Rectangle();
+	        texture.trim = new Rectangle();
+
+	        Sprite.call(this, texture);
+
+	        /**
+	         * The canvas element that everything is drawn to
+	         *
+	         * @member {HTMLCanvasElement}
+	         */
+	        this.canvas = canvas;
+
+	        /**
+	         * The canvas 2d context that everything is drawn with
+	         * @member {CanvasRenderingContext2D}
+	         */
+	        this.context = this.canvas.getContext('2d');
+
+	        /**
+	         * The resolution / device pixel ratio of the canvas.
+	         * This is set to automatically match the renderer resolution by default, but can be overridden by setting manually.
+	         * @member {number}
+	         * @default 1
+	         */
+	        this._resolution = settings.RESOLUTION;
+	        this._autoResolution = true;
+
+	        /**
+	         * Private tracker for the current text.
+	         *
+	         * @member {string}
+	         * @private
+	         */
+	        this._text = null;
+
+	        /**
+	         * Private tracker for the current style.
+	         *
+	         * @member {object}
+	         * @private
+	         */
+	        this._style = null;
+	        /**
+	         * Private listener to track style changes.
+	         *
+	         * @member {Function}
+	         * @private
+	         */
+	        this._styleListener = null;
+
+	        /**
+	         * Private tracker for the current font.
+	         *
+	         * @member {string}
+	         * @private
+	         */
+	        this._font = '';
+
+	        this.text = text;
+	        this.style = style;
+
+	        this.localStyleID = -1;
+	    }
+
+	    if ( Sprite ) { Text.__proto__ = Sprite; }
+	    Text.prototype = Object.create( Sprite && Sprite.prototype );
+	    Text.prototype.constructor = Text;
+
+	    var prototypeAccessors = { width: { configurable: true },height: { configurable: true },style: { configurable: true },text: { configurable: true },resolution: { configurable: true } };
+
+	    /**
+	     * Renders text and updates it when needed.
+	     *
+	     * @private
+	     * @param {boolean} respectDirty - Whether to abort updating the text if the Text isn't dirty and the function is called.
+	     */
+	    Text.prototype.updateText = function updateText (respectDirty)
+	    {
+	        var style = this._style;
+
+	        // check if style has changed..
+	        if (this.localStyleID !== style.styleID)
+	        {
+	            this.dirty = true;
+	            this.localStyleID = style.styleID;
+	        }
+
+	        if (!this.dirty && respectDirty)
+	        {
+	            return;
+	        }
+
+	        this._font = this._style.toFontString();
+
+	        var context = this.context;
+	        var measured = TextMetrics.measureText(this._text || ' ', this._style, this._style.wordWrap, this.canvas);
+	        var width = measured.width;
+	        var height = measured.height;
+	        var lines = measured.lines;
+	        var lineHeight = measured.lineHeight;
+	        var lineWidths = measured.lineWidths;
+	        var maxLineWidth = measured.maxLineWidth;
+	        var fontProperties = measured.fontProperties;
+
+	        this.canvas.width = Math.ceil((Math.max(1, width) + (style.padding * 2)) * this._resolution);
+	        this.canvas.height = Math.ceil((Math.max(1, height) + (style.padding * 2)) * this._resolution);
+
+	        context.scale(this._resolution, this._resolution);
+
+	        context.clearRect(0, 0, this.canvas.width, this.canvas.height);
+
+	        context.font = this._font;
+	        context.lineWidth = style.strokeThickness;
+	        context.textBaseline = style.textBaseline;
+	        context.lineJoin = style.lineJoin;
+	        context.miterLimit = style.miterLimit;
+
+	        var linePositionX;
+	        var linePositionY;
+
+	        // require 2 passes if a shadow; the first to draw the drop shadow, the second to draw the text
+	        var passesCount = style.dropShadow ? 2 : 1;
+
+	        // For v4, we drew text at the colours of the drop shadow underneath the normal text. This gave the correct zIndex,
+	        // but features such as alpha and shadowblur did not look right at all, since we were using actual text as a shadow.
+	        //
+	        // For v5.0.0, we moved over to just use the canvas API for drop shadows, which made them look much nicer and more
+	        // visually please, but now because the stroke is drawn and then the fill, drop shadows would appear on both the fill
+	        // and the stroke; and fill drop shadows would appear over the top of the stroke.
+	        //
+	        // For v5.1.1, the new route is to revert to v4 style of drawing text first to get the drop shadows underneath normal
+	        // text, but instead drawing text in the correct location, we'll draw it off screen (-paddingY), and then adjust the
+	        // drop shadow so only that appears on screen (+paddingY). Now we'll have the correct draw order of the shadow
+	        // beneath the text, whilst also having the proper text shadow styling.
+	        for (var i = 0; i < passesCount; ++i)
+	        {
+	            var isShadowPass = style.dropShadow && i === 0;
+	            var dsOffsetText = isShadowPass ? height * 2 : 0; // we only want the drop shadow, so put text way off-screen
+	            var dsOffsetShadow = dsOffsetText * this.resolution;
+
+	            if (isShadowPass)
+	            {
+	                // On Safari, text with gradient and drop shadows together do not position correctly
+	                // if the scale of the canvas is not 1: https://bugs.webkit.org/show_bug.cgi?id=197689
+	                // Therefore we'll set the styles to be a plain black whilst generating this drop shadow
+	                context.fillStyle = 'black';
+	                context.strokeStyle = 'black';
+
+	                var dropShadowColor = style.dropShadowColor;
+	                var rgb = hex2rgb(typeof dropShadowColor === 'number' ? dropShadowColor : string2hex(dropShadowColor));
+
+	                context.shadowColor = "rgba(" + (rgb[0] * 255) + "," + (rgb[1] * 255) + "," + (rgb[2] * 255) + "," + (style.dropShadowAlpha) + ")";
+	                context.shadowBlur = style.dropShadowBlur;
+	                context.shadowOffsetX = Math.cos(style.dropShadowAngle) * style.dropShadowDistance;
+	                context.shadowOffsetY = (Math.sin(style.dropShadowAngle) * style.dropShadowDistance) + dsOffsetShadow;
+	            }
+	            else
+	            {
+	                // set canvas text styles
+	                context.fillStyle = this._generateFillStyle(style, lines);
+	                context.strokeStyle = style.stroke;
+
+	                context.shadowColor = 0;
+	                context.shadowBlur = 0;
+	                context.shadowOffsetX = 0;
+	                context.shadowOffsetY = 0;
+	            }
+
+	            // draw lines line by line
+	            for (var i$1 = 0; i$1 < lines.length; i$1++)
+	            {
+	                linePositionX = style.strokeThickness / 2;
+	                linePositionY = ((style.strokeThickness / 2) + (i$1 * lineHeight)) + fontProperties.ascent;
+
+	                if (style.align === 'right')
+	                {
+	                    linePositionX += maxLineWidth - lineWidths[i$1];
+	                }
+	                else if (style.align === 'center')
+	                {
+	                    linePositionX += (maxLineWidth - lineWidths[i$1]) / 2;
+	                }
+
+	                if (style.stroke && style.strokeThickness)
+	                {
+	                    this.drawLetterSpacing(
+	                        lines[i$1],
+	                        linePositionX + style.padding,
+	                        linePositionY + style.padding - dsOffsetText,
+	                        true
+	                    );
+	                }
+
+	                if (style.fill)
+	                {
+	                    this.drawLetterSpacing(
+	                        lines[i$1],
+	                        linePositionX + style.padding,
+	                        linePositionY + style.padding - dsOffsetText
+	                    );
+	                }
+	            }
+	        }
+
+	        this.updateTexture();
+	    };
+
+	    /**
+	     * Render the text with letter-spacing.
+	     * @param {string} text - The text to draw
+	     * @param {number} x - Horizontal position to draw the text
+	     * @param {number} y - Vertical position to draw the text
+	     * @param {boolean} [isStroke=false] - Is this drawing for the outside stroke of the
+	     *  text? If not, it's for the inside fill
+	     * @private
+	     */
+	    Text.prototype.drawLetterSpacing = function drawLetterSpacing (text, x, y, isStroke)
+	    {
+	        if ( isStroke === void 0 ) { isStroke = false; }
+
+	        var style = this._style;
+
+	        // letterSpacing of 0 means normal
+	        var letterSpacing = style.letterSpacing;
+
+	        if (letterSpacing === 0)
+	        {
+	            if (isStroke)
+	            {
+	                this.context.strokeText(text, x, y);
+	            }
+	            else
+	            {
+	                this.context.fillText(text, x, y);
+	            }
+
+	            return;
+	        }
+
+	        var currentPosition = x;
+
+	        // Using Array.from correctly splits characters whilst keeping emoji together.
+	        // This is not supported on IE as it requires ES6, so regular text splitting occurs.
+	        // This also doesn't account for emoji that are multiple emoji put together to make something else.
+	        // Handling all of this would require a big library itself.
+	        // https://medium.com/@giltayar/iterating-over-emoji-characters-the-es6-way-f06e4589516
+	        // https://github.com/orling/grapheme-splitter
+	        var stringArray = Array.from ? Array.from(text) : text.split('');
+	        var previousWidth = this.context.measureText(text).width;
+	        var currentWidth = 0;
+
+	        for (var i = 0; i < stringArray.length; ++i)
+	        {
+	            var currentChar = stringArray[i];
+
+	            if (isStroke)
+	            {
+	                this.context.strokeText(currentChar, currentPosition, y);
+	            }
+	            else
+	            {
+	                this.context.fillText(currentChar, currentPosition, y);
+	            }
+	            currentWidth = this.context.measureText(text.substring(i + 1)).width;
+	            currentPosition += previousWidth - currentWidth + letterSpacing;
+	            previousWidth = currentWidth;
+	        }
+	    };
+
+	    /**
+	     * Updates texture size based on canvas size
+	     *
+	     * @private
+	     */
+	    Text.prototype.updateTexture = function updateTexture ()
+	    {
+	        var canvas = this.canvas;
+
+	        if (this._style.trim)
+	        {
+	            var trimmed = trimCanvas(canvas);
+
+	            if (trimmed.data)
+	            {
+	                canvas.width = trimmed.width;
+	                canvas.height = trimmed.height;
+	                this.context.putImageData(trimmed.data, 0, 0);
+	            }
+	        }
+
+	        var texture = this._texture;
+	        var style = this._style;
+	        var padding = style.trim ? 0 : style.padding;
+	        var baseTexture = texture.baseTexture;
+
+	        texture.trim.width = texture._frame.width = Math.ceil(canvas.width / this._resolution);
+	        texture.trim.height = texture._frame.height = Math.ceil(canvas.height / this._resolution);
+	        texture.trim.x = -padding;
+	        texture.trim.y = -padding;
+
+	        texture.orig.width = texture._frame.width - (padding * 2);
+	        texture.orig.height = texture._frame.height - (padding * 2);
+
+	        // call sprite onTextureUpdate to update scale if _width or _height were set
+	        this._onTextureUpdate();
+
+	        baseTexture.setRealSize(canvas.width, canvas.height, this._resolution);
+
+	        this.dirty = false;
+	    };
+
+	    /**
+	     * Renders the object using the WebGL renderer
+	     *
+	     * @private
+	     * @param {PIXI.Renderer} renderer - The renderer
+	     */
+	    Text.prototype._render = function _render (renderer)
+	    {
+	        if (this._autoResolution && this._resolution !== renderer.resolution)
+	        {
+	            this._resolution = renderer.resolution;
+	            this.dirty = true;
+	        }
+
+	        this.updateText(true);
+
+	        Sprite.prototype._render.call(this, renderer);
+	    };
+
+	    /**
+	     * Gets the local bounds of the text object.
+	     *
+	     * @param {PIXI.Rectangle} rect - The output rectangle.
+	     * @return {PIXI.Rectangle} The bounds.
+	     */
+	    Text.prototype.getLocalBounds = function getLocalBounds (rect)
+	    {
+	        this.updateText(true);
+
+	        return Sprite.prototype.getLocalBounds.call(this, rect);
+	    };
+
+	    /**
+	     * calculates the bounds of the Text as a rectangle. The bounds calculation takes the worldTransform into account.
+	     * @protected
+	     */
+	    Text.prototype._calculateBounds = function _calculateBounds ()
+	    {
+	        this.updateText(true);
+	        this.calculateVertices();
+	        // if we have already done this on THIS frame.
+	        this._bounds.addQuad(this.vertexData);
+	    };
+
+	    /**
+	     * Method to be called upon a TextStyle change.
+	     * @private
+	     */
+	    Text.prototype._onStyleChange = function _onStyleChange ()
+	    {
+	        this.dirty = true;
+	    };
+
+	    /**
+	     * Generates the fill style. Can automatically generate a gradient based on the fill style being an array
+	     *
+	     * @private
+	     * @param {object} style - The style.
+	     * @param {string[]} lines - The lines of text.
+	     * @return {string|number|CanvasGradient} The fill style
+	     */
+	    Text.prototype._generateFillStyle = function _generateFillStyle (style, lines)
+	    {
+	        if (!Array.isArray(style.fill))
+	        {
+	            return style.fill;
+	        }
+	        else if (style.fill.length === 1)
+	        {
+	            return style.fill[0];
+	        }
+
+	        // the gradient will be evenly spaced out according to how large the array is.
+	        // ['#FF0000', '#00FF00', '#0000FF'] would created stops at 0.25, 0.5 and 0.75
+	        var gradient;
+	        var totalIterations;
+	        var currentIteration;
+	        var stop;
+
+	        var width = Math.ceil(this.canvas.width / this._resolution);
+	        var height = Math.ceil(this.canvas.height / this._resolution);
+
+	        // make a copy of the style settings, so we can manipulate them later
+	        var fill = style.fill.slice();
+	        var fillGradientStops = style.fillGradientStops.slice();
+
+	        // wanting to evenly distribute the fills. So an array of 4 colours should give fills of 0.25, 0.5 and 0.75
+	        if (!fillGradientStops.length)
+	        {
+	            var lengthPlus1 = fill.length + 1;
+
+	            for (var i = 1; i < lengthPlus1; ++i)
+	            {
+	                fillGradientStops.push(i / lengthPlus1);
+	            }
+	        }
+
+	        // stop the bleeding of the last gradient on the line above to the top gradient of the this line
+	        // by hard defining the first gradient colour at point 0, and last gradient colour at point 1
+	        fill.unshift(style.fill[0]);
+	        fillGradientStops.unshift(0);
+
+	        fill.push(style.fill[style.fill.length - 1]);
+	        fillGradientStops.push(1);
+
+	        if (style.fillGradientType === TEXT_GRADIENT.LINEAR_VERTICAL)
+	        {
+	            // start the gradient at the top center of the canvas, and end at the bottom middle of the canvas
+	            gradient = this.context.createLinearGradient(width / 2, 0, width / 2, height);
+
+	            // we need to repeat the gradient so that each individual line of text has the same vertical gradient effect
+	            // ['#FF0000', '#00FF00', '#0000FF'] over 2 lines would create stops at 0.125, 0.25, 0.375, 0.625, 0.75, 0.875
+	            totalIterations = (fill.length + 1) * lines.length;
+	            currentIteration = 0;
+	            for (var i$1 = 0; i$1 < lines.length; i$1++)
+	            {
+	                currentIteration += 1;
+	                for (var j = 0; j < fill.length; j++)
+	                {
+	                    if (typeof fillGradientStops[j] === 'number')
+	                    {
+	                        stop = (fillGradientStops[j] / lines.length) + (i$1 / lines.length);
+	                    }
+	                    else
+	                    {
+	                        stop = currentIteration / totalIterations;
+	                    }
+	                    gradient.addColorStop(stop, fill[j]);
+	                    currentIteration++;
+	                }
+	            }
+	        }
+	        else
+	        {
+	            // start the gradient at the center left of the canvas, and end at the center right of the canvas
+	            gradient = this.context.createLinearGradient(0, height / 2, width, height / 2);
+
+	            // can just evenly space out the gradients in this case, as multiple lines makes no difference
+	            // to an even left to right gradient
+	            totalIterations = fill.length + 1;
+	            currentIteration = 1;
+
+	            for (var i$2 = 0; i$2 < fill.length; i$2++)
+	            {
+	                if (typeof fillGradientStops[i$2] === 'number')
+	                {
+	                    stop = fillGradientStops[i$2];
+	                }
+	                else
+	                {
+	                    stop = currentIteration / totalIterations;
+	                }
+	                gradient.addColorStop(stop, fill[i$2]);
+	                currentIteration++;
+	            }
+	        }
+
+	        return gradient;
+	    };
+
+	    /**
+	     * Destroys this text object.
+	     * Note* Unlike a Sprite, a Text object will automatically destroy its baseTexture and texture as
+	     * the majority of the time the texture will not be shared with any other Sprites.
+	     *
+	     * @param {object|boolean} [options] - Options parameter. A boolean will act as if all options
+	     *  have been set to that value
+	     * @param {boolean} [options.children=false] - if set to true, all the children will have their
+	     *  destroy method called as well. 'options' will be passed on to those calls.
+	     * @param {boolean} [options.texture=true] - Should it destroy the current texture of the sprite as well
+	     * @param {boolean} [options.baseTexture=true] - Should it destroy the base texture of the sprite as well
+	     */
+	    Text.prototype.destroy = function destroy (options)
+	    {
+	        if (typeof options === 'boolean')
+	        {
+	            options = { children: options };
+	        }
+
+	        options = Object.assign({}, defaultDestroyOptions, options);
+
+	        Sprite.prototype.destroy.call(this, options);
+
+	        // make sure to reset the the context and canvas.. dont want this hanging around in memory!
+	        this.context = null;
+	        this.canvas = null;
+
+	        this._style = null;
+	    };
+
+	    /**
+	     * The width of the Text, setting this will actually modify the scale to achieve the value set
+	     *
+	     * @member {number}
+	     */
+	    prototypeAccessors.width.get = function ()
+	    {
+	        this.updateText(true);
+
+	        return Math.abs(this.scale.x) * this._texture.orig.width;
+	    };
+
+	    prototypeAccessors.width.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        this.updateText(true);
+
+	        var s = sign$1(this.scale.x) || 1;
+
+	        this.scale.x = s * value / this._texture.orig.width;
+	        this._width = value;
+	    };
+
+	    /**
+	     * The height of the Text, setting this will actually modify the scale to achieve the value set
+	     *
+	     * @member {number}
+	     */
+	    prototypeAccessors.height.get = function ()
+	    {
+	        this.updateText(true);
+
+	        return Math.abs(this.scale.y) * this._texture.orig.height;
+	    };
+
+	    prototypeAccessors.height.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        this.updateText(true);
+
+	        var s = sign$1(this.scale.y) || 1;
+
+	        this.scale.y = s * value / this._texture.orig.height;
+	        this._height = value;
+	    };
+
+	    /**
+	     * Set the style of the text. Set up an event listener to listen for changes on the style
+	     * object and mark the text as dirty.
+	     *
+	     * @member {object|PIXI.TextStyle}
+	     */
+	    prototypeAccessors.style.get = function ()
+	    {
+	        return this._style;
+	    };
+
+	    prototypeAccessors.style.set = function (style) // eslint-disable-line require-jsdoc
+	    {
+	        style = style || {};
+
+	        if (style instanceof TextStyle)
+	        {
+	            this._style = style;
+	        }
+	        else
+	        {
+	            this._style = new TextStyle(style);
+	        }
+
+	        this.localStyleID = -1;
+	        this.dirty = true;
+	    };
+
+	    /**
+	     * Set the copy for the text object. To split a line you can use '\n'.
+	     *
+	     * @member {string}
+	     */
+	    prototypeAccessors.text.get = function ()
+	    {
+	        return this._text;
+	    };
+
+	    prototypeAccessors.text.set = function (text) // eslint-disable-line require-jsdoc
+	    {
+	        text = String(text === null || text === undefined ? '' : text);
+
+	        if (this._text === text)
+	        {
+	            return;
+	        }
+	        this._text = text;
+	        this.dirty = true;
+	    };
+
+	    /**
+	     * The resolution / device pixel ratio of the canvas.
+	     * This is set to automatically match the renderer resolution by default, but can be overridden by setting manually.
+	     * @member {number}
+	     * @default 1
+	     */
+	    prototypeAccessors.resolution.get = function ()
+	    {
+	        return this._resolution;
+	    };
+
+	    prototypeAccessors.resolution.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        this._autoResolution = false;
+
+	        if (this._resolution === value)
+	        {
+	            return;
+	        }
+
+	        this._resolution = value;
+	        this.dirty = true;
+	    };
+
+	    Object.defineProperties( Text.prototype, prototypeAccessors );
+
+	    return Text;
+	}(Sprite));
+
+	/*!
+	 * @pixi/prepare - v5.1.4
+	 * Compiled Fri, 20 Sep 2019 17:22:13 UTC
+	 *
+	 * @pixi/prepare is licensed under the MIT License.
+	 * http://www.opensource.org/licenses/mit-license
+	 */
+
+	/**
+	 * Default number of uploads per frame using prepare plugin.
+	 *
+	 * @static
+	 * @memberof PIXI.settings
+	 * @name UPLOADS_PER_FRAME
+	 * @type {number}
+	 * @default 4
+	 */
+	settings.UPLOADS_PER_FRAME = 4;
+
+	/**
+	 * CountLimiter limits the number of items handled by a {@link PIXI.prepare.BasePrepare} to a specified
+	 * number of items per frame.
+	 *
+	 * @class
+	 * @memberof PIXI.prepare
+	 */
+	var CountLimiter = function CountLimiter(maxItemsPerFrame)
+	{
+	    /**
+	     * The maximum number of items that can be prepared each frame.
+	     * @type {number}
+	     * @private
+	     */
+	    this.maxItemsPerFrame = maxItemsPerFrame;
+	    /**
+	     * The number of items that can be prepared in the current frame.
+	     * @type {number}
+	     * @private
+	     */
+	    this.itemsLeft = 0;
+	};
+
+	/**
+	 * Resets any counting properties to start fresh on a new frame.
+	 */
+	CountLimiter.prototype.beginFrame = function beginFrame ()
+	{
+	    this.itemsLeft = this.maxItemsPerFrame;
+	};
+
+	/**
+	 * Checks to see if another item can be uploaded. This should only be called once per item.
+	 * @return {boolean} If the item is allowed to be uploaded.
+	 */
+	CountLimiter.prototype.allowedToUpload = function allowedToUpload ()
+	{
+	    return this.itemsLeft-- > 0;
+	};
+
+	/**
+	 * The prepare manager provides functionality to upload content to the GPU.
+	 *
+	 * BasePrepare handles basic queuing functionality and is extended by
+	 * {@link PIXI.prepare.Prepare} and {@link PIXI.prepare.CanvasPrepare}
+	 * to provide preparation capabilities specific to their respective renderers.
+	 *
+	 * @example
+	 * // Create a sprite
+	 * const sprite = PIXI.Sprite.from('something.png');
+	 *
+	 * // Load object into GPU
+	 * app.renderer.plugins.prepare.upload(sprite, () => {
+	 *
+	 *     //Texture(s) has been uploaded to GPU
+	 *     app.stage.addChild(sprite);
+	 *
+	 * })
+	 *
+	 * @abstract
+	 * @class
+	 * @memberof PIXI.prepare
+	 */
+	var BasePrepare = function BasePrepare(renderer)
+	{
+	    var this$1 = this;
+
+	    /**
+	     * The limiter to be used to control how quickly items are prepared.
+	     * @type {PIXI.prepare.CountLimiter|PIXI.prepare.TimeLimiter}
+	     */
+	    this.limiter = new CountLimiter(settings.UPLOADS_PER_FRAME);
+
+	    /**
+	     * Reference to the renderer.
+	     * @type {PIXI.AbstractRenderer}
+	     * @protected
+	     */
+	    this.renderer = renderer;
+
+	    /**
+	     * The only real difference between CanvasPrepare and Prepare is what they pass
+	     * to upload hooks. That different parameter is stored here.
+	     * @type {PIXI.prepare.CanvasPrepare|PIXI.Renderer}
+	     * @protected
+	     */
+	    this.uploadHookHelper = null;
+
+	    /**
+	     * Collection of items to uploads at once.
+	     * @type {Array<*>}
+	     * @private
+	     */
+	    this.queue = [];
+
+	    /**
+	     * Collection of additional hooks for finding assets.
+	     * @type {Array<Function>}
+	     * @private
+	     */
+	    this.addHooks = [];
+
+	    /**
+	     * Collection of additional hooks for processing assets.
+	     * @type {Array<Function>}
+	     * @private
+	     */
+	    this.uploadHooks = [];
+
+	    /**
+	     * Callback to call after completed.
+	     * @type {Array<Function>}
+	     * @private
+	     */
+	    this.completes = [];
+
+	    /**
+	     * If prepare is ticking (running).
+	     * @type {boolean}
+	     * @private
+	     */
+	    this.ticking = false;
+
+	    /**
+	     * 'bound' call for prepareItems().
+	     * @type {Function}
+	     * @private
+	     */
+	    this.delayedTick = function () {
+	        // unlikely, but in case we were destroyed between tick() and delayedTick()
+	        if (!this$1.queue)
+	        {
+	            return;
+	        }
+	        this$1.prepareItems();
+	    };
+
+	    // hooks to find the correct texture
+	    this.registerFindHook(findText);
+	    this.registerFindHook(findTextStyle);
+	    this.registerFindHook(findMultipleBaseTextures);
+	    this.registerFindHook(findBaseTexture);
+	    this.registerFindHook(findTexture);
+
+	    // upload hooks
+	    this.registerUploadHook(drawText);
+	    this.registerUploadHook(calculateTextStyle);
+	};
+
+	/**
+	 * Upload all the textures and graphics to the GPU.
+	 *
+	 * @param {Function|PIXI.DisplayObject|PIXI.Container|PIXI.BaseTexture|PIXI.Texture|PIXI.Graphics|PIXI.Text} item -
+	 *    Either the container or display object to search for items to upload, the items to upload themselves,
+	 *    or the callback function, if items have been added using `prepare.add`.
+	 * @param {Function} [done] - Optional callback when all queued uploads have completed
+	 */
+	BasePrepare.prototype.upload = function upload (item, done)
+	{
+	    if (typeof item === 'function')
+	    {
+	        done = item;
+	        item = null;
+	    }
+
+	    // If a display object, search for items
+	    // that we could upload
+	    if (item)
+	    {
+	        this.add(item);
+	    }
+
+	    // Get the items for upload from the display
+	    if (this.queue.length)
+	    {
+	        if (done)
+	        {
+	            this.completes.push(done);
+	        }
+
+	        if (!this.ticking)
+	        {
+	            this.ticking = true;
+	            Ticker.system.addOnce(this.tick, this, UPDATE_PRIORITY.UTILITY);
+	        }
+	    }
+	    else if (done)
+	    {
+	        done();
+	    }
+	};
+
+	/**
+	 * Handle tick update
+	 *
+	 * @private
+	 */
+	BasePrepare.prototype.tick = function tick ()
+	{
+	    setTimeout(this.delayedTick, 0);
+	};
+
+	/**
+	 * Actually prepare items. This is handled outside of the tick because it will take a while
+	 * and we do NOT want to block the current animation frame from rendering.
+	 *
+	 * @private
+	 */
+	BasePrepare.prototype.prepareItems = function prepareItems ()
+	{
+	    this.limiter.beginFrame();
+	    // Upload the graphics
+	    while (this.queue.length && this.limiter.allowedToUpload())
+	    {
+	        var item = this.queue[0];
+	        var uploaded = false;
+
+	        if (item && !item._destroyed)
+	        {
+	            for (var i = 0, len = this.uploadHooks.length; i < len; i++)
+	            {
+	                if (this.uploadHooks[i](this.uploadHookHelper, item))
+	                {
+	                    this.queue.shift();
+	                    uploaded = true;
+	                    break;
+	                }
+	            }
+	        }
+
+	        if (!uploaded)
+	        {
+	            this.queue.shift();
+	        }
+	    }
+
+	    // We're finished
+	    if (!this.queue.length)
+	    {
+	        this.ticking = false;
+
+	        var completes = this.completes.slice(0);
+
+	        this.completes.length = 0;
+
+	        for (var i$1 = 0, len$1 = completes.length; i$1 < len$1; i$1++)
+	        {
+	            completes[i$1]();
+	        }
+	    }
+	    else
+	    {
+	        // if we are not finished, on the next rAF do this again
+	        Ticker.system.addOnce(this.tick, this, UPDATE_PRIORITY.UTILITY);
+	    }
+	};
+
+	/**
+	 * Adds hooks for finding items.
+	 *
+	 * @param {Function} addHook - Function call that takes two parameters: `item:*, queue:Array`
+	 *      function must return `true` if it was able to add item to the queue.
+	 * @return {PIXI.prepare.BasePrepare} Instance of plugin for chaining.
+	 */
+	BasePrepare.prototype.registerFindHook = function registerFindHook (addHook)
+	{
+	    if (addHook)
+	    {
+	        this.addHooks.push(addHook);
+	    }
+
+	    return this;
+	};
+
+	/**
+	 * Adds hooks for uploading items.
+	 *
+	 * @param {Function} uploadHook - Function call that takes two parameters: `prepare:CanvasPrepare, item:*` and
+	 *      function must return `true` if it was able to handle upload of item.
+	 * @return {PIXI.prepare.BasePrepare} Instance of plugin for chaining.
+	 */
+	BasePrepare.prototype.registerUploadHook = function registerUploadHook (uploadHook)
+	{
+	    if (uploadHook)
+	    {
+	        this.uploadHooks.push(uploadHook);
+	    }
+
+	    return this;
+	};
+
+	/**
+	 * Manually add an item to the uploading queue.
+	 *
+	 * @param {PIXI.DisplayObject|PIXI.Container|PIXI.BaseTexture|PIXI.Texture|PIXI.Graphics|PIXI.Text|*} item - Object to
+	 *    add to the queue
+	 * @return {PIXI.prepare.BasePrepare} Instance of plugin for chaining.
+	 */
+	BasePrepare.prototype.add = function add (item)
+	{
+	    // Add additional hooks for finding elements on special
+	    // types of objects that
+	    for (var i = 0, len = this.addHooks.length; i < len; i++)
+	    {
+	        if (this.addHooks[i](item, this.queue))
+	        {
+	            break;
+	        }
+	    }
+
+	    // Get children recursively
+	    if (item instanceof Container)
+	    {
+	        for (var i$1 = item.children.length - 1; i$1 >= 0; i$1--)
+	        {
+	            this.add(item.children[i$1]);
+	        }
+	    }
+
+	    return this;
+	};
+
+	/**
+	 * Destroys the plugin, don't use after this.
+	 *
+	 */
+	BasePrepare.prototype.destroy = function destroy ()
+	{
+	    if (this.ticking)
+	    {
+	        Ticker.system.remove(this.tick, this);
+	    }
+	    this.ticking = false;
+	    this.addHooks = null;
+	    this.uploadHooks = null;
+	    this.renderer = null;
+	    this.completes = null;
+	    this.queue = null;
+	    this.limiter = null;
+	    this.uploadHookHelper = null;
+	};
+
+	/**
+	 * Built-in hook to find multiple textures from objects like AnimatedSprites.
+	 *
+	 * @private
+	 * @param {PIXI.DisplayObject} item - Display object to check
+	 * @param {Array<*>} queue - Collection of items to upload
+	 * @return {boolean} if a PIXI.Texture object was found.
+	 */
+	function findMultipleBaseTextures(item, queue)
+	{
+	    var result = false;
+
+	    // Objects with multiple textures
+	    if (item && item._textures && item._textures.length)
+	    {
+	        for (var i = 0; i < item._textures.length; i++)
+	        {
+	            if (item._textures[i] instanceof Texture)
+	            {
+	                var baseTexture = item._textures[i].baseTexture;
+
+	                if (queue.indexOf(baseTexture) === -1)
+	                {
+	                    queue.push(baseTexture);
+	                    result = true;
+	                }
+	            }
+	        }
+	    }
+
+	    return result;
+	}
+
+	/**
+	 * Built-in hook to find BaseTextures from Sprites.
+	 *
+	 * @private
+	 * @param {PIXI.DisplayObject} item - Display object to check
+	 * @param {Array<*>} queue - Collection of items to upload
+	 * @return {boolean} if a PIXI.Texture object was found.
+	 */
+	function findBaseTexture(item, queue)
+	{
+	    // Objects with textures, like Sprites/Text
+	    if (item instanceof BaseTexture)
+	    {
+	        if (queue.indexOf(item) === -1)
+	        {
+	            queue.push(item);
+	        }
+
+	        return true;
+	    }
+
+	    return false;
+	}
+
+	/**
+	 * Built-in hook to find textures from objects.
+	 *
+	 * @private
+	 * @param {PIXI.DisplayObject} item - Display object to check
+	 * @param {Array<*>} queue - Collection of items to upload
+	 * @return {boolean} if a PIXI.Texture object was found.
+	 */
+	function findTexture(item, queue)
+	{
+	    if (item._texture && item._texture instanceof Texture)
+	    {
+	        var texture = item._texture.baseTexture;
+
+	        if (queue.indexOf(texture) === -1)
+	        {
+	            queue.push(texture);
+	        }
+
+	        return true;
+	    }
+
+	    return false;
+	}
+
+	/**
+	 * Built-in hook to draw PIXI.Text to its texture.
+	 *
+	 * @private
+	 * @param {PIXI.Renderer|PIXI.CanvasPrepare} helper - Not used by this upload handler
+	 * @param {PIXI.DisplayObject} item - Item to check
+	 * @return {boolean} If item was uploaded.
+	 */
+	function drawText(helper, item)
+	{
+	    if (item instanceof Text)
+	    {
+	        // updating text will return early if it is not dirty
+	        item.updateText(true);
+
+	        return true;
+	    }
+
+	    return false;
+	}
+
+	/**
+	 * Built-in hook to calculate a text style for a PIXI.Text object.
+	 *
+	 * @private
+	 * @param {PIXI.Renderer|PIXI.CanvasPrepare} helper - Not used by this upload handler
+	 * @param {PIXI.DisplayObject} item - Item to check
+	 * @return {boolean} If item was uploaded.
+	 */
+	function calculateTextStyle(helper, item)
+	{
+	    if (item instanceof TextStyle)
+	    {
+	        var font = item.toFontString();
+
+	        TextMetrics.measureFont(font);
+
+	        return true;
+	    }
+
+	    return false;
+	}
+
+	/**
+	 * Built-in hook to find Text objects.
+	 *
+	 * @private
+	 * @param {PIXI.DisplayObject} item - Display object to check
+	 * @param {Array<*>} queue - Collection of items to upload
+	 * @return {boolean} if a PIXI.Text object was found.
+	 */
+	function findText(item, queue)
+	{
+	    if (item instanceof Text)
+	    {
+	        // push the text style to prepare it - this can be really expensive
+	        if (queue.indexOf(item.style) === -1)
+	        {
+	            queue.push(item.style);
+	        }
+	        // also push the text object so that we can render it (to canvas/texture) if needed
+	        if (queue.indexOf(item) === -1)
+	        {
+	            queue.push(item);
+	        }
+	        // also push the Text's texture for upload to GPU
+	        var texture = item._texture.baseTexture;
+
+	        if (queue.indexOf(texture) === -1)
+	        {
+	            queue.push(texture);
+	        }
+
+	        return true;
+	    }
+
+	    return false;
+	}
+
+	/**
+	 * Built-in hook to find TextStyle objects.
+	 *
+	 * @private
+	 * @param {PIXI.TextStyle} item - Display object to check
+	 * @param {Array<*>} queue - Collection of items to upload
+	 * @return {boolean} if a PIXI.TextStyle object was found.
+	 */
+	function findTextStyle(item, queue)
+	{
+	    if (item instanceof TextStyle)
+	    {
+	        if (queue.indexOf(item) === -1)
+	        {
+	            queue.push(item);
+	        }
+
+	        return true;
+	    }
+
+	    return false;
+	}
+
+	/**
+	 * The prepare manager provides functionality to upload content to the GPU.
+	 *
+	 * An instance of this class is automatically created by default, and can be found at `renderer.plugins.prepare`
+	 *
+	 * @class
+	 * @extends PIXI.prepare.BasePrepare
+	 * @memberof PIXI.prepare
+	 */
+	var Prepare = /*@__PURE__*/(function (BasePrepare) {
+	    function Prepare(renderer)
+	    {
+	        BasePrepare.call(this, renderer);
+
+	        this.uploadHookHelper = this.renderer;
+
+	        // Add textures and graphics to upload
+	        this.registerFindHook(findGraphics);
+	        this.registerUploadHook(uploadBaseTextures);
+	        this.registerUploadHook(uploadGraphics);
+	    }
+
+	    if ( BasePrepare ) { Prepare.__proto__ = BasePrepare; }
+	    Prepare.prototype = Object.create( BasePrepare && BasePrepare.prototype );
+	    Prepare.prototype.constructor = Prepare;
+
+	    return Prepare;
+	}(BasePrepare));
+	/**
+	 * Built-in hook to upload PIXI.Texture objects to the GPU.
+	 *
+	 * @private
+	 * @param {PIXI.Renderer} renderer - instance of the webgl renderer
+	 * @param {PIXI.DisplayObject} item - Item to check
+	 * @return {boolean} If item was uploaded.
+	 */
+	function uploadBaseTextures(renderer, item)
+	{
+	    if (item instanceof BaseTexture)
+	    {
+	        // if the texture already has a GL texture, then the texture has been prepared or rendered
+	        // before now. If the texture changed, then the changer should be calling texture.update() which
+	        // reuploads the texture without need for preparing it again
+	        if (!item._glTextures[renderer.CONTEXT_UID])
+	        {
+	            renderer.texture.bind(item);
+	        }
+
+	        return true;
+	    }
+
+	    return false;
+	}
+
+	/**
+	 * Built-in hook to upload PIXI.Graphics to the GPU.
+	 *
+	 * @private
+	 * @param {PIXI.Renderer} renderer - instance of the webgl renderer
+	 * @param {PIXI.DisplayObject} item - Item to check
+	 * @return {boolean} If item was uploaded.
+	 */
+	function uploadGraphics(renderer, item)
+	{
+	    if (item instanceof Graphics)
+	    {
+	        // if the item is not dirty and already has webgl data, then it got prepared or rendered
+	        // before now and we shouldn't waste time updating it again
+	        if (item.dirty || item.clearDirty || !item._webGL[renderer.plugins.graphics.CONTEXT_UID])
+	        {
+	            renderer.plugins.graphics.updateGraphics(item);
+	        }
+
+	        return true;
+	    }
+
+	    return false;
+	}
+
+	/**
+	 * Built-in hook to find graphics.
+	 *
+	 * @private
+	 * @param {PIXI.DisplayObject} item - Display object to check
+	 * @param {Array<*>} queue - Collection of items to upload
+	 * @return {boolean} if a PIXI.Graphics object was found.
+	 */
+	function findGraphics(item, queue)
+	{
+	    if (item instanceof Graphics)
+	    {
+	        queue.push(item);
+
+	        return true;
+	    }
+
+	    return false;
+	}
+
+	/**
+	 * TimeLimiter limits the number of items handled by a {@link PIXI.BasePrepare} to a specified
+	 * number of milliseconds per frame.
+	 *
+	 * @class
+	 * @memberof PIXI.prepare
+	 */
+	var TimeLimiter = function TimeLimiter(maxMilliseconds)
+	{
+	    /**
+	     * The maximum milliseconds that can be spent preparing items each frame.
+	     * @type {number}
+	     * @private
+	     */
+	    this.maxMilliseconds = maxMilliseconds;
+	    /**
+	     * The start time of the current frame.
+	     * @type {number}
+	     * @private
+	     */
+	    this.frameStart = 0;
+	};
+
+	/**
+	 * Resets any counting properties to start fresh on a new frame.
+	 */
+	TimeLimiter.prototype.beginFrame = function beginFrame ()
+	{
+	    this.frameStart = Date.now();
+	};
+
+	/**
+	 * Checks to see if another item can be uploaded. This should only be called once per item.
+	 * @return {boolean} If the item is allowed to be uploaded.
+	 */
+	TimeLimiter.prototype.allowedToUpload = function allowedToUpload ()
+	{
+	    return Date.now() - this.frameStart < this.maxMilliseconds;
+	};
+
+	var prepare_es = ({
+		BasePrepare: BasePrepare,
+		CountLimiter: CountLimiter,
+		Prepare: Prepare,
+		TimeLimiter: TimeLimiter
+	});
+
+	/*!
+	 * @pixi/app - v5.1.4
+	 * Compiled Fri, 20 Sep 2019 17:22:13 UTC
+	 *
+	 * @pixi/app is licensed under the MIT License.
+	 * http://www.opensource.org/licenses/mit-license
+	 */
+
+	/**
+	 * Convenience class to create a new PIXI application.
+	 *
+	 * This class automatically creates the renderer, ticker and root container.
+	 *
+	 * @example
+	 * // Create the application
+	 * const app = new PIXI.Application();
+	 *
+	 * // Add the view to the DOM
+	 * document.body.appendChild(app.view);
+	 *
+	 * // ex, add display objects
+	 * app.stage.addChild(PIXI.Sprite.from('something.png'));
+	 *
+	 * @class
+	 * @memberof PIXI
+	 */
+	var Application = function Application(options)
+	{
+	    var this$1 = this;
+
+	    // The default options
+	    options = Object.assign({
+	        forceCanvas: false,
+	    }, options);
+
+	    /**
+	     * WebGL renderer if available, otherwise CanvasRenderer.
+	     * @member {PIXI.Renderer|PIXI.CanvasRenderer}
+	     */
+	    this.renderer = autoDetectRenderer(options);
+
+	    /**
+	     * The root display container that's rendered.
+	     * @member {PIXI.Container}
+	     */
+	    this.stage = new Container();
+
+	    // install plugins here
+	    Application._plugins.forEach(function (plugin) {
+	        plugin.init.call(this$1, options);
+	    });
+	};
+
+	var prototypeAccessors$8 = { view: { configurable: true },screen: { configurable: true } };
+
+	/**
+	 * Register a middleware plugin for the application
+	 * @static
+	 * @param {PIXI.Application.Plugin} plugin - Plugin being installed
+	 */
+	Application.registerPlugin = function registerPlugin (plugin)
+	{
+	    Application._plugins.push(plugin);
+	};
+
+	/**
+	 * Render the current stage.
+	 */
+	Application.prototype.render = function render ()
+	{
+	    this.renderer.render(this.stage);
+	};
+
+	/**
+	 * Reference to the renderer's canvas element.
+	 * @member {HTMLCanvasElement}
+	 * @readonly
+	 */
+	prototypeAccessors$8.view.get = function ()
+	{
+	    return this.renderer.view;
+	};
+
+	/**
+	 * Reference to the renderer's screen rectangle. Its safe to use as `filterArea` or `hitArea` for the whole screen.
+	 * @member {PIXI.Rectangle}
+	 * @readonly
+	 */
+	prototypeAccessors$8.screen.get = function ()
+	{
+	    return this.renderer.screen;
+	};
+
+	/**
+	 * Destroy and don't use after this.
+	 * @param {Boolean} [removeView=false] Automatically remove canvas from DOM.
+	 * @param {object|boolean} [stageOptions] - Options parameter. A boolean will act as if all options
+	 *  have been set to that value
+	 * @param {boolean} [stageOptions.children=false] - if set to true, all the children will have their destroy
+	 *  method called as well. 'stageOptions' will be passed on to those calls.
+	 * @param {boolean} [stageOptions.texture=false] - Only used for child Sprites if stageOptions.children is set
+	 *  to true. Should it destroy the texture of the child sprite
+	 * @param {boolean} [stageOptions.baseTexture=false] - Only used for child Sprites if stageOptions.children is set
+	 *  to true. Should it destroy the base texture of the child sprite
+	 */
+	Application.prototype.destroy = function destroy (removeView, stageOptions)
+	{
+	        var this$1 = this;
+
+	    // Destroy plugins in the opposite order
+	    // which they were constructed
+	    var plugins = Application._plugins.slice(0);
+
+	    plugins.reverse();
+	    plugins.forEach(function (plugin) {
+	        plugin.destroy.call(this$1);
+	    });
+
+	    this.stage.destroy(stageOptions);
+	    this.stage = null;
+
+	    this.renderer.destroy(removeView);
+	    this.renderer = null;
+
+	    this._options = null;
+	};
+
+	Object.defineProperties( Application.prototype, prototypeAccessors$8 );
+
+	/**
+	 * @memberof PIXI.Application
+	 * @typedef {object} Plugin
+	 * @property {function} init - Called when Application is constructed, scoped to Application instance.
+	 *  Passes in `options` as the only argument, which are Application constructor options.
+	 * @property {function} destroy - Called when destroying Application, scoped to Application instance
+	 */
+
+	/**
+	 * Collection of installed plugins.
+	 * @static
+	 * @private
+	 * @type {PIXI.Application.Plugin[]}
+	 */
+	Application._plugins = [];
+
+	/**
+	 * Middleware for for Application's resize functionality
+	 * @private
+	 * @class
+	 */
+	var ResizePlugin = function ResizePlugin () {};
+
+	ResizePlugin.init = function init (options)
+	{
+	        var this$1 = this;
+
+	    /**
+	     * The element or window to resize the application to.
+	     * @type {Window|HTMLElement}
+	     * @name resizeTo
+	     * @memberof PIXI.Application#
+	     */
+	    Object.defineProperty(this, 'resizeTo',
+	        {
+	            set: function set(dom)
+	            {
+	                window.removeEventListener('resize', this.resize);
+	                this._resizeTo = dom;
+	                if (dom)
+	                {
+	                    window.addEventListener('resize', this.resize);
+	                    this.resize();
+	                }
+	            },
+	            get: function get()
+	            {
+	                return this._resizeTo;
+	            },
+	        });
+
+	    /**
+	     * If `resizeTo` is set, calling this function
+	     * will resize to the width and height of that element.
+	     * @method PIXI.Application#resize
+	     */
+	    this.resize = function () {
+	        if (this$1._resizeTo)
+	        {
+	            // Resize to the window
+	            if (this$1._resizeTo === window)
+	            {
+	                this$1.renderer.resize(
+	                    window.innerWidth,
+	                    window.innerHeight
+	                );
+	            }
+	            // Resize to other HTML entities
+	            else
+	            {
+	                this$1.renderer.resize(
+	                    this$1._resizeTo.clientWidth,
+	                    this$1._resizeTo.clientHeight
+	                );
+	            }
+	        }
+	    };
+
+	    // On resize
+	    this._resizeTo = null;
+	    this.resizeTo = options.resizeTo || null;
+	};
+
+	/**
+	 * Clean up the ticker, scoped to application
+	 * @static
+	 * @private
+	 */
+	ResizePlugin.destroy = function destroy ()
+	{
+	    this.resizeTo = null;
+	    this.resize = null;
+	};
+
+	Application.registerPlugin(ResizePlugin);
+
+	'use strict';
+
+	var parseUri = function parseURI (str, opts) {
+	  opts = opts || {};
+
+	  var o = {
+	    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*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/
+	    }
+	  };
+
+	  var m = o.parser[opts.strictMode ? 'strict' : 'loose'].exec(str);
+	  var uri = {};
+	  var i = 14;
+
+	  while (i--) { uri[o.key[i]] = m[i] || ''; }
+
+	  uri[o.q.name] = {};
+	  uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {
+	    if ($1) { uri[o.q.name][$1] = $2; }
+	  });
+
+	  return uri
+	};
+
+	var miniSignals = createCommonjsModule(function (module, exports) {
+	'use strict';
+
+	Object.defineProperty(exports, '__esModule', {
+	  value: true
+	});
+
+	var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) { descriptor.writable = true; } Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) { defineProperties(Constructor.prototype, protoProps); } if (staticProps) { defineProperties(Constructor, staticProps); } return Constructor; }; })();
+
+	function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
+
+	var MiniSignalBinding = (function () {
+	  function MiniSignalBinding(fn, once, thisArg) {
+	    if (once === undefined) { once = false; }
+
+	    _classCallCheck(this, MiniSignalBinding);
+
+	    this._fn = fn;
+	    this._once = once;
+	    this._thisArg = thisArg;
+	    this._next = this._prev = this._owner = null;
+	  }
+
+	  _createClass(MiniSignalBinding, [{
+	    key: 'detach',
+	    value: function detach() {
+	      if (this._owner === null) { return false; }
+	      this._owner.detach(this);
+	      return true;
+	    }
+	  }]);
+
+	  return MiniSignalBinding;
+	})();
+
+	function _addMiniSignalBinding(self, node) {
+	  if (!self._head) {
+	    self._head = node;
+	    self._tail = node;
+	  } else {
+	    self._tail._next = node;
+	    node._prev = self._tail;
+	    self._tail = node;
+	  }
+
+	  node._owner = self;
+
+	  return node;
+	}
+
+	var MiniSignal = (function () {
+	  function MiniSignal() {
+	    _classCallCheck(this, MiniSignal);
+
+	    this._head = this._tail = undefined;
+	  }
+
+	  _createClass(MiniSignal, [{
+	    key: 'handlers',
+	    value: function handlers() {
+	      var exists = arguments.length <= 0 || arguments[0] === undefined ? false : arguments[0];
+
+	      var node = this._head;
+
+	      if (exists) { return !!node; }
+
+	      var ee = [];
+
+	      while (node) {
+	        ee.push(node);
+	        node = node._next;
+	      }
+
+	      return ee;
+	    }
+	  }, {
+	    key: 'has',
+	    value: function has(node) {
+	      if (!(node instanceof MiniSignalBinding)) {
+	        throw new Error('MiniSignal#has(): First arg must be a MiniSignalBinding object.');
+	      }
+
+	      return node._owner === this;
+	    }
+	  }, {
+	    key: 'dispatch',
+	    value: function dispatch() {
+	      var arguments$1 = arguments;
+
+	      var node = this._head;
+
+	      if (!node) { return false; }
+
+	      while (node) {
+	        if (node._once) { this.detach(node); }
+	        node._fn.apply(node._thisArg, arguments$1);
+	        node = node._next;
+	      }
+
+	      return true;
+	    }
+	  }, {
+	    key: 'add',
+	    value: function add(fn) {
+	      var thisArg = arguments.length <= 1 || arguments[1] === undefined ? null : arguments[1];
+
+	      if (typeof fn !== 'function') {
+	        throw new Error('MiniSignal#add(): First arg must be a Function.');
+	      }
+	      return _addMiniSignalBinding(this, new MiniSignalBinding(fn, false, thisArg));
+	    }
+	  }, {
+	    key: 'once',
+	    value: function once(fn) {
+	      var thisArg = arguments.length <= 1 || arguments[1] === undefined ? null : arguments[1];
+
+	      if (typeof fn !== 'function') {
+	        throw new Error('MiniSignal#once(): First arg must be a Function.');
+	      }
+	      return _addMiniSignalBinding(this, new MiniSignalBinding(fn, true, thisArg));
+	    }
+	  }, {
+	    key: 'detach',
+	    value: function detach(node) {
+	      if (!(node instanceof MiniSignalBinding)) {
+	        throw new Error('MiniSignal#detach(): First arg must be a MiniSignalBinding object.');
+	      }
+	      if (node._owner !== this) { return this; }
+
+	      if (node._prev) { node._prev._next = node._next; }
+	      if (node._next) { node._next._prev = node._prev; }
+
+	      if (node === this._head) {
+	        this._head = node._next;
+	        if (node._next === null) {
+	          this._tail = null;
+	        }
+	      } else if (node === this._tail) {
+	        this._tail = node._prev;
+	        this._tail._next = null;
+	      }
+
+	      node._owner = null;
+	      return this;
+	    }
+	  }, {
+	    key: 'detachAll',
+	    value: function detachAll() {
+	      var node = this._head;
+	      if (!node) { return this; }
+
+	      this._head = this._tail = null;
+
+	      while (node) {
+	        node._owner = null;
+	        node = node._next;
+	      }
+	      return this;
+	    }
+	  }]);
+
+	  return MiniSignal;
+	})();
+
+	MiniSignal.MiniSignalBinding = MiniSignalBinding;
+
+	exports['default'] = MiniSignal;
+	module.exports = exports['default'];
+	});
+
+	var Signal = unwrapExports(miniSignals);
+
+	/*!
+	 * resource-loader - v3.0.1
+	 * https://github.com/pixijs/pixi-sound
+	 * Compiled Tue, 02 Jul 2019 14:06:18 UTC
+	 *
+	 * resource-loader is licensed under the MIT license.
+	 * http://www.opensource.org/licenses/mit-license
+	 */
+
+	/**
+	 * Smaller version of the async library constructs.
+	 *
+	 * @namespace async
+	 */
+
+	/**
+	 * Noop function
+	 *
+	 * @ignore
+	 * @function
+	 * @memberof async
+	 */
+	function _noop() {}
+	/* empty */
+
+	/**
+	 * Iterates an array in series.
+	 *
+	 * @memberof async
+	 * @function eachSeries
+	 * @param {Array.<*>} array - Array to iterate.
+	 * @param {function} iterator - Function to call for each element.
+	 * @param {function} callback - Function to call when done, or on error.
+	 * @param {boolean} [deferNext=false] - Break synchronous each loop by calling next with a setTimeout of 1.
+	 */
+
+
+	function eachSeries(array, iterator, callback, deferNext) {
+	  var i = 0;
+	  var len = array.length;
+
+	  (function next(err) {
+	    if (err || i === len) {
+	      if (callback) {
+	        callback(err);
+	      }
+
+	      return;
+	    }
+
+	    if (deferNext) {
+	      setTimeout(function () {
+	        iterator(array[i++], next);
+	      }, 1);
+	    } else {
+	      iterator(array[i++], next);
+	    }
+	  })();
+	}
+	/**
+	 * Ensures a function is only called once.
+	 *
+	 * @ignore
+	 * @memberof async
+	 * @param {function} fn - The function to wrap.
+	 * @return {function} The wrapping function.
+	 */
+
+	function onlyOnce(fn) {
+	  return function onceWrapper() {
+	    if (fn === null) {
+	      throw new Error('Callback was already called.');
+	    }
+
+	    var callFn = fn;
+	    fn = null;
+	    callFn.apply(this, arguments);
+	  };
+	}
+	/**
+	 * Async queue implementation,
+	 *
+	 * @memberof async
+	 * @function queue
+	 * @param {function} worker - The worker function to call for each task.
+	 * @param {number} concurrency - How many workers to run in parrallel.
+	 * @return {*} The async queue object.
+	 */
+
+
+	function queue(worker, concurrency) {
+	  if (concurrency == null) {
+	    // eslint-disable-line no-eq-null,eqeqeq
+	    concurrency = 1;
+	  } else if (concurrency === 0) {
+	    throw new Error('Concurrency must not be zero');
+	  }
+
+	  var workers = 0;
+	  var q = {
+	    _tasks: [],
+	    concurrency: concurrency,
+	    saturated: _noop,
+	    unsaturated: _noop,
+	    buffer: concurrency / 4,
+	    empty: _noop,
+	    drain: _noop,
+	    error: _noop,
+	    started: false,
+	    paused: false,
+	    push: function push(data, callback) {
+	      _insert(data, false, callback);
+	    },
+	    kill: function kill() {
+	      workers = 0;
+	      q.drain = _noop;
+	      q.started = false;
+	      q._tasks = [];
+	    },
+	    unshift: function unshift(data, callback) {
+	      _insert(data, true, callback);
+	    },
+	    process: function process() {
+	      while (!q.paused && workers < q.concurrency && q._tasks.length) {
+	        var task = q._tasks.shift();
+
+	        if (q._tasks.length === 0) {
+	          q.empty();
+	        }
+
+	        workers += 1;
+
+	        if (workers === q.concurrency) {
+	          q.saturated();
+	        }
+
+	        worker(task.data, onlyOnce(_next(task)));
+	      }
+	    },
+	    length: function length() {
+	      return q._tasks.length;
+	    },
+	    running: function running() {
+	      return workers;
+	    },
+	    idle: function idle() {
+	      return q._tasks.length + workers === 0;
+	    },
+	    pause: function pause() {
+	      if (q.paused === true) {
+	        return;
+	      }
+
+	      q.paused = true;
+	    },
+	    resume: function resume() {
+	      if (q.paused === false) {
+	        return;
+	      }
+
+	      q.paused = false; // Need to call q.process once per concurrent
+	      // worker to preserve full concurrency after pause
+
+	      for (var w = 1; w <= q.concurrency; w++) {
+	        q.process();
+	      }
+	    }
+	  };
+
+	  function _insert(data, insertAtFront, callback) {
+	    if (callback != null && typeof callback !== 'function') {
+	      // eslint-disable-line no-eq-null,eqeqeq
+	      throw new Error('task callback must be a function');
+	    }
+
+	    q.started = true;
+
+	    if (data == null && q.idle()) {
+	      // eslint-disable-line no-eq-null,eqeqeq
+	      // call drain immediately if there are no tasks
+	      setTimeout(function () {
+	        return q.drain();
+	      }, 1);
+	      return;
+	    }
+
+	    var item = {
+	      data: data,
+	      callback: typeof callback === 'function' ? callback : _noop
+	    };
+
+	    if (insertAtFront) {
+	      q._tasks.unshift(item);
+	    } else {
+	      q._tasks.push(item);
+	    }
+
+	    setTimeout(function () {
+	      return q.process();
+	    }, 1);
+	  }
+
+	  function _next(task) {
+	    return function next() {
+	      workers -= 1;
+	      task.callback.apply(task, arguments);
+
+	      if (arguments[0] != null) {
+	        // eslint-disable-line no-eq-null,eqeqeq
+	        q.error(arguments[0], task.data);
+	      }
+
+	      if (workers <= q.concurrency - q.buffer) {
+	        q.unsaturated();
+	      }
+
+	      if (q.idle()) {
+	        q.drain();
+	      }
+
+	      q.process();
+	    };
+	  }
+
+	  return q;
+	}
+
+	var async = ({
+	    eachSeries: eachSeries,
+	    queue: queue
+	});
+
+	// a simple in-memory cache for resources
+	var cache = {};
+	/**
+	 * A simple in-memory cache for resource.
+	 *
+	 * @memberof middleware
+	 * @function caching
+	 * @example
+	 * import { Loader, middleware } from 'resource-loader';
+	 * const loader = new Loader();
+	 * loader.use(middleware.caching);
+	 * @param {Resource} resource - Current Resource
+	 * @param {function} next - Callback when complete
+	 */
+
+	function caching(resource, next) {
+	  var _this = this;
+
+	  // if cached, then set data and complete the resource
+	  if (cache[resource.url]) {
+	    resource.data = cache[resource.url];
+	    resource.complete(); // marks resource load complete and stops processing before middlewares
+	  } // if not cached, wait for complete and store it in the cache.
+	  else {
+	      resource.onComplete.once(function () {
+	        return cache[_this.url] = _this.data;
+	      });
+	    }
+
+	  next();
+	}
+
+	function _defineProperties(target, props) {
+	  for (var i = 0; i < props.length; i++) {
+	    var descriptor = props[i];
+	    descriptor.enumerable = descriptor.enumerable || false;
+	    descriptor.configurable = true;
+	    if ("value" in descriptor) { descriptor.writable = true; }
+	    Object.defineProperty(target, descriptor.key, descriptor);
+	  }
+	}
+
+	function _createClass(Constructor, protoProps, staticProps) {
+	  if (protoProps) { _defineProperties(Constructor.prototype, protoProps); }
+	  if (staticProps) { _defineProperties(Constructor, staticProps); }
+	  return Constructor;
+	}
+
+	var useXdr = !!(window.XDomainRequest && !('withCredentials' in new XMLHttpRequest()));
+	var tempAnchor$1 = null; // some status constants
+
+	var STATUS_NONE = 0;
+	var STATUS_OK = 200;
+	var STATUS_EMPTY = 204;
+	var STATUS_IE_BUG_EMPTY = 1223;
+	var STATUS_TYPE_OK = 2; // noop
+
+	function _noop$1() {}
+	/* empty */
+
+	/**
+	 * Manages the state and loading of a resource and all child resources.
+	 *
+	 * @class
+	 */
+
+
+	var Resource$1 =
+	/*#__PURE__*/
+	function () {
+	  /**
+	   * Sets the load type to be used for a specific extension.
+	   *
+	   * @static
+	   * @param {string} extname - The extension to set the type for, e.g. "png" or "fnt"
+	   * @param {Resource.LOAD_TYPE} loadType - The load type to set it to.
+	   */
+	  Resource.setExtensionLoadType = function setExtensionLoadType(extname, loadType) {
+	    setExtMap(Resource._loadTypeMap, extname, loadType);
+	  }
+	  /**
+	   * Sets the load type to be used for a specific extension.
+	   *
+	   * @static
+	   * @param {string} extname - The extension to set the type for, e.g. "png" or "fnt"
+	   * @param {Resource.XHR_RESPONSE_TYPE} xhrType - The xhr type to set it to.
+	   */
+	  ;
+
+	  Resource.setExtensionXhrType = function setExtensionXhrType(extname, xhrType) {
+	    setExtMap(Resource._xhrTypeMap, extname, xhrType);
+	  }
+	  /**
+	   * @param {string} name - The name of the resource to load.
+	   * @param {string|string[]} url - The url for this resource, for audio/video loads you can pass
+	   *      an array of sources.
+	   * @param {object} [options] - The options for the load.
+	   * @param {string|boolean} [options.crossOrigin] - Is this request cross-origin? Default is to
+	   *      determine automatically.
+	   * @param {number} [options.timeout=0] - A timeout in milliseconds for the load. If the load takes
+	   *      longer than this time it is cancelled and the load is considered a failure. If this value is
+	   *      set to `0` then there is no explicit timeout.
+	   * @param {Resource.LOAD_TYPE} [options.loadType=Resource.LOAD_TYPE.XHR] - How should this resource
+	   *      be loaded?
+	   * @param {Resource.XHR_RESPONSE_TYPE} [options.xhrType=Resource.XHR_RESPONSE_TYPE.DEFAULT] - How
+	   *      should the data being loaded be interpreted when using XHR?
+	   * @param {Resource.IMetadata} [options.metadata] - Extra configuration for middleware and the Resource object.
+	   */
+	  ;
+
+	  function Resource(name, url, options) {
+	    if (typeof name !== 'string' || typeof url !== 'string') {
+	      throw new Error('Both name and url are required for constructing a resource.');
+	    }
+
+	    options = options || {};
+	    /**
+	     * The state flags of this resource.
+	     *
+	     * @private
+	     * @member {number}
+	     */
+
+	    this._flags = 0; // set data url flag, needs to be set early for some _determineX checks to work.
+
+	    this._setFlag(Resource.STATUS_FLAGS.DATA_URL, url.indexOf('data:') === 0);
+	    /**
+	     * The name of this resource.
+	     *
+	     * @readonly
+	     * @member {string}
+	     */
+
+
+	    this.name = name;
+	    /**
+	     * The url used to load this resource.
+	     *
+	     * @readonly
+	     * @member {string}
+	     */
+
+	    this.url = url;
+	    /**
+	     * The extension used to load this resource.
+	     *
+	     * @readonly
+	     * @member {string}
+	     */
+
+	    this.extension = this._getExtension();
+	    /**
+	     * The data that was loaded by the resource.
+	     *
+	     * @member {any}
+	     */
+
+	    this.data = null;
+	    /**
+	     * Is this request cross-origin? If unset, determined automatically.
+	     *
+	     * @member {string}
+	     */
+
+	    this.crossOrigin = options.crossOrigin === true ? 'anonymous' : options.crossOrigin;
+	    /**
+	     * A timeout in milliseconds for the load. If the load takes longer than this time
+	     * it is cancelled and the load is considered a failure. If this value is set to `0`
+	     * then there is no explicit timeout.
+	     *
+	     * @member {number}
+	     */
+
+	    this.timeout = options.timeout || 0;
+	    /**
+	     * The method of loading to use for this resource.
+	     *
+	     * @member {Resource.LOAD_TYPE}
+	     */
+
+	    this.loadType = options.loadType || this._determineLoadType();
+	    /**
+	     * The type used to load the resource via XHR. If unset, determined automatically.
+	     *
+	     * @member {string}
+	     */
+
+	    this.xhrType = options.xhrType;
+	    /**
+	     * Extra info for middleware, and controlling specifics about how the resource loads.
+	     *
+	     * Note that if you pass in a `loadElement`, the Resource class takes ownership of it.
+	     * Meaning it will modify it as it sees fit.
+	     *
+	     * @member {Resource.IMetadata}
+	     */
+
+	    this.metadata = options.metadata || {};
+	    /**
+	     * The error that occurred while loading (if any).
+	     *
+	     * @readonly
+	     * @member {Error}
+	     */
+
+	    this.error = null;
+	    /**
+	     * The XHR object that was used to load this resource. This is only set
+	     * when `loadType` is `Resource.LOAD_TYPE.XHR`.
+	     *
+	     * @readonly
+	     * @member {XMLHttpRequest}
+	     */
+
+	    this.xhr = null;
+	    /**
+	     * The child resources this resource owns.
+	     *
+	     * @readonly
+	     * @member {Resource[]}
+	     */
+
+	    this.children = [];
+	    /**
+	     * The resource type.
+	     *
+	     * @readonly
+	     * @member {Resource.TYPE}
+	     */
+
+	    this.type = Resource.TYPE.UNKNOWN;
+	    /**
+	     * The progress chunk owned by this resource.
+	     *
+	     * @readonly
+	     * @member {number}
+	     */
+
+	    this.progressChunk = 0;
+	    /**
+	     * The `dequeue` method that will be used a storage place for the async queue dequeue method
+	     * used privately by the loader.
+	     *
+	     * @private
+	     * @member {function}
+	     */
+
+	    this._dequeue = _noop$1;
+	    /**
+	     * Used a storage place for the on load binding used privately by the loader.
+	     *
+	     * @private
+	     * @member {function}
+	     */
+
+	    this._onLoadBinding = null;
+	    /**
+	     * The timer for element loads to check if they timeout.
+	     *
+	     * @private
+	     * @member {number}
+	     */
+
+	    this._elementTimer = 0;
+	    /**
+	     * The `complete` function bound to this resource's context.
+	     *
+	     * @private
+	     * @member {function}
+	     */
+
+	    this._boundComplete = this.complete.bind(this);
+	    /**
+	     * The `_onError` function bound to this resource's context.
+	     *
+	     * @private
+	     * @member {function}
+	     */
+
+	    this._boundOnError = this._onError.bind(this);
+	    /**
+	     * The `_onProgress` function bound to this resource's context.
+	     *
+	     * @private
+	     * @member {function}
+	     */
+
+	    this._boundOnProgress = this._onProgress.bind(this);
+	    /**
+	     * The `_onTimeout` function bound to this resource's context.
+	     *
+	     * @private
+	     * @member {function}
+	     */
+
+	    this._boundOnTimeout = this._onTimeout.bind(this); // xhr callbacks
+
+	    this._boundXhrOnError = this._xhrOnError.bind(this);
+	    this._boundXhrOnTimeout = this._xhrOnTimeout.bind(this);
+	    this._boundXhrOnAbort = this._xhrOnAbort.bind(this);
+	    this._boundXhrOnLoad = this._xhrOnLoad.bind(this);
+	    /**
+	     * Dispatched when the resource beings to load.
+	     *
+	     * The callback looks like {@link Resource.OnStartSignal}.
+	     *
+	     * @member {Signal<Resource.OnStartSignal>}
+	     */
+
+	    this.onStart = new Signal();
+	    /**
+	     * Dispatched each time progress of this resource load updates.
+	     * Not all resources types and loader systems can support this event
+	     * so sometimes it may not be available. If the resource
+	     * is being loaded on a modern browser, using XHR, and the remote server
+	     * properly sets Content-Length headers, then this will be available.
+	     *
+	     * The callback looks like {@link Resource.OnProgressSignal}.
+	     *
+	     * @member {Signal<Resource.OnProgressSignal>}
+	     */
+
+	    this.onProgress = new Signal();
+	    /**
+	     * Dispatched once this resource has loaded, if there was an error it will
+	     * be in the `error` property.
+	     *
+	     * The callback looks like {@link Resource.OnCompleteSignal}.
+	     *
+	     * @member {Signal<Resource.OnCompleteSignal>}
+	     */
+
+	    this.onComplete = new Signal();
+	    /**
+	     * Dispatched after this resource has had all the *after* middleware run on it.
+	     *
+	     * The callback looks like {@link Resource.OnCompleteSignal}.
+	     *
+	     * @member {Signal<Resource.OnCompleteSignal>}
+	     */
+
+	    this.onAfterMiddleware = new Signal();
+	  }
+	  /**
+	   * When the resource starts to load.
+	   *
+	   * @memberof Resource
+	   * @callback OnStartSignal
+	   * @param {Resource} resource - The resource that the event happened on.
+	   */
+
+	  /**
+	   * When the resource reports loading progress.
+	   *
+	   * @memberof Resource
+	   * @callback OnProgressSignal
+	   * @param {Resource} resource - The resource that the event happened on.
+	   * @param {number} percentage - The progress of the load in the range [0, 1].
+	   */
+
+	  /**
+	   * When the resource finishes loading.
+	   *
+	   * @memberof Resource
+	   * @callback OnCompleteSignal
+	   * @param {Resource} resource - The resource that the event happened on.
+	   */
+
+	  /**
+	   * @memberof Resource
+	   * @typedef {object} IMetadata
+	   * @property {HTMLImageElement|HTMLAudioElement|HTMLVideoElement} [loadElement=null] - The
+	   *      element to use for loading, instead of creating one.
+	   * @property {boolean} [skipSource=false] - Skips adding source(s) to the load element. This
+	   *      is useful if you want to pass in a `loadElement` that you already added load sources to.
+	   * @property {string|string[]} [mimeType] - The mime type to use for the source element
+	   *      of a video/audio elment. If the urls are an array, you can pass this as an array as well
+	   *      where each index is the mime type to use for the corresponding url index.
+	   */
+
+	  /**
+	   * Stores whether or not this url is a data url.
+	   *
+	   * @readonly
+	   * @member {boolean}
+	   */
+
+
+	  var _proto = Resource.prototype;
+
+	  /**
+	   * Marks the resource as complete.
+	   *
+	   */
+	  _proto.complete = function complete() {
+	    this._clearEvents();
+
+	    this._finish();
+	  }
+	  /**
+	   * Aborts the loading of this resource, with an optional message.
+	   *
+	   * @param {string} message - The message to use for the error
+	   */
+	  ;
+
+	  _proto.abort = function abort(message) {
+	    // abort can be called multiple times, ignore subsequent calls.
+	    if (this.error) {
+	      return;
+	    } // store error
+
+
+	    this.error = new Error(message); // clear events before calling aborts
+
+	    this._clearEvents(); // abort the actual loading
+
+
+	    if (this.xhr) {
+	      this.xhr.abort();
+	    } else if (this.xdr) {
+	      this.xdr.abort();
+	    } else if (this.data) {
+	      // single source
+	      if (this.data.src) {
+	        this.data.src = Resource.EMPTY_GIF;
+	      } // multi-source
+	      else {
+	          while (this.data.firstChild) {
+	            this.data.removeChild(this.data.firstChild);
+	          }
+	        }
+	    } // done now.
+
+
+	    this._finish();
+	  }
+	  /**
+	   * Kicks off loading of this resource. This method is asynchronous.
+	   *
+	   * @param {Resource.OnCompleteSignal} [cb] - Optional callback to call once the resource is loaded.
+	   */
+	  ;
+
+	  _proto.load = function load(cb) {
+	    var _this = this;
+
+	    if (this.isLoading) {
+	      return;
+	    }
+
+	    if (this.isComplete) {
+	      if (cb) {
+	        setTimeout(function () {
+	          return cb(_this);
+	        }, 1);
+	      }
+
+	      return;
+	    } else if (cb) {
+	      this.onComplete.once(cb);
+	    }
+
+	    this._setFlag(Resource.STATUS_FLAGS.LOADING, true);
+
+	    this.onStart.dispatch(this); // if unset, determine the value
+
+	    if (this.crossOrigin === false || typeof this.crossOrigin !== 'string') {
+	      this.crossOrigin = this._determineCrossOrigin(this.url);
+	    }
+
+	    switch (this.loadType) {
+	      case Resource.LOAD_TYPE.IMAGE:
+	        this.type = Resource.TYPE.IMAGE;
+
+	        this._loadElement('image');
+
+	        break;
+
+	      case Resource.LOAD_TYPE.AUDIO:
+	        this.type = Resource.TYPE.AUDIO;
+
+	        this._loadSourceElement('audio');
+
+	        break;
+
+	      case Resource.LOAD_TYPE.VIDEO:
+	        this.type = Resource.TYPE.VIDEO;
+
+	        this._loadSourceElement('video');
+
+	        break;
+
+	      case Resource.LOAD_TYPE.XHR:
+	      /* falls through */
+
+	      default:
+	        if (useXdr && this.crossOrigin) {
+	          this._loadXdr();
+	        } else {
+	          this._loadXhr();
+	        }
+
+	        break;
+	    }
+	  }
+	  /**
+	   * Checks if the flag is set.
+	   *
+	   * @private
+	   * @param {number} flag - The flag to check.
+	   * @return {boolean} True if the flag is set.
+	   */
+	  ;
+
+	  _proto._hasFlag = function _hasFlag(flag) {
+	    return (this._flags & flag) !== 0;
+	  }
+	  /**
+	   * (Un)Sets the flag.
+	   *
+	   * @private
+	   * @param {number} flag - The flag to (un)set.
+	   * @param {boolean} value - Whether to set or (un)set the flag.
+	   */
+	  ;
+
+	  _proto._setFlag = function _setFlag(flag, value) {
+	    this._flags = value ? this._flags | flag : this._flags & ~flag;
+	  }
+	  /**
+	   * Clears all the events from the underlying loading source.
+	   *
+	   * @private
+	   */
+	  ;
+
+	  _proto._clearEvents = function _clearEvents() {
+	    clearTimeout(this._elementTimer);
+
+	    if (this.data && this.data.removeEventListener) {
+	      this.data.removeEventListener('error', this._boundOnError, false);
+	      this.data.removeEventListener('load', this._boundComplete, false);
+	      this.data.removeEventListener('progress', this._boundOnProgress, false);
+	      this.data.removeEventListener('canplaythrough', this._boundComplete, false);
+	    }
+
+	    if (this.xhr) {
+	      if (this.xhr.removeEventListener) {
+	        this.xhr.removeEventListener('error', this._boundXhrOnError, false);
+	        this.xhr.removeEventListener('timeout', this._boundXhrOnTimeout, false);
+	        this.xhr.removeEventListener('abort', this._boundXhrOnAbort, false);
+	        this.xhr.removeEventListener('progress', this._boundOnProgress, false);
+	        this.xhr.removeEventListener('load', this._boundXhrOnLoad, false);
+	      } else {
+	        this.xhr.onerror = null;
+	        this.xhr.ontimeout = null;
+	        this.xhr.onprogress = null;
+	        this.xhr.onload = null;
+	      }
+	    }
+	  }
+	  /**
+	   * Finalizes the load.
+	   *
+	   * @private
+	   */
+	  ;
+
+	  _proto._finish = function _finish() {
+	    if (this.isComplete) {
+	      throw new Error('Complete called again for an already completed resource.');
+	    }
+
+	    this._setFlag(Resource.STATUS_FLAGS.COMPLETE, true);
+
+	    this._setFlag(Resource.STATUS_FLAGS.LOADING, false);
+
+	    this.onComplete.dispatch(this);
+	  }
+	  /**
+	   * Loads this resources using an element that has a single source,
+	   * like an HTMLImageElement.
+	   *
+	   * @private
+	   * @param {string} type - The type of element to use.
+	   */
+	  ;
+
+	  _proto._loadElement = function _loadElement(type) {
+	    if (this.metadata.loadElement) {
+	      this.data = this.metadata.loadElement;
+	    } else if (type === 'image' && typeof window.Image !== 'undefined') {
+	      this.data = new Image();
+	    } else {
+	      this.data = document.createElement(type);
+	    }
+
+	    if (this.crossOrigin) {
+	      this.data.crossOrigin = this.crossOrigin;
+	    }
+
+	    if (!this.metadata.skipSource) {
+	      this.data.src = this.url;
+	    }
+
+	    this.data.addEventListener('error', this._boundOnError, false);
+	    this.data.addEventListener('load', this._boundComplete, false);
+	    this.data.addEventListener('progress', this._boundOnProgress, false);
+
+	    if (this.timeout) {
+	      this._elementTimer = setTimeout(this._boundOnTimeout, this.timeout);
+	    }
+	  }
+	  /**
+	   * Loads this resources using an element that has multiple sources,
+	   * like an HTMLAudioElement or HTMLVideoElement.
+	   *
+	   * @private
+	   * @param {string} type - The type of element to use.
+	   */
+	  ;
+
+	  _proto._loadSourceElement = function _loadSourceElement(type) {
+	    if (this.metadata.loadElement) {
+	      this.data = this.metadata.loadElement;
+	    } else if (type === 'audio' && typeof window.Audio !== 'undefined') {
+	      this.data = new Audio();
+	    } else {
+	      this.data = document.createElement(type);
+	    }
+
+	    if (this.data === null) {
+	      this.abort("Unsupported element: " + type);
+	      return;
+	    }
+
+	    if (this.crossOrigin) {
+	      this.data.crossOrigin = this.crossOrigin;
+	    }
+
+	    if (!this.metadata.skipSource) {
+	      // support for CocoonJS Canvas+ runtime, lacks document.createElement('source')
+	      if (navigator.isCocoonJS) {
+	        this.data.src = Array.isArray(this.url) ? this.url[0] : this.url;
+	      } else if (Array.isArray(this.url)) {
+	        var mimeTypes = this.metadata.mimeType;
+
+	        for (var i = 0; i < this.url.length; ++i) {
+	          this.data.appendChild(this._createSource(type, this.url[i], Array.isArray(mimeTypes) ? mimeTypes[i] : mimeTypes));
+	        }
+	      } else {
+	        var _mimeTypes = this.metadata.mimeType;
+	        this.data.appendChild(this._createSource(type, this.url, Array.isArray(_mimeTypes) ? _mimeTypes[0] : _mimeTypes));
+	      }
+	    }
+
+	    this.data.addEventListener('error', this._boundOnError, false);
+	    this.data.addEventListener('load', this._boundComplete, false);
+	    this.data.addEventListener('progress', this._boundOnProgress, false);
+	    this.data.addEventListener('canplaythrough', this._boundComplete, false);
+	    this.data.load();
+
+	    if (this.timeout) {
+	      this._elementTimer = setTimeout(this._boundOnTimeout, this.timeout);
+	    }
+	  }
+	  /**
+	   * Loads this resources using an XMLHttpRequest.
+	   *
+	   * @private
+	   */
+	  ;
+
+	  _proto._loadXhr = function _loadXhr() {
+	    // if unset, determine the value
+	    if (typeof this.xhrType !== 'string') {
+	      this.xhrType = this._determineXhrType();
+	    }
+
+	    var xhr = this.xhr = new XMLHttpRequest(); // set the request type and url
+
+	    xhr.open('GET', this.url, true);
+	    xhr.timeout = this.timeout; // load json as text and parse it ourselves. We do this because some browsers
+	    // *cough* safari *cough* can't deal with it.
+
+	    if (this.xhrType === Resource.XHR_RESPONSE_TYPE.JSON || this.xhrType === Resource.XHR_RESPONSE_TYPE.DOCUMENT) {
+	      xhr.responseType = Resource.XHR_RESPONSE_TYPE.TEXT;
+	    } else {
+	      xhr.responseType = this.xhrType;
+	    }
+
+	    xhr.addEventListener('error', this._boundXhrOnError, false);
+	    xhr.addEventListener('timeout', this._boundXhrOnTimeout, false);
+	    xhr.addEventListener('abort', this._boundXhrOnAbort, false);
+	    xhr.addEventListener('progress', this._boundOnProgress, false);
+	    xhr.addEventListener('load', this._boundXhrOnLoad, false);
+	    xhr.send();
+	  }
+	  /**
+	   * Loads this resources using an XDomainRequest. This is here because we need to support IE9 (gross).
+	   *
+	   * @private
+	   */
+	  ;
+
+	  _proto._loadXdr = function _loadXdr() {
+	    // if unset, determine the value
+	    if (typeof this.xhrType !== 'string') {
+	      this.xhrType = this._determineXhrType();
+	    }
+
+	    var xdr = this.xhr = new XDomainRequest(); // eslint-disable-line no-undef
+	    // XDomainRequest has a few quirks. Occasionally it will abort requests
+	    // A way to avoid this is to make sure ALL callbacks are set even if not used
+	    // More info here: http://stackoverflow.com/questions/15786966/xdomainrequest-aborts-post-on-ie-9
+
+	    xdr.timeout = this.timeout || 5000; // XDR needs a timeout value or it breaks in IE9
+
+	    xdr.onerror = this._boundXhrOnError;
+	    xdr.ontimeout = this._boundXhrOnTimeout;
+	    xdr.onprogress = this._boundOnProgress;
+	    xdr.onload = this._boundXhrOnLoad;
+	    xdr.open('GET', this.url, true); // Note: The xdr.send() call is wrapped in a timeout to prevent an
+	    // issue with the interface where some requests are lost if multiple
+	    // XDomainRequests are being sent at the same time.
+	    // Some info here: https://github.com/photonstorm/phaser/issues/1248
+
+	    setTimeout(function () {
+	      return xdr.send();
+	    }, 1);
+	  }
+	  /**
+	   * Creates a source used in loading via an element.
+	   *
+	   * @private
+	   * @param {string} type - The element type (video or audio).
+	   * @param {string} url - The source URL to load from.
+	   * @param {string} [mime] - The mime type of the video
+	   * @return {HTMLSourceElement} The source element.
+	   */
+	  ;
+
+	  _proto._createSource = function _createSource(type, url, mime) {
+	    if (!mime) {
+	      mime = type + "/" + this._getExtension(url);
+	    }
+
+	    var source = document.createElement('source');
+	    source.src = url;
+	    source.type = mime;
+	    return source;
+	  }
+	  /**
+	   * Called if a load errors out.
+	   *
+	   * @param {Event} event - The error event from the element that emits it.
+	   * @private
+	   */
+	  ;
+
+	  _proto._onError = function _onError(event) {
+	    this.abort("Failed to load element using: " + event.target.nodeName);
+	  }
+	  /**
+	   * Called if a load progress event fires for an element or xhr/xdr.
+	   *
+	   * @private
+	   * @param {XMLHttpRequestProgressEvent|Event} event - Progress event.
+	   */
+	  ;
+
+	  _proto._onProgress = function _onProgress(event) {
+	    if (event && event.lengthComputable) {
+	      this.onProgress.dispatch(this, event.loaded / event.total);
+	    }
+	  }
+	  /**
+	   * Called if a timeout event fires for an element.
+	   *
+	   * @private
+	   */
+	  ;
+
+	  _proto._onTimeout = function _onTimeout() {
+	    this.abort("Load timed out.");
+	  }
+	  /**
+	   * Called if an error event fires for xhr/xdr.
+	   *
+	   * @private
+	   */
+	  ;
+
+	  _proto._xhrOnError = function _xhrOnError() {
+	    var xhr = this.xhr;
+	    this.abort(reqType(xhr) + " Request failed. Status: " + xhr.status + ", text: \"" + xhr.statusText + "\"");
+	  }
+	  /**
+	   * Called if an error event fires for xhr/xdr.
+	   *
+	   * @private
+	   */
+	  ;
+
+	  _proto._xhrOnTimeout = function _xhrOnTimeout() {
+	    var xhr = this.xhr;
+	    this.abort(reqType(xhr) + " Request timed out.");
+	  }
+	  /**
+	   * Called if an abort event fires for xhr/xdr.
+	   *
+	   * @private
+	   */
+	  ;
+
+	  _proto._xhrOnAbort = function _xhrOnAbort() {
+	    var xhr = this.xhr;
+	    this.abort(reqType(xhr) + " Request was aborted by the user.");
+	  }
+	  /**
+	   * Called when data successfully loads from an xhr/xdr request.
+	   *
+	   * @private
+	   * @param {XMLHttpRequestLoadEvent|Event} event - Load event
+	   */
+	  ;
+
+	  _proto._xhrOnLoad = function _xhrOnLoad() {
+	    var xhr = this.xhr;
+	    var text = '';
+	    var status = typeof xhr.status === 'undefined' ? STATUS_OK : xhr.status; // XDR has no `.status`, assume 200.
+	    // responseText is accessible only if responseType is '' or 'text' and on older browsers
+
+	    if (xhr.responseType === '' || xhr.responseType === 'text' || typeof xhr.responseType === 'undefined') {
+	      text = xhr.responseText;
+	    } // status can be 0 when using the `file://` protocol so we also check if a response is set.
+	    // If it has a response, we assume 200; otherwise a 0 status code with no contents is an aborted request.
+
+
+	    if (status === STATUS_NONE && (text.length > 0 || xhr.responseType === Resource.XHR_RESPONSE_TYPE.BUFFER)) {
+	      status = STATUS_OK;
+	    } // handle IE9 bug: http://stackoverflow.com/questions/10046972/msie-returns-status-code-of-1223-for-ajax-request
+	    else if (status === STATUS_IE_BUG_EMPTY) {
+	        status = STATUS_EMPTY;
+	      }
+
+	    var statusType = status / 100 | 0;
+
+	    if (statusType === STATUS_TYPE_OK) {
+	      // if text, just return it
+	      if (this.xhrType === Resource.XHR_RESPONSE_TYPE.TEXT) {
+	        this.data = text;
+	        this.type = Resource.TYPE.TEXT;
+	      } // if json, parse into json object
+	      else if (this.xhrType === Resource.XHR_RESPONSE_TYPE.JSON) {
+	          try {
+	            this.data = JSON.parse(text);
+	            this.type = Resource.TYPE.JSON;
+	          } catch (e) {
+	            this.abort("Error trying to parse loaded json: " + e);
+	            return;
+	          }
+	        } // if xml, parse into an xml document or div element
+	        else if (this.xhrType === Resource.XHR_RESPONSE_TYPE.DOCUMENT) {
+	            try {
+	              if (window.DOMParser) {
+	                var domparser = new DOMParser();
+	                this.data = domparser.parseFromString(text, 'text/xml');
+	              } else {
+	                var div = document.createElement('div');
+	                div.innerHTML = text;
+	                this.data = div;
+	              }
+
+	              this.type = Resource.TYPE.XML;
+	            } catch (e) {
+	              this.abort("Error trying to parse loaded xml: " + e);
+	              return;
+	            }
+	          } // other types just return the response
+	          else {
+	              this.data = xhr.response || text;
+	            }
+	    } else {
+	      this.abort("[" + xhr.status + "] " + xhr.statusText + ": " + xhr.responseURL);
+	      return;
+	    }
+
+	    this.complete();
+	  }
+	  /**
+	   * Sets the `crossOrigin` property for this resource based on if the url
+	   * for this resource is cross-origin. If crossOrigin was manually set, this
+	   * function does nothing.
+	   *
+	   * @private
+	   * @param {string} url - The url to test.
+	   * @param {object} [loc=window.location] - The location object to test against.
+	   * @return {string} The crossOrigin value to use (or empty string for none).
+	   */
+	  ;
+
+	  _proto._determineCrossOrigin = function _determineCrossOrigin(url, loc) {
+	    // data: and javascript: urls are considered same-origin
+	    if (url.indexOf('data:') === 0) {
+	      return '';
+	    } // A sandboxed iframe without the 'allow-same-origin' attribute will have a special
+	    // origin designed not to match window.location.origin, and will always require
+	    // crossOrigin requests regardless of whether the location matches.
+
+
+	    if (window.origin !== window.location.origin) {
+	      return 'anonymous';
+	    } // default is window.location
+
+
+	    loc = loc || window.location;
+
+	    if (!tempAnchor$1) {
+	      tempAnchor$1 = document.createElement('a');
+	    } // let the browser determine the full href for the url of this resource and then
+	    // parse with the node url lib, we can't use the properties of the anchor element
+	    // because they don't work in IE9 :(
+
+
+	    tempAnchor$1.href = url;
+	    url = parseUri(tempAnchor$1.href, {
+	      strictMode: true
+	    });
+	    var samePort = !url.port && loc.port === '' || url.port === loc.port;
+	    var protocol = url.protocol ? url.protocol + ":" : ''; // if cross origin
+
+	    if (url.host !== loc.hostname || !samePort || protocol !== loc.protocol) {
+	      return 'anonymous';
+	    }
+
+	    return '';
+	  }
+	  /**
+	   * Determines the responseType of an XHR request based on the extension of the
+	   * resource being loaded.
+	   *
+	   * @private
+	   * @return {Resource.XHR_RESPONSE_TYPE} The responseType to use.
+	   */
+	  ;
+
+	  _proto._determineXhrType = function _determineXhrType() {
+	    return Resource._xhrTypeMap[this.extension] || Resource.XHR_RESPONSE_TYPE.TEXT;
+	  }
+	  /**
+	   * Determines the loadType of a resource based on the extension of the
+	   * resource being loaded.
+	   *
+	   * @private
+	   * @return {Resource.LOAD_TYPE} The loadType to use.
+	   */
+	  ;
+
+	  _proto._determineLoadType = function _determineLoadType() {
+	    return Resource._loadTypeMap[this.extension] || Resource.LOAD_TYPE.XHR;
+	  }
+	  /**
+	   * Extracts the extension (sans '.') of the file being loaded by the resource.
+	   *
+	   * @private
+	   * @return {string} The extension.
+	   */
+	  ;
+
+	  _proto._getExtension = function _getExtension() {
+	    var url = this.url;
+	    var ext = '';
+
+	    if (this.isDataUrl) {
+	      var slashIndex = url.indexOf('/');
+	      ext = url.substring(slashIndex + 1, url.indexOf(';', slashIndex));
+	    } else {
+	      var queryStart = url.indexOf('?');
+	      var hashStart = url.indexOf('#');
+	      var index = Math.min(queryStart > -1 ? queryStart : url.length, hashStart > -1 ? hashStart : url.length);
+	      url = url.substring(0, index);
+	      ext = url.substring(url.lastIndexOf('.') + 1);
+	    }
+
+	    return ext.toLowerCase();
+	  }
+	  /**
+	   * Determines the mime type of an XHR request based on the responseType of
+	   * resource being loaded.
+	   *
+	   * @private
+	   * @param {Resource.XHR_RESPONSE_TYPE} type - The type to get a mime type for.
+	   * @return {string} The mime type to use.
+	   */
+	  ;
+
+	  _proto._getMimeFromXhrType = function _getMimeFromXhrType(type) {
+	    switch (type) {
+	      case Resource.XHR_RESPONSE_TYPE.BUFFER:
+	        return 'application/octet-binary';
+
+	      case Resource.XHR_RESPONSE_TYPE.BLOB:
+	        return 'application/blob';
+
+	      case Resource.XHR_RESPONSE_TYPE.DOCUMENT:
+	        return 'application/xml';
+
+	      case Resource.XHR_RESPONSE_TYPE.JSON:
+	        return 'application/json';
+
+	      case Resource.XHR_RESPONSE_TYPE.DEFAULT:
+	      case Resource.XHR_RESPONSE_TYPE.TEXT:
+	      /* falls through */
+
+	      default:
+	        return 'text/plain';
+	    }
+	  };
+
+	  _createClass(Resource, [{
+	    key: "isDataUrl",
+	    get: function get() {
+	      return this._hasFlag(Resource.STATUS_FLAGS.DATA_URL);
+	    }
+	    /**
+	     * Describes if this resource has finished loading. Is true when the resource has completely
+	     * loaded.
+	     *
+	     * @readonly
+	     * @member {boolean}
+	     */
+
+	  }, {
+	    key: "isComplete",
+	    get: function get() {
+	      return this._hasFlag(Resource.STATUS_FLAGS.COMPLETE);
+	    }
+	    /**
+	     * Describes if this resource is currently loading. Is true when the resource starts loading,
+	     * and is false again when complete.
+	     *
+	     * @readonly
+	     * @member {boolean}
+	     */
+
+	  }, {
+	    key: "isLoading",
+	    get: function get() {
+	      return this._hasFlag(Resource.STATUS_FLAGS.LOADING);
+	    }
+	  }]);
+
+	  return Resource;
+	}();
+	/**
+	 * The types of resources a resource could represent.
+	 *
+	 * @static
+	 * @readonly
+	 * @enum {number}
+	 */
+
+
+	Resource$1.STATUS_FLAGS = {
+	  NONE: 0,
+	  DATA_URL: 1 << 0,
+	  COMPLETE: 1 << 1,
+	  LOADING: 1 << 2
+	};
+	/**
+	 * The types of resources a resource could represent.
+	 *
+	 * @static
+	 * @readonly
+	 * @enum {number}
+	 */
+
+	Resource$1.TYPE = {
+	  UNKNOWN: 0,
+	  JSON: 1,
+	  XML: 2,
+	  IMAGE: 3,
+	  AUDIO: 4,
+	  VIDEO: 5,
+	  TEXT: 6
+	};
+	/**
+	 * The types of loading a resource can use.
+	 *
+	 * @static
+	 * @readonly
+	 * @enum {number}
+	 */
+
+	Resource$1.LOAD_TYPE = {
+	  /** Uses XMLHttpRequest to load the resource. */
+	  XHR: 1,
+
+	  /** Uses an `Image` object to load the resource. */
+	  IMAGE: 2,
+
+	  /** Uses an `Audio` object to load the resource. */
+	  AUDIO: 3,
+
+	  /** Uses a `Video` object to load the resource. */
+	  VIDEO: 4
+	};
+	/**
+	 * The XHR ready states, used internally.
+	 *
+	 * @static
+	 * @readonly
+	 * @enum {string}
+	 */
+
+	Resource$1.XHR_RESPONSE_TYPE = {
+	  /** string */
+	  DEFAULT: 'text',
+
+	  /** ArrayBuffer */
+	  BUFFER: 'arraybuffer',
+
+	  /** Blob */
+	  BLOB: 'blob',
+
+	  /** Document */
+	  DOCUMENT: 'document',
+
+	  /** Object */
+	  JSON: 'json',
+
+	  /** String */
+	  TEXT: 'text'
+	};
+	Resource$1._loadTypeMap = {
+	  // images
+	  gif: Resource$1.LOAD_TYPE.IMAGE,
+	  png: Resource$1.LOAD_TYPE.IMAGE,
+	  bmp: Resource$1.LOAD_TYPE.IMAGE,
+	  jpg: Resource$1.LOAD_TYPE.IMAGE,
+	  jpeg: Resource$1.LOAD_TYPE.IMAGE,
+	  tif: Resource$1.LOAD_TYPE.IMAGE,
+	  tiff: Resource$1.LOAD_TYPE.IMAGE,
+	  webp: Resource$1.LOAD_TYPE.IMAGE,
+	  tga: Resource$1.LOAD_TYPE.IMAGE,
+	  svg: Resource$1.LOAD_TYPE.IMAGE,
+	  'svg+xml': Resource$1.LOAD_TYPE.IMAGE,
+	  // for SVG data urls
+	  // audio
+	  mp3: Resource$1.LOAD_TYPE.AUDIO,
+	  ogg: Resource$1.LOAD_TYPE.AUDIO,
+	  wav: Resource$1.LOAD_TYPE.AUDIO,
+	  // videos
+	  mp4: Resource$1.LOAD_TYPE.VIDEO,
+	  webm: Resource$1.LOAD_TYPE.VIDEO
+	};
+	Resource$1._xhrTypeMap = {
+	  // xml
+	  xhtml: Resource$1.XHR_RESPONSE_TYPE.DOCUMENT,
+	  html: Resource$1.XHR_RESPONSE_TYPE.DOCUMENT,
+	  htm: Resource$1.XHR_RESPONSE_TYPE.DOCUMENT,
+	  xml: Resource$1.XHR_RESPONSE_TYPE.DOCUMENT,
+	  tmx: Resource$1.XHR_RESPONSE_TYPE.DOCUMENT,
+	  svg: Resource$1.XHR_RESPONSE_TYPE.DOCUMENT,
+	  // This was added to handle Tiled Tileset XML, but .tsx is also a TypeScript React Component.
+	  // Since it is way less likely for people to be loading TypeScript files instead of Tiled files,
+	  // this should probably be fine.
+	  tsx: Resource$1.XHR_RESPONSE_TYPE.DOCUMENT,
+	  // images
+	  gif: Resource$1.XHR_RESPONSE_TYPE.BLOB,
+	  png: Resource$1.XHR_RESPONSE_TYPE.BLOB,
+	  bmp: Resource$1.XHR_RESPONSE_TYPE.BLOB,
+	  jpg: Resource$1.XHR_RESPONSE_TYPE.BLOB,
+	  jpeg: Resource$1.XHR_RESPONSE_TYPE.BLOB,
+	  tif: Resource$1.XHR_RESPONSE_TYPE.BLOB,
+	  tiff: Resource$1.XHR_RESPONSE_TYPE.BLOB,
+	  webp: Resource$1.XHR_RESPONSE_TYPE.BLOB,
+	  tga: Resource$1.XHR_RESPONSE_TYPE.BLOB,
+	  // json
+	  json: Resource$1.XHR_RESPONSE_TYPE.JSON,
+	  // text
+	  text: Resource$1.XHR_RESPONSE_TYPE.TEXT,
+	  txt: Resource$1.XHR_RESPONSE_TYPE.TEXT,
+	  // fonts
+	  ttf: Resource$1.XHR_RESPONSE_TYPE.BUFFER,
+	  otf: Resource$1.XHR_RESPONSE_TYPE.BUFFER
+	}; // We can't set the `src` attribute to empty string, so on abort we set it to this 1px transparent gif
+
+	Resource$1.EMPTY_GIF = 'data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==';
+	/**
+	 * Quick helper to set a value on one of the extension maps. Ensures there is no
+	 * dot at the start of the extension.
+	 *
+	 * @ignore
+	 * @param {object} map - The map to set on.
+	 * @param {string} extname - The extension (or key) to set.
+	 * @param {number} val - The value to set.
+	 */
+
+	function setExtMap(map, extname, val) {
+	  if (extname && extname.indexOf('.') === 0) {
+	    extname = extname.substring(1);
+	  }
+
+	  if (!extname) {
+	    return;
+	  }
+
+	  map[extname] = val;
+	}
+	/**
+	 * Quick helper to get string xhr type.
+	 *
+	 * @ignore
+	 * @param {XMLHttpRequest|XDomainRequest} xhr - The request to check.
+	 * @return {string} The type.
+	 */
+
+
+	function reqType(xhr) {
+	  return xhr.toString().replace('object ', '');
+	}
+
+	var _keyStr = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
+	/**
+	 * Encodes binary into base64.
+	 *
+	 * @function encodeBinary
+	 * @param {string} input The input data to encode.
+	 * @returns {string} The encoded base64 string
+	 */
+
+	function encodeBinary(input) {
+	  var output = '';
+	  var inx = 0;
+
+	  while (inx < input.length) {
+	    // Fill byte buffer array
+	    var bytebuffer = [0, 0, 0];
+	    var encodedCharIndexes = [0, 0, 0, 0];
+
+	    for (var jnx = 0; jnx < bytebuffer.length; ++jnx) {
+	      if (inx < input.length) {
+	        // throw away high-order byte, as documented at:
+	        // https://developer.mozilla.org/En/Using_XMLHttpRequest#Handling_binary_data
+	        bytebuffer[jnx] = input.charCodeAt(inx++) & 0xff;
+	      } else {
+	        bytebuffer[jnx] = 0;
+	      }
+	    } // Get each encoded character, 6 bits at a time
+	    // index 1: first 6 bits
+
+
+	    encodedCharIndexes[0] = bytebuffer[0] >> 2; // index 2: second 6 bits (2 least significant bits from input byte 1 + 4 most significant bits from byte 2)
+
+	    encodedCharIndexes[1] = (bytebuffer[0] & 0x3) << 4 | bytebuffer[1] >> 4; // index 3: third 6 bits (4 least significant bits from input byte 2 + 2 most significant bits from byte 3)
+
+	    encodedCharIndexes[2] = (bytebuffer[1] & 0x0f) << 2 | bytebuffer[2] >> 6; // index 3: forth 6 bits (6 least significant bits from input byte 3)
+
+	    encodedCharIndexes[3] = bytebuffer[2] & 0x3f; // Determine whether padding happened, and adjust accordingly
+
+	    var paddingBytes = inx - (input.length - 1);
+
+	    switch (paddingBytes) {
+	      case 2:
+	        // Set last 2 characters to padding char
+	        encodedCharIndexes[3] = 64;
+	        encodedCharIndexes[2] = 64;
+	        break;
+
+	      case 1:
+	        // Set last character to padding char
+	        encodedCharIndexes[3] = 64;
+	        break;
+
+	      default:
+	        break;
+	      // No padding - proceed
+	    } // Now we will grab each appropriate character out of our keystring
+	    // based on our index array and append it to the output string
+
+
+	    for (var _jnx = 0; _jnx < encodedCharIndexes.length; ++_jnx) {
+	      output += _keyStr.charAt(encodedCharIndexes[_jnx]);
+	    }
+	  }
+
+	  return output;
+	}
+
+	var Url$1 = window.URL || window.webkitURL;
+	/**
+	 * A middleware for transforming XHR loaded Blobs into more useful objects
+	 *
+	 * @memberof middleware
+	 * @function parsing
+	 * @example
+	 * import { Loader, middleware } from 'resource-loader';
+	 * const loader = new Loader();
+	 * loader.use(middleware.parsing);
+	 * @param {Resource} resource - Current Resource
+	 * @param {function} next - Callback when complete
+	 */
+
+	function parsing(resource, next) {
+	  if (!resource.data) {
+	    next();
+	    return;
+	  } // if this was an XHR load of a blob
+
+
+	  if (resource.xhr && resource.xhrType === Resource$1.XHR_RESPONSE_TYPE.BLOB) {
+	    // if there is no blob support we probably got a binary string back
+	    if (!window.Blob || typeof resource.data === 'string') {
+	      var type = resource.xhr.getResponseHeader('content-type'); // this is an image, convert the binary string into a data url
+
+	      if (type && type.indexOf('image') === 0) {
+	        resource.data = new Image();
+	        resource.data.src = "data:" + type + ";base64," + encodeBinary(resource.xhr.responseText);
+	        resource.type = Resource$1.TYPE.IMAGE; // wait until the image loads and then callback
+
+	        resource.data.onload = function () {
+	          resource.data.onload = null;
+	          next();
+	        }; // next will be called on load
+
+
+	        return;
+	      }
+	    } // if content type says this is an image, then we should transform the blob into an Image object
+	    else if (resource.data.type.indexOf('image') === 0) {
+	        var src = Url$1.createObjectURL(resource.data);
+	        resource.blob = resource.data;
+	        resource.data = new Image();
+	        resource.data.src = src;
+	        resource.type = Resource$1.TYPE.IMAGE; // cleanup the no longer used blob after the image loads
+	        // TODO: Is this correct? Will the image be invalid after revoking?
+
+	        resource.data.onload = function () {
+	          Url$1.revokeObjectURL(src);
+	          resource.data.onload = null;
+	          next();
+	        }; // next will be called on load.
+
+
+	        return;
+	      }
+	  }
+
+	  next();
+	}
+
+	/**
+	 * @namespace middleware
+	 */
+
+	var index$1 = ({
+	    caching: caching,
+	    parsing: parsing
+	});
+
+	var MAX_PROGRESS = 100;
+	var rgxExtractUrlHash = /(#[\w-]+)?$/;
+	/**
+	 * Manages the state and loading of multiple resources to load.
+	 *
+	 * @class
+	 */
+
+	var Loader =
+	/*#__PURE__*/
+	function () {
+	  /**
+	   * @param {string} [baseUrl=''] - The base url for all resources loaded by this loader.
+	   * @param {number} [concurrency=10] - The number of resources to load concurrently.
+	   */
+	  function Loader(baseUrl, concurrency) {
+	    var _this = this;
+
+	    if (baseUrl === void 0) {
+	      baseUrl = '';
+	    }
+
+	    if (concurrency === void 0) {
+	      concurrency = 10;
+	    }
+
+	    /**
+	     * The base url for all resources loaded by this loader.
+	     *
+	     * @member {string}
+	     */
+	    this.baseUrl = baseUrl;
+	    /**
+	     * The progress percent of the loader going through the queue.
+	     *
+	     * @member {number}
+	     * @default 0
+	     */
+
+	    this.progress = 0;
+	    /**
+	     * Loading state of the loader, true if it is currently loading resources.
+	     *
+	     * @member {boolean}
+	     * @default false
+	     */
+
+	    this.loading = false;
+	    /**
+	     * A querystring to append to every URL added to the loader.
+	     *
+	     * This should be a valid query string *without* the question-mark (`?`). The loader will
+	     * also *not* escape values for you. Make sure to escape your parameters with
+	     * [`encodeURIComponent`](https://mdn.io/encodeURIComponent) before assigning this property.
+	     *
+	     * @example
+	     * const loader = new Loader();
+	     *
+	     * loader.defaultQueryString = 'user=me&password=secret';
+	     *
+	     * // This will request 'image.png?user=me&password=secret'
+	     * loader.add('image.png').load();
+	     *
+	     * loader.reset();
+	     *
+	     * // This will request 'image.png?v=1&user=me&password=secret'
+	     * loader.add('iamge.png?v=1').load();
+	     *
+	     * @member {string}
+	     * @default ''
+	     */
+
+	    this.defaultQueryString = '';
+	    /**
+	     * The middleware to run before loading each resource.
+	     *
+	     * @private
+	     * @member {function[]}
+	     */
+
+	    this._beforeMiddleware = [];
+	    /**
+	     * The middleware to run after loading each resource.
+	     *
+	     * @private
+	     * @member {function[]}
+	     */
+
+	    this._afterMiddleware = [];
+	    /**
+	     * The tracks the resources we are currently completing parsing for.
+	     *
+	     * @private
+	     * @member {Resource[]}
+	     */
+
+	    this._resourcesParsing = [];
+	    /**
+	     * The `_loadResource` function bound with this object context.
+	     *
+	     * @private
+	     * @member {function}
+	     * @param {Resource} r - The resource to load
+	     * @param {Function} d - The dequeue function
+	     * @return {undefined}
+	     */
+
+	    this._boundLoadResource = function (r, d) {
+	      return _this._loadResource(r, d);
+	    };
+	    /**
+	     * The resources waiting to be loaded.
+	     *
+	     * @private
+	     * @member {Resource[]}
+	     */
+
+
+	    this._queue = queue(this._boundLoadResource, concurrency);
+
+	    this._queue.pause();
+	    /**
+	     * All the resources for this loader keyed by name.
+	     *
+	     * @member {object<string, Resource>}
+	     */
+
+
+	    this.resources = {};
+	    /**
+	     * Dispatched once per loaded or errored resource.
+	     *
+	     * The callback looks like {@link Loader.OnProgressSignal}.
+	     *
+	     * @member {Signal<Loader.OnProgressSignal>}
+	     */
+
+	    this.onProgress = new Signal();
+	    /**
+	     * Dispatched once per errored resource.
+	     *
+	     * The callback looks like {@link Loader.OnErrorSignal}.
+	     *
+	     * @member {Signal<Loader.OnErrorSignal>}
+	     */
+
+	    this.onError = new Signal();
+	    /**
+	     * Dispatched once per loaded resource.
+	     *
+	     * The callback looks like {@link Loader.OnLoadSignal}.
+	     *
+	     * @member {Signal<Loader.OnLoadSignal>}
+	     */
+
+	    this.onLoad = new Signal();
+	    /**
+	     * Dispatched when the loader begins to process the queue.
+	     *
+	     * The callback looks like {@link Loader.OnStartSignal}.
+	     *
+	     * @member {Signal<Loader.OnStartSignal>}
+	     */
+
+	    this.onStart = new Signal();
+	    /**
+	     * Dispatched when the queued resources all load.
+	     *
+	     * The callback looks like {@link Loader.OnCompleteSignal}.
+	     *
+	     * @member {Signal<Loader.OnCompleteSignal>}
+	     */
+
+	    this.onComplete = new Signal(); // Add default before middleware
+
+	    for (var i = 0; i < Loader._defaultBeforeMiddleware.length; ++i) {
+	      this.pre(Loader._defaultBeforeMiddleware[i]);
+	    } // Add default after middleware
+
+
+	    for (var _i = 0; _i < Loader._defaultAfterMiddleware.length; ++_i) {
+	      this.use(Loader._defaultAfterMiddleware[_i]);
+	    }
+	  }
+	  /**
+	   * When the progress changes the loader and resource are disaptched.
+	   *
+	   * @memberof Loader
+	   * @callback OnProgressSignal
+	   * @param {Loader} loader - The loader the progress is advancing on.
+	   * @param {Resource} resource - The resource that has completed or failed to cause the progress to advance.
+	   */
+
+	  /**
+	   * When an error occurrs the loader and resource are disaptched.
+	   *
+	   * @memberof Loader
+	   * @callback OnErrorSignal
+	   * @param {Loader} loader - The loader the error happened in.
+	   * @param {Resource} resource - The resource that caused the error.
+	   */
+
+	  /**
+	   * When a load completes the loader and resource are disaptched.
+	   *
+	   * @memberof Loader
+	   * @callback OnLoadSignal
+	   * @param {Loader} loader - The loader that laoded the resource.
+	   * @param {Resource} resource - The resource that has completed loading.
+	   */
+
+	  /**
+	   * When the loader starts loading resources it dispatches this callback.
+	   *
+	   * @memberof Loader
+	   * @callback OnStartSignal
+	   * @param {Loader} loader - The loader that has started loading resources.
+	   */
+
+	  /**
+	   * When the loader completes loading resources it dispatches this callback.
+	   *
+	   * @memberof Loader
+	   * @callback OnCompleteSignal
+	   * @param {Loader} loader - The loader that has finished loading resources.
+	   */
+
+	  /**
+	   * Options for a call to `.add()`.
+	   *
+	   * @see Loader#add
+	   *
+	   * @typedef {object} IAddOptions
+	   * @property {string} [name] - The name of the resource to load, if not passed the url is used.
+	   * @property {string} [key] - Alias for `name`.
+	   * @property {string} [url] - The url for this resource, relative to the baseUrl of this loader.
+	   * @property {string|boolean} [crossOrigin] - Is this request cross-origin? Default is to
+	   *      determine automatically.
+	   * @property {number} [timeout=0] - A timeout in milliseconds for the load. If the load takes
+	   *      longer than this time it is cancelled and the load is considered a failure. If this value is
+	   *      set to `0` then there is no explicit timeout.
+	   * @property {Resource.LOAD_TYPE} [loadType=Resource.LOAD_TYPE.XHR] - How should this resource
+	   *      be loaded?
+	   * @property {Resource.XHR_RESPONSE_TYPE} [xhrType=Resource.XHR_RESPONSE_TYPE.DEFAULT] - How
+	   *      should the data being loaded be interpreted when using XHR?
+	   * @property {Resource.OnCompleteSignal} [onComplete] - Callback to add an an onComplete signal istener.
+	   * @property {Resource.OnCompleteSignal} [callback] - Alias for `onComplete`.
+	   * @property {Resource.IMetadata} [metadata] - Extra configuration for middleware and the Resource object.
+	   */
+
+	  /* eslint-disable require-jsdoc,valid-jsdoc */
+
+	  /**
+	   * Adds a resource (or multiple resources) to the loader queue.
+	   *
+	   * This function can take a wide variety of different parameters. The only thing that is always
+	   * required the url to load. All the following will work:
+	   *
+	   * ```js
+	   * loader
+	   *     // normal param syntax
+	   *     .add('key', 'http://...', function () {})
+	   *     .add('http://...', function () {})
+	   *     .add('http://...')
+	   *
+	   *     // object syntax
+	   *     .add({
+	   *         name: 'key2',
+	   *         url: 'http://...'
+	   *     }, function () {})
+	   *     .add({
+	   *         url: 'http://...'
+	   *     }, function () {})
+	   *     .add({
+	   *         name: 'key3',
+	   *         url: 'http://...'
+	   *         onComplete: function () {}
+	   *     })
+	   *     .add({
+	   *         url: 'https://...',
+	   *         onComplete: function () {},
+	   *         crossOrigin: true
+	   *     })
+	   *
+	   *     // you can also pass an array of objects or urls or both
+	   *     .add([
+	   *         { name: 'key4', url: 'http://...', onComplete: function () {} },
+	   *         { url: 'http://...', onComplete: function () {} },
+	   *         'http://...'
+	   *     ])
+	   *
+	   *     // and you can use both params and options
+	   *     .add('key', 'http://...', { crossOrigin: true }, function () {})
+	   *     .add('http://...', { crossOrigin: true }, function () {});
+	   * ```
+	   *
+	   * @function
+	   * @variation 1
+	   * @param {string} name - The name of the resource to load.
+	   * @param {string} url - The url for this resource, relative to the baseUrl of this loader.
+	   * @param {Resource.OnCompleteSignal} [callback] - Function to call when this specific resource completes loading.
+	   * @return {this} Returns itself.
+	   */
+
+	  /**
+	  * @function
+	  * @variation 2
+	  * @param {string} name - The name of the resource to load.
+	  * @param {string} url - The url for this resource, relative to the baseUrl of this loader.
+	  * @param {IAddOptions} [options] - The options for the load.
+	  * @param {Resource.OnCompleteSignal} [callback] - Function to call when this specific resource completes loading.
+	  * @return {this} Returns itself.
+	  */
+
+	  /**
+	  * @function
+	  * @variation 3
+	  * @param {string} url - The url for this resource, relative to the baseUrl of this loader.
+	  * @param {Resource.OnCompleteSignal} [callback] - Function to call when this specific resource completes loading.
+	  * @return {this} Returns itself.
+	  */
+
+	  /**
+	  * @function
+	  * @variation 4
+	  * @param {string} url - The url for this resource, relative to the baseUrl of this loader.
+	  * @param {IAddOptions} [options] - The options for the load.
+	  * @param {Resource.OnCompleteSignal} [callback] - Function to call when this specific resource completes loading.
+	  * @return {this} Returns itself.
+	  */
+
+	  /**
+	  * @function
+	  * @variation 5
+	  * @param {IAddOptions} options - The options for the load. This object must contain a `url` property.
+	  * @param {Resource.OnCompleteSignal} [callback] - Function to call when this specific resource completes loading.
+	  * @return {this} Returns itself.
+	  */
+
+	  /**
+	  * @function
+	  * @variation 6
+	  * @param {Array<IAddOptions|string>} resources - An array of resources to load, where each is
+	  *      either an object with the options or a string url. If you pass an object, it must contain a `url` property.
+	  * @param {Resource.OnCompleteSignal} [callback] - Function to call when this specific resource completes loading.
+	  * @return {this} Returns itself.
+	  */
+
+
+	  var _proto = Loader.prototype;
+
+	  _proto.add = function add(name, url, options, cb) {
+	    // special case of an array of objects or urls
+	    if (Array.isArray(name)) {
+	      for (var i = 0; i < name.length; ++i) {
+	        this.add(name[i]);
+	      }
+
+	      return this;
+	    } // if an object is passed instead of params
+
+
+	    if (typeof name === 'object') {
+	      cb = url || name.callback || name.onComplete;
+	      options = name;
+	      url = name.url;
+	      name = name.name || name.key || name.url;
+	    } // case where no name is passed shift all args over by one.
+
+
+	    if (typeof url !== 'string') {
+	      cb = options;
+	      options = url;
+	      url = name;
+	    } // now that we shifted make sure we have a proper url.
+
+
+	    if (typeof url !== 'string') {
+	      throw new Error('No url passed to add resource to loader.');
+	    } // options are optional so people might pass a function and no options
+
+
+	    if (typeof options === 'function') {
+	      cb = options;
+	      options = null;
+	    } // if loading already you can only add resources that have a parent.
+
+
+	    if (this.loading && (!options || !options.parentResource)) {
+	      throw new Error('Cannot add resources while the loader is running.');
+	    } // check if resource already exists.
+
+
+	    if (this.resources[name]) {
+	      throw new Error("Resource named \"" + name + "\" already exists.");
+	    } // add base url if this isn't an absolute url
+
+
+	    url = this._prepareUrl(url); // create the store the resource
+
+	    this.resources[name] = new Resource$1(name, url, options);
+
+	    if (typeof cb === 'function') {
+	      this.resources[name].onAfterMiddleware.once(cb);
+	    } // if actively loading, make sure to adjust progress chunks for that parent and its children
+
+
+	    if (this.loading) {
+	      var parent = options.parentResource;
+	      var incompleteChildren = [];
+
+	      for (var _i2 = 0; _i2 < parent.children.length; ++_i2) {
+	        if (!parent.children[_i2].isComplete) {
+	          incompleteChildren.push(parent.children[_i2]);
+	        }
+	      }
+
+	      var fullChunk = parent.progressChunk * (incompleteChildren.length + 1); // +1 for parent
+
+	      var eachChunk = fullChunk / (incompleteChildren.length + 2); // +2 for parent & new child
+
+	      parent.children.push(this.resources[name]);
+	      parent.progressChunk = eachChunk;
+
+	      for (var _i3 = 0; _i3 < incompleteChildren.length; ++_i3) {
+	        incompleteChildren[_i3].progressChunk = eachChunk;
+	      }
+
+	      this.resources[name].progressChunk = eachChunk;
+	    } // add the resource to the queue
+
+
+	    this._queue.push(this.resources[name]);
+
+	    return this;
+	  }
+	  /* eslint-enable require-jsdoc,valid-jsdoc */
+
+	  /**
+	   * Sets up a middleware function that will run *before* the
+	   * resource is loaded.
+	   *
+	   * @param {function} fn - The middleware function to register.
+	   * @return {this} Returns itself.
+	   */
+	  ;
+
+	  _proto.pre = function pre(fn) {
+	    this._beforeMiddleware.push(fn);
+
+	    return this;
+	  }
+	  /**
+	   * Sets up a middleware function that will run *after* the
+	   * resource is loaded.
+	   *
+	   * @param {function} fn - The middleware function to register.
+	   * @return {this} Returns itself.
+	   */
+	  ;
+
+	  _proto.use = function use(fn) {
+	    this._afterMiddleware.push(fn);
+
+	    return this;
+	  }
+	  /**
+	   * Resets the queue of the loader to prepare for a new load.
+	   *
+	   * @return {this} Returns itself.
+	   */
+	  ;
+
+	  _proto.reset = function reset() {
+	    this.progress = 0;
+	    this.loading = false;
+
+	    this._queue.kill();
+
+	    this._queue.pause(); // abort all resource loads
+
+
+	    for (var k in this.resources) {
+	      var res = this.resources[k];
+
+	      if (res._onLoadBinding) {
+	        res._onLoadBinding.detach();
+	      }
+
+	      if (res.isLoading) {
+	        res.abort();
+	      }
+	    }
+
+	    this.resources = {};
+	    return this;
+	  }
+	  /**
+	   * Starts loading the queued resources.
+	   *
+	   * @param {function} [cb] - Optional callback that will be bound to the `complete` event.
+	   * @return {this} Returns itself.
+	   */
+	  ;
+
+	  _proto.load = function load(cb) {
+	    // register complete callback if they pass one
+	    if (typeof cb === 'function') {
+	      this.onComplete.once(cb);
+	    } // if the queue has already started we are done here
+
+
+	    if (this.loading) {
+	      return this;
+	    }
+
+	    if (this._queue.idle()) {
+	      this._onStart();
+
+	      this._onComplete();
+	    } else {
+	      // distribute progress chunks
+	      var numTasks = this._queue._tasks.length;
+	      var chunk = MAX_PROGRESS / numTasks;
+
+	      for (var i = 0; i < this._queue._tasks.length; ++i) {
+	        this._queue._tasks[i].data.progressChunk = chunk;
+	      } // notify we are starting
+
+
+	      this._onStart(); // start loading
+
+
+	      this._queue.resume();
+	    }
+
+	    return this;
+	  }
+	  /**
+	   * The number of resources to load concurrently.
+	   *
+	   * @member {number}
+	   * @default 10
+	   */
+	  ;
+
+	  /**
+	   * Prepares a url for usage based on the configuration of this object
+	   *
+	   * @private
+	   * @param {string} url - The url to prepare.
+	   * @return {string} The prepared url.
+	   */
+	  _proto._prepareUrl = function _prepareUrl(url) {
+	    var parsedUrl = parseUri(url, {
+	      strictMode: true
+	    });
+	    var result; // absolute url, just use it as is.
+
+	    if (parsedUrl.protocol || !parsedUrl.path || url.indexOf('//') === 0) {
+	      result = url;
+	    } // if baseUrl doesn't end in slash and url doesn't start with slash, then add a slash inbetween
+	    else if (this.baseUrl.length && this.baseUrl.lastIndexOf('/') !== this.baseUrl.length - 1 && url.charAt(0) !== '/') {
+	        result = this.baseUrl + "/" + url;
+	      } else {
+	        result = this.baseUrl + url;
+	      } // if we need to add a default querystring, there is a bit more work
+
+
+	    if (this.defaultQueryString) {
+	      var hash = rgxExtractUrlHash.exec(result)[0];
+	      result = result.substr(0, result.length - hash.length);
+
+	      if (result.indexOf('?') !== -1) {
+	        result += "&" + this.defaultQueryString;
+	      } else {
+	        result += "?" + this.defaultQueryString;
+	      }
+
+	      result += hash;
+	    }
+
+	    return result;
+	  }
+	  /**
+	   * Loads a single resource.
+	   *
+	   * @private
+	   * @param {Resource} resource - The resource to load.
+	   * @param {function} dequeue - The function to call when we need to dequeue this item.
+	   */
+	  ;
+
+	  _proto._loadResource = function _loadResource(resource, dequeue) {
+	    var _this2 = this;
+
+	    resource._dequeue = dequeue; // run before middleware
+
+	    eachSeries(this._beforeMiddleware, function (fn, next) {
+	      fn.call(_this2, resource, function () {
+	        // if the before middleware marks the resource as complete,
+	        // break and don't process any more before middleware
+	        next(resource.isComplete ? {} : null);
+	      });
+	    }, function () {
+	      if (resource.isComplete) {
+	        _this2._onLoad(resource);
+	      } else {
+	        resource._onLoadBinding = resource.onComplete.once(_this2._onLoad, _this2);
+	        resource.load();
+	      }
+	    }, true);
+	  }
+	  /**
+	   * Called once loading has started.
+	   *
+	   * @private
+	   */
+	  ;
+
+	  _proto._onStart = function _onStart() {
+	    this.progress = 0;
+	    this.loading = true;
+	    this.onStart.dispatch(this);
+	  }
+	  /**
+	   * Called once each resource has loaded.
+	   *
+	   * @private
+	   */
+	  ;
+
+	  _proto._onComplete = function _onComplete() {
+	    this.progress = MAX_PROGRESS;
+	    this.loading = false;
+	    this.onComplete.dispatch(this, this.resources);
+	  }
+	  /**
+	   * Called each time a resources is loaded.
+	   *
+	   * @private
+	   * @param {Resource} resource - The resource that was loaded
+	   */
+	  ;
+
+	  _proto._onLoad = function _onLoad(resource) {
+	    var _this3 = this;
+
+	    resource._onLoadBinding = null; // remove this resource from the async queue, and add it to our list of resources that are being parsed
+
+	    this._resourcesParsing.push(resource);
+
+	    resource._dequeue(); // run all the after middleware for this resource
+
+
+	    eachSeries(this._afterMiddleware, function (fn, next) {
+	      fn.call(_this3, resource, next);
+	    }, function () {
+	      resource.onAfterMiddleware.dispatch(resource);
+	      _this3.progress = Math.min(MAX_PROGRESS, _this3.progress + resource.progressChunk);
+
+	      _this3.onProgress.dispatch(_this3, resource);
+
+	      if (resource.error) {
+	        _this3.onError.dispatch(resource.error, _this3, resource);
+	      } else {
+	        _this3.onLoad.dispatch(_this3, resource);
+	      }
+
+	      _this3._resourcesParsing.splice(_this3._resourcesParsing.indexOf(resource), 1); // do completion check
+
+
+	      if (_this3._queue.idle() && _this3._resourcesParsing.length === 0) {
+	        _this3._onComplete();
+	      }
+	    }, true);
+	  };
+
+	  _createClass(Loader, [{
+	    key: "concurrency",
+	    get: function get() {
+	      return this._queue.concurrency;
+	    } // eslint-disable-next-line require-jsdoc
+	    ,
+	    set: function set(concurrency) {
+	      this._queue.concurrency = concurrency;
+	    }
+	  }]);
+
+	  return Loader;
+	}();
+	/**
+	 * A default array of middleware to run before loading each resource.
+	 * Each of these middlewares are added to any new Loader instances when they are created.
+	 *
+	 * @private
+	 * @member {function[]}
+	 */
+
+
+	Loader._defaultBeforeMiddleware = [];
+	/**
+	 * A default array of middleware to run after loading each resource.
+	 * Each of these middlewares are added to any new Loader instances when they are created.
+	 *
+	 * @private
+	 * @member {function[]}
+	 */
+
+	Loader._defaultAfterMiddleware = [];
+	/**
+	 * Sets up a middleware function that will run *before* the
+	 * resource is loaded.
+	 *
+	 * @static
+	 * @param {function} fn - The middleware function to register.
+	 * @return {Loader} Returns itself.
+	 */
+
+	Loader.pre = function LoaderPreStatic(fn) {
+	  Loader._defaultBeforeMiddleware.push(fn);
+
+	  return Loader;
+	};
+	/**
+	 * Sets up a middleware function that will run *after* the
+	 * resource is loaded.
+	 *
+	 * @static
+	 * @param {function} fn - The middleware function to register.
+	 * @return {Loader} Returns itself.
+	 */
+
+
+	Loader.use = function LoaderUseStatic(fn) {
+	  Loader._defaultAfterMiddleware.push(fn);
+
+	  return Loader;
+	};
+
+	/*!
+	 * @pixi/loaders - v5.1.4
+	 * Compiled Fri, 20 Sep 2019 17:22:13 UTC
+	 *
+	 * @pixi/loaders is licensed under the MIT License.
+	 * http://www.opensource.org/licenses/mit-license
+	 */
+
+	/**
+	 * Loader plugin for handling Texture resources.
+	 * @class
+	 * @memberof PIXI
+	 * @implements PIXI.ILoaderPlugin
+	 */
+	var TextureLoader = function TextureLoader () {};
+
+	TextureLoader.use = function use (resource, next)
+	{
+	    // create a new texture if the data is an Image object
+	    if (resource.data && resource.type === Resource$1.TYPE.IMAGE)
+	    {
+	        resource.texture = Texture.fromLoader(
+	            resource.data,
+	            resource.url,
+	            resource.name
+	        );
+	    }
+	    next();
+	};
+
+	/**
+	 * The new loader, extends Resource Loader by Chad Engler: https://github.com/englercj/resource-loader
+	 *
+	 * ```js
+	 * const loader = PIXI.Loader.shared; // PixiJS exposes a premade instance for you to use.
+	 * //or
+	 * const loader = new PIXI.Loader(); // you can also create your own if you want
+	 *
+	 * const sprites = {};
+	 *
+	 * // Chainable `add` to enqueue a resource
+	 * loader.add('bunny', 'data/bunny.png')
+	 *       .add('spaceship', 'assets/spritesheet.json');
+	 * loader.add('scoreFont', 'assets/score.fnt');
+	 *
+	 * // Chainable `pre` to add a middleware that runs for each resource, *before* loading that resource.
+	 * // This is useful to implement custom caching modules (using filesystem, indexeddb, memory, etc).
+	 * loader.pre(cachingMiddleware);
+	 *
+	 * // Chainable `use` to add a middleware that runs for each resource, *after* loading that resource.
+	 * // This is useful to implement custom parsing modules (like spritesheet parsers, spine parser, etc).
+	 * loader.use(parsingMiddleware);
+	 *
+	 * // The `load` method loads the queue of resources, and calls the passed in callback called once all
+	 * // resources have loaded.
+	 * loader.load((loader, resources) => {
+	 *     // resources is an object where the key is the name of the resource loaded and the value is the resource object.
+	 *     // They have a couple default properties:
+	 *     // - `url`: The URL that the resource was loaded from
+	 *     // - `error`: The error that happened when trying to load (if any)
+	 *     // - `data`: The raw data that was loaded
+	 *     // also may contain other properties based on the middleware that runs.
+	 *     sprites.bunny = new PIXI.TilingSprite(resources.bunny.texture);
+	 *     sprites.spaceship = new PIXI.TilingSprite(resources.spaceship.texture);
+	 *     sprites.scoreFont = new PIXI.TilingSprite(resources.scoreFont.texture);
+	 * });
+	 *
+	 * // throughout the process multiple signals can be dispatched.
+	 * loader.onProgress.add(() => {}); // called once per loaded/errored file
+	 * loader.onError.add(() => {}); // called once per errored file
+	 * loader.onLoad.add(() => {}); // called once per loaded file
+	 * loader.onComplete.add(() => {}); // called once when the queued resources all load.
+	 * ```
+	 *
+	 * @see https://github.com/englercj/resource-loader
+	 *
+	 * @class Loader
+	 * @memberof PIXI
+	 * @param {string} [baseUrl=''] - The base url for all resources loaded by this loader.
+	 * @param {number} [concurrency=10] - The number of resources to load concurrently.
+	 */
+	var Loader$1 = /*@__PURE__*/(function (ResourceLoader) {
+	    function Loader(baseUrl, concurrency)
+	    {
+	        var this$1 = this;
+
+	        ResourceLoader.call(this, baseUrl, concurrency);
+	        eventemitter3.call(this);
+
+	        for (var i = 0; i < Loader._plugins.length; ++i)
+	        {
+	            var plugin = Loader._plugins[i];
+	            var pre = plugin.pre;
+	            var use = plugin.use;
+
+	            if (pre)
+	            {
+	                this.pre(pre);
+	            }
+
+	            if (use)
+	            {
+	                this.use(use);
+	            }
+	        }
+
+	        // Compat layer, translate the new v2 signals into old v1 events.
+	        this.onStart.add(function (l) { return this$1.emit('start', l); });
+	        this.onProgress.add(function (l, r) { return this$1.emit('progress', l, r); });
+	        this.onError.add(function (e, l, r) { return this$1.emit('error', e, l, r); });
+	        this.onLoad.add(function (l, r) { return this$1.emit('load', l, r); });
+	        this.onComplete.add(function (l, r) { return this$1.emit('complete', l, r); });
+
+	        /**
+	         * If this loader cannot be destroyed.
+	         * @member {boolean}
+	         * @default false
+	         * @private
+	         */
+	        this._protected = false;
+	    }
+
+	    if ( ResourceLoader ) { Loader.__proto__ = ResourceLoader; }
+	    Loader.prototype = Object.create( ResourceLoader && ResourceLoader.prototype );
+	    Loader.prototype.constructor = Loader;
+
+	    var staticAccessors = { shared: { configurable: true } };
+
+	    /**
+	     * Destroy the loader, removes references.
+	     * @private
+	     */
+	    Loader.prototype.destroy = function destroy ()
+	    {
+	        if (!this._protected)
+	        {
+	            this.removeAllListeners();
+	            this.reset();
+	        }
+	    };
+
+	    /**
+	     * A premade instance of the loader that can be used to load resources.
+	     * @name shared
+	     * @type {PIXI.Loader}
+	     * @static
+	     * @memberof PIXI.Loader
+	     */
+	    staticAccessors.shared.get = function ()
+	    {
+	        var shared = Loader._shared;
+
+	        if (!shared)
+	        {
+	            shared = new Loader();
+	            shared._protected = true;
+	            Loader._shared = shared;
+	        }
+
+	        return shared;
+	    };
+
+	    Object.defineProperties( Loader, staticAccessors );
+
+	    return Loader;
+	}(Loader));
+
+	// Copy EE3 prototype (mixin)
+	Object.assign(Loader$1.prototype, eventemitter3.prototype);
+
+	/**
+	 * Collection of all installed `use` middleware for Loader.
+	 *
+	 * @static
+	 * @member {Array<PIXI.ILoaderPlugin>} _plugins
+	 * @memberof PIXI.Loader
+	 * @private
+	 */
+	Loader$1._plugins = [];
+
+	/**
+	 * Adds a Loader plugin for the global shared loader and all
+	 * new Loader instances created.
+	 *
+	 * @static
+	 * @method registerPlugin
+	 * @memberof PIXI.Loader
+	 * @param {PIXI.ILoaderPlugin} plugin - The plugin to add
+	 * @return {PIXI.Loader} Reference to PIXI.Loader for chaining
+	 */
+	Loader$1.registerPlugin = function registerPlugin(plugin)
+	{
+	    Loader$1._plugins.push(plugin);
+
+	    if (plugin.add)
+	    {
+	        plugin.add();
+	    }
+
+	    return Loader$1;
+	};
+
+	// parse any blob into more usable objects (e.g. Image)
+	Loader$1.registerPlugin({ use: index$1.parsing });
+
+	// parse any Image objects into textures
+	Loader$1.registerPlugin(TextureLoader);
+
+	/**
+	 * Plugin to be installed for handling specific Loader resources.
+	 *
+	 * @memberof PIXI
+	 * @typedef ILoaderPlugin
+	 * @property {function} [add] - Function to call immediate after registering plugin.
+	 * @property {PIXI.Loader.loaderMiddleware} [pre] - Middleware function to run before load, the
+	 *           arguments for this are `(resource, next)`
+	 * @property {PIXI.Loader.loaderMiddleware} [use] - Middleware function to run after load, the
+	 *           arguments for this are `(resource, next)`
+	 */
+
+	/**
+	 * @memberof PIXI.Loader
+	 * @callback loaderMiddleware
+	 * @param {PIXI.LoaderResource} resource
+	 * @param {function} next
+	 */
+
+	/**
+	 * @memberof PIXI.Loader#
+	 * @member {object} onStart
+	 */
+
+	/**
+	 * @memberof PIXI.Loader#
+	 * @member {object} onProgress
+	 */
+
+	/**
+	 * @memberof PIXI.Loader#
+	 * @member {object} onError
+	 */
+
+	/**
+	 * @memberof PIXI.Loader#
+	 * @member {object} onLoad
+	 */
+
+	/**
+	 * @memberof PIXI.Loader#
+	 * @member {object} onComplete
+	 */
+
+	/**
+	 * Application plugin for supporting loader option. Installing the LoaderPlugin
+	 * is not necessary if using **pixi.js** or **pixi.js-legacy**.
+	 * @example
+	 * import {AppLoaderPlugin} from '@pixi/loaders';
+	 * import {Application} from '@pixi/app';
+	 * Application.registerPlugin(AppLoaderPlugin);
+	 * @class
+	 * @memberof PIXI
+	 */
+	var AppLoaderPlugin = function AppLoaderPlugin () {};
+
+	AppLoaderPlugin.init = function init (options)
+	{
+	    options = Object.assign({
+	        sharedLoader: false,
+	    }, options);
+
+	    /**
+	     * Loader instance to help with asset loading.
+	     * @name PIXI.Application#loader
+	     * @type {PIXI.Loader}
+	     * @readonly
+	     */
+	    this.loader = options.sharedLoader ? Loader$1.shared : new Loader$1();
+	};
+
+	/**
+	 * Called when application destroyed
+	 * @private
+	 */
+	AppLoaderPlugin.destroy = function destroy ()
+	{
+	    if (this.loader)
+	    {
+	        this.loader.destroy();
+	        this.loader = null;
+	    }
+	};
+
+	/**
+	 * Reference to **{@link https://github.com/englercj/resource-loader
+	 * resource-loader}**'s Resource class.
+	 * @see http://englercj.github.io/resource-loader/Resource.html
+	 * @class LoaderResource
+	 * @memberof PIXI
+	 */
+	var LoaderResource = Resource$1;
+
+	/*!
+	 * @pixi/particles - v5.1.4
+	 * Compiled Fri, 20 Sep 2019 17:22:13 UTC
+	 *
+	 * @pixi/particles is licensed under the MIT License.
+	 * http://www.opensource.org/licenses/mit-license
+	 */
+
+	/**
+	 * The ParticleContainer class is a really fast version of the Container built solely for speed,
+	 * so use when you need a lot of sprites or particles.
+	 *
+	 * The tradeoff of the ParticleContainer is that most advanced functionality will not work.
+	 * ParticleContainer implements the basic object transform (position, scale, rotation)
+	 * and some advanced functionality like tint (as of v4.5.6).
+	 *
+	 * Other more advanced functionality like masking, children, filters, etc will not work on sprites in this batch.
+	 *
+	 * It's extremely easy to use:
+	 * ```js
+	 * let container = new ParticleContainer();
+	 *
+	 * for (let i = 0; i < 100; ++i)
+	 * {
+	 *     let sprite = PIXI.Sprite.from("myImage.png");
+	 *     container.addChild(sprite);
+	 * }
+	 * ```
+	 *
+	 * And here you have a hundred sprites that will be rendered at the speed of light.
+	 *
+	 * @class
+	 * @extends PIXI.Container
+	 * @memberof PIXI
+	 */
+	var ParticleContainer = /*@__PURE__*/(function (Container) {
+	    function ParticleContainer(maxSize, properties, batchSize, autoResize)
+	    {
+	        if ( maxSize === void 0 ) { maxSize = 1500; }
+	        if ( batchSize === void 0 ) { batchSize = 16384; }
+	        if ( autoResize === void 0 ) { autoResize = false; }
+
+	        Container.call(this);
+
+	        // Making sure the batch size is valid
+	        // 65535 is max vertex index in the index buffer (see ParticleRenderer)
+	        // so max number of particles is 65536 / 4 = 16384
+	        var maxBatchSize = 16384;
+
+	        if (batchSize > maxBatchSize)
+	        {
+	            batchSize = maxBatchSize;
+	        }
+
+	        /**
+	         * Set properties to be dynamic (true) / static (false)
+	         *
+	         * @member {boolean[]}
+	         * @private
+	         */
+	        this._properties = [false, true, false, false, false];
+
+	        /**
+	         * @member {number}
+	         * @private
+	         */
+	        this._maxSize = maxSize;
+
+	        /**
+	         * @member {number}
+	         * @private
+	         */
+	        this._batchSize = batchSize;
+
+	        /**
+	         * @member {Array<PIXI.Buffer>}
+	         * @private
+	         */
+	        this._buffers = null;
+
+	        /**
+	         * for every batch stores _updateID corresponding to the last change in that batch
+	         * @member {number[]}
+	         * @private
+	         */
+	        this._bufferUpdateIDs = [];
+
+	        /**
+	         * when child inserted, removed or changes position this number goes up
+	         * @member {number[]}
+	         * @private
+	         */
+	        this._updateID = 0;
+
+	        /**
+	         * @member {boolean}
+	         *
+	         */
+	        this.interactiveChildren = false;
+
+	        /**
+	         * The blend mode to be applied to the sprite. Apply a value of `PIXI.BLEND_MODES.NORMAL`
+	         * to reset the blend mode.
+	         *
+	         * @member {number}
+	         * @default PIXI.BLEND_MODES.NORMAL
+	         * @see PIXI.BLEND_MODES
+	         */
+	        this.blendMode = BLEND_MODES.NORMAL;
+
+	        /**
+	         * If true, container allocates more batches in case there are more than `maxSize` particles.
+	         * @member {boolean}
+	         * @default false
+	         */
+	        this.autoResize = autoResize;
+
+	        /**
+	         * If true PixiJS will Math.floor() x/y values when rendering, stopping pixel interpolation.
+	         * Advantages can include sharper image quality (like text) and faster rendering on canvas.
+	         * The main disadvantage is movement of objects may appear less smooth.
+	         * Default to true here as performance is usually the priority for particles.
+	         *
+	         * @member {boolean}
+	         * @default true
+	         */
+	        this.roundPixels = true;
+
+	        /**
+	         * The texture used to render the children.
+	         *
+	         * @readonly
+	         * @member {PIXI.BaseTexture}
+	         */
+	        this.baseTexture = null;
+
+	        this.setProperties(properties);
+
+	        /**
+	         * The tint applied to the container.
+	         * This is a hex value. A value of 0xFFFFFF will remove any tint effect.
+	         *
+	         * @private
+	         * @member {number}
+	         * @default 0xFFFFFF
+	         */
+	        this._tint = 0;
+	        this.tintRgb = new Float32Array(4);
+	        this.tint = 0xFFFFFF;
+	    }
+
+	    if ( Container ) { ParticleContainer.__proto__ = Container; }
+	    ParticleContainer.prototype = Object.create( Container && Container.prototype );
+	    ParticleContainer.prototype.constructor = ParticleContainer;
+
+	    var prototypeAccessors = { tint: { configurable: true } };
+
+	    /**
+	     * Sets the private properties array to dynamic / static based on the passed properties object
+	     *
+	     * @param {object} properties - The properties to be uploaded
+	     */
+	    ParticleContainer.prototype.setProperties = function setProperties (properties)
+	    {
+	        if (properties)
+	        {
+	            this._properties[0] = 'vertices' in properties || 'scale' in properties
+	                ? !!properties.vertices || !!properties.scale : this._properties[0];
+	            this._properties[1] = 'position' in properties ? !!properties.position : this._properties[1];
+	            this._properties[2] = 'rotation' in properties ? !!properties.rotation : this._properties[2];
+	            this._properties[3] = 'uvs' in properties ? !!properties.uvs : this._properties[3];
+	            this._properties[4] = 'tint' in properties || 'alpha' in properties
+	                ? !!properties.tint || !!properties.alpha : this._properties[4];
+	        }
+	    };
+
+	    /**
+	     * Updates the object transform for rendering
+	     *
+	     * @private
+	     */
+	    ParticleContainer.prototype.updateTransform = function updateTransform ()
+	    {
+	        // TODO don't need to!
+	        this.displayObjectUpdateTransform();
+	        //  PIXI.Container.prototype.updateTransform.call( this );
+	    };
+
+	    /**
+	     * The tint applied to the container. This is a hex value.
+	     * A value of 0xFFFFFF will remove any tint effect.
+	     ** IMPORTANT: This is a WebGL only feature and will be ignored by the canvas renderer.
+	     * @member {number}
+	     * @default 0xFFFFFF
+	     */
+	    prototypeAccessors.tint.get = function ()
+	    {
+	        return this._tint;
+	    };
+
+	    prototypeAccessors.tint.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        this._tint = value;
+	        hex2rgb(value, this.tintRgb);
+	    };
+
+	    /**
+	     * Renders the container using the WebGL renderer
+	     *
+	     * @private
+	     * @param {PIXI.Renderer} renderer - The webgl renderer
+	     */
+	    ParticleContainer.prototype.render = function render (renderer)
+	    {
+	        var this$1 = this;
+
+	        if (!this.visible || this.worldAlpha <= 0 || !this.children.length || !this.renderable)
+	        {
+	            return;
+	        }
+
+	        if (!this.baseTexture)
+	        {
+	            this.baseTexture = this.children[0]._texture.baseTexture;
+	            if (!this.baseTexture.valid)
+	            {
+	                this.baseTexture.once('update', function () { return this$1.onChildrenChange(0); });
+	            }
+	        }
+
+	        renderer.batch.setObjectRenderer(renderer.plugins.particle);
+	        renderer.plugins.particle.render(this);
+	    };
+
+	    /**
+	     * Set the flag that static data should be updated to true
+	     *
+	     * @private
+	     * @param {number} smallestChildIndex - The smallest child index
+	     */
+	    ParticleContainer.prototype.onChildrenChange = function onChildrenChange (smallestChildIndex)
+	    {
+	        var bufferIndex = Math.floor(smallestChildIndex / this._batchSize);
+
+	        while (this._bufferUpdateIDs.length < bufferIndex)
+	        {
+	            this._bufferUpdateIDs.push(0);
+	        }
+	        this._bufferUpdateIDs[bufferIndex] = ++this._updateID;
+	    };
+
+	    ParticleContainer.prototype.dispose = function dispose ()
+	    {
+	        if (this._buffers)
+	        {
+	            for (var i = 0; i < this._buffers.length; ++i)
+	            {
+	                this._buffers[i].destroy();
+	            }
+
+	            this._buffers = null;
+	        }
+	    };
+
+	    /**
+	     * Destroys the container
+	     *
+	     * @param {object|boolean} [options] - Options parameter. A boolean will act as if all options
+	     *  have been set to that value
+	     * @param {boolean} [options.children=false] - if set to true, all the children will have their
+	     *  destroy method called as well. 'options' will be passed on to those calls.
+	     * @param {boolean} [options.texture=false] - Only used for child Sprites if options.children is set to true
+	     *  Should it destroy the texture of the child sprite
+	     * @param {boolean} [options.baseTexture=false] - Only used for child Sprites if options.children is set to true
+	     *  Should it destroy the base texture of the child sprite
+	     */
+	    ParticleContainer.prototype.destroy = function destroy (options)
+	    {
+	        Container.prototype.destroy.call(this, options);
+
+	        this.dispose();
+
+	        this._properties = null;
+	        this._buffers = null;
+	        this._bufferUpdateIDs = null;
+	    };
+
+	    Object.defineProperties( ParticleContainer.prototype, prototypeAccessors );
+
+	    return ParticleContainer;
+	}(Container));
+
+	/**
+	 * @author Mat Groves
+	 *
+	 * Big thanks to the very clever Matt DesLauriers <mattdesl> https://github.com/mattdesl/
+	 * for creating the original PixiJS version!
+	 * Also a thanks to https://github.com/bchevalier for tweaking the tint and alpha so that
+	 * they now share 4 bytes on the vertex buffer
+	 *
+	 * Heavily inspired by LibGDX's ParticleBuffer:
+	 * https://github.com/libgdx/libgdx/blob/master/gdx/src/com/badlogic/gdx/graphics/g2d/ParticleBuffer.java
+	 */
+
+	/**
+	 * The particle buffer manages the static and dynamic buffers for a particle container.
+	 *
+	 * @class
+	 * @private
+	 * @memberof PIXI
+	 */
+	var ParticleBuffer = function ParticleBuffer(properties, dynamicPropertyFlags, size)
+	{
+	    this.geometry = new Geometry();
+
+	    this.indexBuffer = null;
+
+	    /**
+	     * The number of particles the buffer can hold
+	     *
+	     * @private
+	     * @member {number}
+	     */
+	    this.size = size;
+
+	    /**
+	     * A list of the properties that are dynamic.
+	     *
+	     * @private
+	     * @member {object[]}
+	     */
+	    this.dynamicProperties = [];
+
+	    /**
+	     * A list of the properties that are static.
+	     *
+	     * @private
+	     * @member {object[]}
+	     */
+	    this.staticProperties = [];
+
+	    for (var i = 0; i < properties.length; ++i)
+	    {
+	        var property = properties[i];
+
+	        // Make copy of properties object so that when we edit the offset it doesn't
+	        // change all other instances of the object literal
+	        property = {
+	            attributeName: property.attributeName,
+	            size: property.size,
+	            uploadFunction: property.uploadFunction,
+	            type: property.type || TYPES.FLOAT,
+	            offset: property.offset,
+	        };
+
+	        if (dynamicPropertyFlags[i])
+	        {
+	            this.dynamicProperties.push(property);
+	        }
+	        else
+	        {
+	            this.staticProperties.push(property);
+	        }
+	    }
+
+	    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._updateID = 0;
+
+	    this.initBuffers();
+	};
+
+	/**
+	 * Sets up the renderer context and necessary buffers.
+	 *
+	 * @private
+	 */
+	ParticleBuffer.prototype.initBuffers = function initBuffers ()
+	{
+	    var geometry = this.geometry;
+
+	    var dynamicOffset = 0;
+
+	    /**
+	     * Holds the indices of the geometry (quads) to draw
+	     *
+	     * @member {Uint16Array}
+	     * @private
+	     */
+	    this.indexBuffer = new Buffer(createIndicesForQuads(this.size), true, true);
+	    geometry.addIndex(this.indexBuffer);
+
+	    this.dynamicStride = 0;
+
+	    for (var i = 0; i < this.dynamicProperties.length; ++i)
+	    {
+	        var property = this.dynamicProperties[i];
+
+	        property.offset = dynamicOffset;
+	        dynamicOffset += property.size;
+	        this.dynamicStride += property.size;
+	    }
+
+	    var dynBuffer = new ArrayBuffer(this.size * this.dynamicStride * 4 * 4);
+
+	    this.dynamicData = new Float32Array(dynBuffer);
+	    this.dynamicDataUint32 = new Uint32Array(dynBuffer);
+	    this.dynamicBuffer = new Buffer(this.dynamicData, false, false);
+
+	    // static //
+	    var staticOffset = 0;
+
+	    this.staticStride = 0;
+
+	    for (var i$1 = 0; i$1 < this.staticProperties.length; ++i$1)
+	    {
+	        var property$1 = this.staticProperties[i$1];
+
+	        property$1.offset = staticOffset;
+	        staticOffset += property$1.size;
+	        this.staticStride += property$1.size;
+	    }
+
+	    var statBuffer = new ArrayBuffer(this.size * this.staticStride * 4 * 4);
+
+	    this.staticData = new Float32Array(statBuffer);
+	    this.staticDataUint32 = new Uint32Array(statBuffer);
+	    this.staticBuffer = new Buffer(this.staticData, true, false);
+
+	    for (var i$2 = 0; i$2 < this.dynamicProperties.length; ++i$2)
+	    {
+	        var property$2 = this.dynamicProperties[i$2];
+
+	        geometry.addAttribute(
+	            property$2.attributeName,
+	            this.dynamicBuffer,
+	            0,
+	            property$2.type === TYPES.UNSIGNED_BYTE,
+	            property$2.type,
+	            this.dynamicStride * 4,
+	            property$2.offset * 4
+	        );
+	    }
+
+	    for (var i$3 = 0; i$3 < this.staticProperties.length; ++i$3)
+	    {
+	        var property$3 = this.staticProperties[i$3];
+
+	        geometry.addAttribute(
+	            property$3.attributeName,
+	            this.staticBuffer,
+	            0,
+	            property$3.type === TYPES.UNSIGNED_BYTE,
+	            property$3.type,
+	            this.staticStride * 4,
+	            property$3.offset * 4
+	        );
+	    }
+	};
+
+	/**
+	 * Uploads the dynamic properties.
+	 *
+	 * @private
+	 * @param {PIXI.DisplayObject[]} children - The children to upload.
+	 * @param {number} startIndex - The index to start at.
+	 * @param {number} amount - The number to upload.
+	 */
+	ParticleBuffer.prototype.uploadDynamic = function uploadDynamic (children, startIndex, amount)
+	{
+	    for (var i = 0; i < this.dynamicProperties.length; i++)
+	    {
+	        var property = this.dynamicProperties[i];
+
+	        property.uploadFunction(children, startIndex, amount,
+	            property.type === TYPES.UNSIGNED_BYTE ? this.dynamicDataUint32 : this.dynamicData,
+	            this.dynamicStride, property.offset);
+	    }
+
+	    this.dynamicBuffer._updateID++;
+	};
+
+	/**
+	 * Uploads the static properties.
+	 *
+	 * @private
+	 * @param {PIXI.DisplayObject[]} children - The children to upload.
+	 * @param {number} startIndex - The index to start at.
+	 * @param {number} amount - The number to upload.
+	 */
+	ParticleBuffer.prototype.uploadStatic = function uploadStatic (children, startIndex, amount)
+	{
+	    for (var i = 0; i < this.staticProperties.length; i++)
+	    {
+	        var property = this.staticProperties[i];
+
+	        property.uploadFunction(children, startIndex, amount,
+	            property.type === TYPES.UNSIGNED_BYTE ? this.staticDataUint32 : this.staticData,
+	            this.staticStride, property.offset);
+	    }
+
+	    this.staticBuffer._updateID++;
+	};
+
+	/**
+	 * Destroys the ParticleBuffer.
+	 *
+	 * @private
+	 */
+	ParticleBuffer.prototype.destroy = function destroy ()
+	{
+	    this.indexBuffer = null;
+
+	    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;
+	    // all buffers are destroyed inside geometry
+	    this.geometry.destroy();
+	};
+
+	var vertex$1 = "attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec4 aColor;\n\nattribute vec2 aPositionCoord;\nattribute float aRotation;\n\nuniform mat3 translationMatrix;\nuniform vec4 uColor;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nvoid main(void){\n    float x = (aVertexPosition.x) * cos(aRotation) - (aVertexPosition.y) * sin(aRotation);\n    float y = (aVertexPosition.x) * sin(aRotation) + (aVertexPosition.y) * cos(aRotation);\n\n    vec2 v = vec2(x, y);\n    v = v + aPositionCoord;\n\n    gl_Position = vec4((translationMatrix * vec3(v, 1.0)).xy, 0.0, 1.0);\n\n    vTextureCoord = aTextureCoord;\n    vColor = aColor * uColor;\n}\n";
+
+	var fragment$1 = "varying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform sampler2D uSampler;\n\nvoid main(void){\n    vec4 color = texture2D(uSampler, vTextureCoord) * vColor;\n    gl_FragColor = color;\n}";
+
+	/**
+	 * @author Mat Groves
+	 *
+	 * Big thanks to the very clever Matt DesLauriers <mattdesl> https://github.com/mattdesl/
+	 * for creating the original PixiJS version!
+	 * Also a thanks to https://github.com/bchevalier for tweaking the tint and alpha so that they now
+	 * share 4 bytes on the vertex buffer
+	 *
+	 * Heavily inspired by LibGDX's ParticleRenderer:
+	 * https://github.com/libgdx/libgdx/blob/master/gdx/src/com/badlogic/gdx/graphics/g2d/ParticleRenderer.java
+	 */
+
+	/**
+	 * Renderer for Particles that is designer for speed over feature set.
+	 *
+	 * @class
+	 * @memberof PIXI
+	 */
+	var ParticleRenderer = /*@__PURE__*/(function (ObjectRenderer) {
+	    function ParticleRenderer(renderer)
+	    {
+	        ObjectRenderer.call(this, renderer);
+
+	        // 65535 is max vertex index in the index buffer (see ParticleRenderer)
+	        // so max number of particles is 65536 / 4 = 16384
+	        // and max number of element in the index buffer is 16384 * 6 = 98304
+	        // Creating a full index buffer, overhead is 98304 * 2 = 196Ko
+	        // let numIndices = 98304;
+
+	        /**
+	         * The default shader that is used if a sprite doesn't have a more specific one.
+	         *
+	         * @member {PIXI.Shader}
+	         */
+	        this.shader = null;
+
+	        this.properties = null;
+
+	        this.tempMatrix = new Matrix();
+
+	        this.properties = [
+	            // verticesData
+	            {
+	                attributeName: 'aVertexPosition',
+	                size: 2,
+	                uploadFunction: this.uploadVertices,
+	                offset: 0,
+	            },
+	            // positionData
+	            {
+	                attributeName: 'aPositionCoord',
+	                size: 2,
+	                uploadFunction: this.uploadPosition,
+	                offset: 0,
+	            },
+	            // rotationData
+	            {
+	                attributeName: 'aRotation',
+	                size: 1,
+	                uploadFunction: this.uploadRotation,
+	                offset: 0,
+	            },
+	            // uvsData
+	            {
+	                attributeName: 'aTextureCoord',
+	                size: 2,
+	                uploadFunction: this.uploadUvs,
+	                offset: 0,
+	            },
+	            // tintData
+	            {
+	                attributeName: 'aColor',
+	                size: 1,
+	                type: TYPES.UNSIGNED_BYTE,
+	                uploadFunction: this.uploadTint,
+	                offset: 0,
+	            } ];
+
+	        this.shader = Shader.from(vertex$1, fragment$1, {});
+	    }
+
+	    if ( ObjectRenderer ) { ParticleRenderer.__proto__ = ObjectRenderer; }
+	    ParticleRenderer.prototype = Object.create( ObjectRenderer && ObjectRenderer.prototype );
+	    ParticleRenderer.prototype.constructor = ParticleRenderer;
+
+	    /**
+	     * Renders the particle container object.
+	     *
+	     * @param {PIXI.ParticleContainer} container - The container to render using this ParticleRenderer
+	     */
+	    ParticleRenderer.prototype.render = function render (container)
+	    {
+	        var children = container.children;
+	        var maxSize = container._maxSize;
+	        var batchSize = container._batchSize;
+	        var renderer = this.renderer;
+	        var totalChildren = children.length;
+
+	        if (totalChildren === 0)
+	        {
+	            return;
+	        }
+	        else if (totalChildren > maxSize && !container.autoResize)
+	        {
+	            totalChildren = maxSize;
+	        }
+
+	        var buffers = container._buffers;
+
+	        if (!buffers)
+	        {
+	            buffers = container._buffers = this.generateBuffers(container);
+	        }
+
+	        var baseTexture = children[0]._texture.baseTexture;
+
+	        // if the uvs have not updated then no point rendering just yet!
+	        this.renderer.state.setBlendMode(correctBlendMode(container.blendMode, baseTexture.premultiplyAlpha));
+
+	        var gl = renderer.gl;
+
+	        var m = container.worldTransform.copyTo(this.tempMatrix);
+
+	        m.prepend(renderer.globalUniforms.uniforms.projectionMatrix);
+
+	        this.shader.uniforms.translationMatrix = m.toArray(true);
+
+	        this.shader.uniforms.uColor = premultiplyRgba(container.tintRgb,
+	            container.worldAlpha, this.shader.uniforms.uColor, baseTexture.premultiplyAlpha);
+
+	        this.shader.uniforms.uSampler = baseTexture;
+
+	        this.renderer.shader.bind(this.shader);
+
+	        var updateStatic = false;
+
+	        // now lets upload and render the buffers..
+	        for (var i = 0, j = 0; i < totalChildren; i += batchSize, j += 1)
+	        {
+	            var amount = (totalChildren - i);
+
+	            if (amount > batchSize)
+	            {
+	                amount = batchSize;
+	            }
+
+	            if (j >= buffers.length)
+	            {
+	                buffers.push(this._generateOneMoreBuffer(container));
+	            }
+
+	            var buffer = buffers[j];
+
+	            // we always upload the dynamic
+	            buffer.uploadDynamic(children, i, amount);
+
+	            var bid = container._bufferUpdateIDs[j] || 0;
+
+	            updateStatic = updateStatic || (buffer._updateID < bid);
+	            // we only upload the static content when we have to!
+	            if (updateStatic)
+	            {
+	                buffer._updateID = container._updateID;
+	                buffer.uploadStatic(children, i, amount);
+	            }
+
+	            // bind the buffer
+	            renderer.geometry.bind(buffer.geometry);
+	            gl.drawElements(gl.TRIANGLES, amount * 6, gl.UNSIGNED_SHORT, 0);
+	        }
+	    };
+
+	    /**
+	     * Creates one particle buffer for each child in the container we want to render and updates internal properties
+	     *
+	     * @param {PIXI.ParticleContainer} container - The container to render using this ParticleRenderer
+	     * @return {PIXI.ParticleBuffer[]} The buffers
+	     * @private
+	     */
+	    ParticleRenderer.prototype.generateBuffers = function generateBuffers (container)
+	    {
+	        var buffers = [];
+	        var size = container._maxSize;
+	        var batchSize = container._batchSize;
+	        var dynamicPropertyFlags = container._properties;
+
+	        for (var i = 0; i < size; i += batchSize)
+	        {
+	            buffers.push(new ParticleBuffer(this.properties, dynamicPropertyFlags, batchSize));
+	        }
+
+	        return buffers;
+	    };
+
+	    /**
+	     * Creates one more particle buffer, because container has autoResize feature
+	     *
+	     * @param {PIXI.ParticleContainer} container - The container to render using this ParticleRenderer
+	     * @return {PIXI.ParticleBuffer} generated buffer
+	     * @private
+	     */
+	    ParticleRenderer.prototype._generateOneMoreBuffer = function _generateOneMoreBuffer (container)
+	    {
+	        var batchSize = container._batchSize;
+	        var dynamicPropertyFlags = container._properties;
+
+	        return new ParticleBuffer(this.properties, dynamicPropertyFlags, batchSize);
+	    };
+
+	    /**
+	     * Uploads the vertices.
+	     *
+	     * @param {PIXI.DisplayObject[]} children - the array of display objects to render
+	     * @param {number} startIndex - the index to start from in the children array
+	     * @param {number} amount - the amount of children that will have their vertices uploaded
+	     * @param {number[]} array - The vertices to upload.
+	     * @param {number} stride - Stride to use for iteration.
+	     * @param {number} offset - Offset to start at.
+	     */
+	    ParticleRenderer.prototype.uploadVertices = function uploadVertices (children, startIndex, amount, array, stride, offset)
+	    {
+	        var w0 = 0;
+	        var w1 = 0;
+	        var h0 = 0;
+	        var h1 = 0;
+
+	        for (var i = 0; i < amount; ++i)
+	        {
+	            var sprite = children[startIndex + i];
+	            var texture = sprite._texture;
+	            var sx = sprite.scale.x;
+	            var sy = sprite.scale.y;
+	            var trim = texture.trim;
+	            var orig = texture.orig;
+
+	            if (trim)
+	            {
+	                // if the sprite is trimmed and is not a tilingsprite then we need to add the
+	                // extra space before transforming the sprite coords..
+	                w1 = trim.x - (sprite.anchor.x * orig.width);
+	                w0 = w1 + trim.width;
+
+	                h1 = trim.y - (sprite.anchor.y * orig.height);
+	                h0 = h1 + trim.height;
+	            }
+	            else
+	            {
+	                w0 = (orig.width) * (1 - sprite.anchor.x);
+	                w1 = (orig.width) * -sprite.anchor.x;
+
+	                h0 = orig.height * (1 - sprite.anchor.y);
+	                h1 = orig.height * -sprite.anchor.y;
+	            }
+
+	            array[offset] = w1 * sx;
+	            array[offset + 1] = h1 * sy;
+
+	            array[offset + stride] = w0 * sx;
+	            array[offset + stride + 1] = h1 * sy;
+
+	            array[offset + (stride * 2)] = w0 * sx;
+	            array[offset + (stride * 2) + 1] = h0 * sy;
+
+	            array[offset + (stride * 3)] = w1 * sx;
+	            array[offset + (stride * 3) + 1] = h0 * sy;
+
+	            offset += stride * 4;
+	        }
+	    };
+
+	    /**
+	     * Uploads the position.
+	     *
+	     * @param {PIXI.DisplayObject[]} children - the array of display objects to render
+	     * @param {number} startIndex - the index to start from in the children array
+	     * @param {number} amount - the amount of children that will have their positions uploaded
+	     * @param {number[]} array - The vertices to upload.
+	     * @param {number} stride - Stride to use for iteration.
+	     * @param {number} offset - Offset to start at.
+	     */
+	    ParticleRenderer.prototype.uploadPosition = function uploadPosition (children, startIndex, amount, array, stride, offset)
+	    {
+	        for (var i = 0; i < amount; i++)
+	        {
+	            var spritePosition = children[startIndex + i].position;
+
+	            array[offset] = spritePosition.x;
+	            array[offset + 1] = spritePosition.y;
+
+	            array[offset + stride] = spritePosition.x;
+	            array[offset + stride + 1] = spritePosition.y;
+
+	            array[offset + (stride * 2)] = spritePosition.x;
+	            array[offset + (stride * 2) + 1] = spritePosition.y;
+
+	            array[offset + (stride * 3)] = spritePosition.x;
+	            array[offset + (stride * 3) + 1] = spritePosition.y;
+
+	            offset += stride * 4;
+	        }
+	    };
+
+	    /**
+	     * Uploads the rotiation.
+	     *
+	     * @param {PIXI.DisplayObject[]} children - the array of display objects to render
+	     * @param {number} startIndex - the index to start from in the children array
+	     * @param {number} amount - the amount of children that will have their rotation uploaded
+	     * @param {number[]} array - The vertices to upload.
+	     * @param {number} stride - Stride to use for iteration.
+	     * @param {number} offset - Offset to start at.
+	     */
+	    ParticleRenderer.prototype.uploadRotation = function uploadRotation (children, startIndex, amount, array, stride, offset)
+	    {
+	        for (var i = 0; i < amount; i++)
+	        {
+	            var spriteRotation = children[startIndex + i].rotation;
+
+	            array[offset] = spriteRotation;
+	            array[offset + stride] = spriteRotation;
+	            array[offset + (stride * 2)] = spriteRotation;
+	            array[offset + (stride * 3)] = spriteRotation;
+
+	            offset += stride * 4;
+	        }
+	    };
+
+	    /**
+	     * Uploads the Uvs
+	     *
+	     * @param {PIXI.DisplayObject[]} children - the array of display objects to render
+	     * @param {number} startIndex - the index to start from in the children array
+	     * @param {number} amount - the amount of children that will have their rotation uploaded
+	     * @param {number[]} array - The vertices to upload.
+	     * @param {number} stride - Stride to use for iteration.
+	     * @param {number} offset - Offset to start at.
+	     */
+	    ParticleRenderer.prototype.uploadUvs = function uploadUvs (children, startIndex, amount, array, stride, offset)
+	    {
+	        for (var i = 0; i < amount; ++i)
+	        {
+	            var textureUvs = children[startIndex + i]._texture._uvs;
+
+	            if (textureUvs)
+	            {
+	                array[offset] = textureUvs.x0;
+	                array[offset + 1] = textureUvs.y0;
+
+	                array[offset + stride] = textureUvs.x1;
+	                array[offset + stride + 1] = textureUvs.y1;
+
+	                array[offset + (stride * 2)] = textureUvs.x2;
+	                array[offset + (stride * 2) + 1] = textureUvs.y2;
+
+	                array[offset + (stride * 3)] = textureUvs.x3;
+	                array[offset + (stride * 3) + 1] = textureUvs.y3;
+
+	                offset += stride * 4;
+	            }
+	            else
+	            {
+	                // TODO you know this can be easier!
+	                array[offset] = 0;
+	                array[offset + 1] = 0;
+
+	                array[offset + stride] = 0;
+	                array[offset + stride + 1] = 0;
+
+	                array[offset + (stride * 2)] = 0;
+	                array[offset + (stride * 2) + 1] = 0;
+
+	                array[offset + (stride * 3)] = 0;
+	                array[offset + (stride * 3) + 1] = 0;
+
+	                offset += stride * 4;
+	            }
+	        }
+	    };
+
+	    /**
+	     * Uploads the tint.
+	     *
+	     * @param {PIXI.DisplayObject[]} children - the array of display objects to render
+	     * @param {number} startIndex - the index to start from in the children array
+	     * @param {number} amount - the amount of children that will have their rotation uploaded
+	     * @param {number[]} array - The vertices to upload.
+	     * @param {number} stride - Stride to use for iteration.
+	     * @param {number} offset - Offset to start at.
+	     */
+	    ParticleRenderer.prototype.uploadTint = function uploadTint (children, startIndex, amount, array, stride, offset)
+	    {
+	        for (var i = 0; i < amount; ++i)
+	        {
+	            var sprite = children[startIndex + i];
+	            var premultiplied = sprite._texture.baseTexture.premultiplyAlpha;
+	            var alpha = sprite.alpha;
+	            // we dont call extra function if alpha is 1.0, that's faster
+	            var argb = alpha < 1.0 && premultiplied ? premultiplyTint(sprite._tintRGB, alpha)
+	                : sprite._tintRGB + (alpha * 255 << 24);
+
+	            array[offset] = argb;
+	            array[offset + stride] = argb;
+	            array[offset + (stride * 2)] = argb;
+	            array[offset + (stride * 3)] = argb;
+
+	            offset += stride * 4;
+	        }
+	    };
+
+	    /**
+	     * Destroys the ParticleRenderer.
+	     */
+	    ParticleRenderer.prototype.destroy = function destroy ()
+	    {
+	        ObjectRenderer.prototype.destroy.call(this);
+
+	        if (this.shader)
+	        {
+	            this.shader.destroy();
+	            this.shader = null;
+	        }
+
+	        this.tempMatrix = null;
+	    };
+
+	    return ParticleRenderer;
+	}(ObjectRenderer));
+
+	/*!
+	 * @pixi/spritesheet - v5.1.4
+	 * Compiled Fri, 20 Sep 2019 17:22:13 UTC
+	 *
+	 * @pixi/spritesheet is licensed under the MIT License.
+	 * http://www.opensource.org/licenses/mit-license
+	 */
+
+	/**
+	 * Utility class for maintaining reference to a collection
+	 * of Textures on a single Spritesheet.
+	 *
+	 * To access a sprite sheet from your code pass its JSON data file to Pixi's loader:
+	 *
+	 * ```js
+	 * PIXI.Loader.shared.add("images/spritesheet.json").load(setup);
+	 *
+	 * function setup() {
+	 *   let sheet = PIXI.Loader.shared.resources["images/spritesheet.json"].spritesheet;
+	 *   ...
+	 * }
+	 * ```
+	 * With the `sheet.textures` you can create Sprite objects,`sheet.animations` can be used to create an AnimatedSprite.
+	 *
+	 * Sprite sheets can be packed using tools like {@link https://codeandweb.com/texturepacker|TexturePacker},
+	 * {@link https://renderhjs.net/shoebox/|Shoebox} or {@link https://github.com/krzysztof-o/spritesheet.js|Spritesheet.js}.
+	 * Default anchor points (see {@link PIXI.Texture#defaultAnchor}) and grouping of animation sprites are currently only
+	 * supported by TexturePacker.
+	 *
+	 * @class
+	 * @memberof PIXI
+	 */
+	var Spritesheet = function Spritesheet(baseTexture, data, resolutionFilename)
+	{
+	    if ( resolutionFilename === void 0 ) { resolutionFilename = null; }
+
+	    /**
+	     * Reference to ths source texture
+	     * @type {PIXI.BaseTexture}
+	     */
+	    this.baseTexture = baseTexture;
+
+	    /**
+	     * A map containing all textures of the sprite sheet.
+	     * Can be used to create a {@link PIXI.Sprite|Sprite}:
+	     * ```js
+	     * new PIXI.Sprite(sheet.textures["image.png"]);
+	     * ```
+	     * @member {Object}
+	     */
+	    this.textures = {};
+
+	    /**
+	     * A map containing the textures for each animation.
+	     * Can be used to create an {@link PIXI.AnimatedSprite|AnimatedSprite}:
+	     * ```js
+	     * new PIXI.AnimatedSprite(sheet.animations["anim_name"])
+	     * ```
+	     * @member {Object}
+	     */
+	    this.animations = {};
+
+	    /**
+	     * Reference to the original JSON data.
+	     * @type {Object}
+	     */
+	    this.data = data;
+
+	    /**
+	     * The resolution of the spritesheet.
+	     * @type {number}
+	     */
+	    this.resolution = this._updateResolution(
+	        resolutionFilename
+	        || (this.baseTexture.resource ? this.baseTexture.resource.url : null)
+	    );
+
+	    /**
+	     * Map of spritesheet frames.
+	     * @type {Object}
+	     * @private
+	     */
+	    this._frames = this.data.frames;
+
+	    /**
+	     * Collection of frame names.
+	     * @type {string[]}
+	     * @private
+	     */
+	    this._frameKeys = Object.keys(this._frames);
+
+	    /**
+	     * Current batch index being processed.
+	     * @type {number}
+	     * @private
+	     */
+	    this._batchIndex = 0;
+
+	    /**
+	     * Callback when parse is completed.
+	     * @type {Function}
+	     * @private
+	     */
+	    this._callback = null;
+	};
+
+	var staticAccessors$4 = { BATCH_SIZE: { configurable: true } };
+
+	/**
+	 * Generate the resolution from the filename or fallback
+	 * to the meta.scale field of the JSON data.
+	 *
+	 * @private
+	 * @param {string} resolutionFilename - The filename to use for resolving
+	 *    the default resolution.
+	 * @return {number} Resolution to use for spritesheet.
+	 */
+	staticAccessors$4.BATCH_SIZE.get = function ()
+	{
+	    return 1000;
+	};
+
+	Spritesheet.prototype._updateResolution = function _updateResolution (resolutionFilename)
+	{
+	    var scale = this.data.meta.scale;
+
+	    // Use a defaultValue of `null` to check if a url-based resolution is set
+	    var resolution = getResolutionOfUrl(resolutionFilename, null);
+
+	    // No resolution found via URL
+	    if (resolution === null)
+	    {
+	        // Use the scale value or default to 1
+	        resolution = scale !== undefined ? parseFloat(scale) : 1;
+	    }
+
+	    // For non-1 resolutions, update baseTexture
+	    if (resolution !== 1)
+	    {
+	        this.baseTexture.setResolution(resolution);
+	    }
+
+	    return resolution;
+	};
+
+	/**
+	 * Parser spritesheet from loaded data. This is done asynchronously
+	 * to prevent creating too many Texture within a single process.
+	 *
+	 * @param {Function} callback - Callback when complete returns
+	 *    a map of the Textures for this spritesheet.
+	 */
+	Spritesheet.prototype.parse = function parse (callback)
+	{
+	    this._batchIndex = 0;
+	    this._callback = callback;
+
+	    if (this._frameKeys.length <= Spritesheet.BATCH_SIZE)
+	    {
+	        this._processFrames(0);
+	        this._processAnimations();
+	        this._parseComplete();
+	    }
+	    else
+	    {
+	        this._nextBatch();
+	    }
+	};
+
+	/**
+	 * Process a batch of frames
+	 *
+	 * @private
+	 * @param {number} initialFrameIndex - The index of frame to start.
+	 */
+	Spritesheet.prototype._processFrames = function _processFrames (initialFrameIndex)
+	{
+	    var frameIndex = initialFrameIndex;
+	    var maxFrames = Spritesheet.BATCH_SIZE;
+
+	    while (frameIndex - initialFrameIndex < maxFrames && frameIndex < this._frameKeys.length)
+	    {
+	        var i = this._frameKeys[frameIndex];
+	        var data = this._frames[i];
+	        var rect = data.frame;
+
+	        if (rect)
+	        {
+	            var frame = null;
+	            var trim = null;
+	            var sourceSize = data.trimmed !== false && data.sourceSize
+	                ? data.sourceSize : data.frame;
+
+	            var orig = new Rectangle(
+	                0,
+	                0,
+	                Math.floor(sourceSize.w) / this.resolution,
+	                Math.floor(sourceSize.h) / this.resolution
+	            );
+
+	            if (data.rotated)
+	            {
+	                frame = new Rectangle(
+	                    Math.floor(rect.x) / this.resolution,
+	                    Math.floor(rect.y) / this.resolution,
+	                    Math.floor(rect.h) / this.resolution,
+	                    Math.floor(rect.w) / this.resolution
+	                );
+	            }
+	            else
+	            {
+	                frame = new Rectangle(
+	                    Math.floor(rect.x) / this.resolution,
+	                    Math.floor(rect.y) / this.resolution,
+	                    Math.floor(rect.w) / this.resolution,
+	                    Math.floor(rect.h) / this.resolution
+	                );
+	            }
+
+	            //  Check to see if the sprite is trimmed
+	            if (data.trimmed !== false && data.spriteSourceSize)
+	            {
+	                trim = new Rectangle(
+	                    Math.floor(data.spriteSourceSize.x) / this.resolution,
+	                    Math.floor(data.spriteSourceSize.y) / this.resolution,
+	                    Math.floor(rect.w) / this.resolution,
+	                    Math.floor(rect.h) / this.resolution
+	                );
+	            }
+
+	            this.textures[i] = new Texture(
+	                this.baseTexture,
+	                frame,
+	                orig,
+	                trim,
+	                data.rotated ? 2 : 0,
+	                data.anchor
+	            );
+
+	            // lets also add the frame to pixi's global cache for 'from' and 'fromLoader' functions
+	            Texture.addToCache(this.textures[i], i);
+	        }
+
+	        frameIndex++;
+	    }
+	};
+
+	/**
+	 * Parse animations config
+	 *
+	 * @private
+	 */
+	Spritesheet.prototype._processAnimations = function _processAnimations ()
+	{
+	    var animations = this.data.animations || {};
+
+	    for (var animName in animations)
+	    {
+	        this.animations[animName] = [];
+	        for (var i = 0; i < animations[animName].length; i++)
+	        {
+	            var frameName = animations[animName][i];
+
+	            this.animations[animName].push(this.textures[frameName]);
+	        }
+	    }
+	};
+
+	/**
+	 * The parse has completed.
+	 *
+	 * @private
+	 */
+	Spritesheet.prototype._parseComplete = function _parseComplete ()
+	{
+	    var callback = this._callback;
+
+	    this._callback = null;
+	    this._batchIndex = 0;
+	    callback.call(this, this.textures);
+	};
+
+	/**
+	 * Begin the next batch of textures.
+	 *
+	 * @private
+	 */
+	Spritesheet.prototype._nextBatch = function _nextBatch ()
+	{
+	        var this$1 = this;
+
+	    this._processFrames(this._batchIndex * Spritesheet.BATCH_SIZE);
+	    this._batchIndex++;
+	    setTimeout(function () {
+	        if (this$1._batchIndex * Spritesheet.BATCH_SIZE < this$1._frameKeys.length)
+	        {
+	            this$1._nextBatch();
+	        }
+	        else
+	        {
+	            this$1._processAnimations();
+	            this$1._parseComplete();
+	        }
+	    }, 0);
+	};
+
+	/**
+	 * Destroy Spritesheet and don't use after this.
+	 *
+	 * @param {boolean} [destroyBase=false] Whether to destroy the base texture as well
+	 */
+	Spritesheet.prototype.destroy = function destroy (destroyBase)
+	{
+	        if ( destroyBase === void 0 ) { destroyBase = false; }
+
+	    for (var i in this.textures)
+	    {
+	        this.textures[i].destroy();
+	    }
+	    this._frames = null;
+	    this._frameKeys = null;
+	    this.data = null;
+	    this.textures = null;
+	    if (destroyBase)
+	    {
+	        this.baseTexture.destroy();
+	    }
+	    this.baseTexture = null;
+	};
+
+	Object.defineProperties( Spritesheet, staticAccessors$4 );
+
+	/**
+	 * {@link PIXI.Loader Loader} middleware for loading texture atlases that have been created with
+	 * TexturePacker or similar JSON-based spritesheet.
+	 *
+	 * This middleware automatically generates Texture resources.
+	 *
+	 * @class
+	 * @memberof PIXI
+	 * @implements PIXI.ILoaderPlugin
+	 */
+	var SpritesheetLoader = function SpritesheetLoader () {};
+
+	SpritesheetLoader.use = function use (resource, next)
+	{
+	    var imageResourceName = (resource.name) + "_image";
+
+	    // skip if no data, its not json, it isn't spritesheet data, or the image resource already exists
+	    if (!resource.data
+	        || resource.type !== LoaderResource.TYPE.JSON
+	        || !resource.data.frames
+	        || this.resources[imageResourceName]
+	    )
+	    {
+	        next();
+
+	        return;
+	    }
+
+	    var loadOptions = {
+	        crossOrigin: resource.crossOrigin,
+	        metadata: resource.metadata.imageMetadata,
+	        parentResource: resource,
+	    };
+
+	    var resourcePath = SpritesheetLoader.getResourcePath(resource, this.baseUrl);
+
+	    // load the image for this sheet
+	    this.add(imageResourceName, resourcePath, loadOptions, function onImageLoad(res)
+	    {
+	        if (res.error)
+	        {
+	            next(res.error);
+
+	            return;
+	        }
+
+	        var spritesheet = new Spritesheet(
+	            res.texture.baseTexture,
+	            resource.data,
+	            resource.url
+	        );
+
+	        spritesheet.parse(function () {
+	            resource.spritesheet = spritesheet;
+	            resource.textures = spritesheet.textures;
+	            next();
+	        });
+	    });
+	};
+
+	/**
+	 * Get the spritesheets root path
+	 * @param {PIXI.LoaderResource} resource - Resource to check path
+	 * @param {string} baseUrl - Base root url
+	 */
+	SpritesheetLoader.getResourcePath = function getResourcePath (resource, baseUrl)
+	{
+	    // Prepend url path unless the resource image is a data url
+	    if (resource.isDataUrl)
+	    {
+	        return resource.data.meta.image;
+	    }
+
+	    return url.resolve(resource.url.replace(baseUrl, ''), resource.data.meta.image);
+	};
+
+	/*!
+	 * @pixi/sprite-tiling - v5.1.4
+	 * Compiled Fri, 20 Sep 2019 17:22:13 UTC
+	 *
+	 * @pixi/sprite-tiling is licensed under the MIT License.
+	 * http://www.opensource.org/licenses/mit-license
+	 */
+
+	var tempPoint$1 = new Point();
+
+	/**
+	 * A tiling sprite is a fast way of rendering a tiling image
+	 *
+	 * @class
+	 * @extends PIXI.Sprite
+	 * @memberof PIXI
+	 */
+	var TilingSprite = /*@__PURE__*/(function (Sprite) {
+	    function TilingSprite(texture, width, height)
+	    {
+	        if ( width === void 0 ) { width = 100; }
+	        if ( height === void 0 ) { height = 100; }
+
+	        Sprite.call(this, texture);
+
+	        /**
+	         * Tile transform
+	         *
+	         * @member {PIXI.Transform}
+	         */
+	        this.tileTransform = new Transform();
+
+	        // /// private
+
+	        /**
+	         * The with of the tiling sprite
+	         *
+	         * @member {number}
+	         * @private
+	         */
+	        this._width = width;
+
+	        /**
+	         * The height of the tiling sprite
+	         *
+	         * @member {number}
+	         * @private
+	         */
+	        this._height = height;
+
+	        /**
+	         * Canvas pattern
+	         *
+	         * @type {CanvasPattern}
+	         * @private
+	         */
+	        this._canvasPattern = null;
+
+	        /**
+	         * matrix that is applied to UV to get the coords in Texture normalized space to coords in BaseTexture space
+	         *
+	         * @member {PIXI.TextureMatrix}
+	         */
+	        this.uvMatrix = texture.uvMatrix || new TextureMatrix(texture);
+
+	        /**
+	         * Plugin that is responsible for rendering this element.
+	         * Allows to customize the rendering process without overriding '_render' method.
+	         *
+	         * @member {string}
+	         * @default 'tilingSprite'
+	         */
+	        this.pluginName = 'tilingSprite';
+
+	        /**
+	         * Whether or not anchor affects uvs
+	         *
+	         * @member {boolean}
+	         * @default false
+	         */
+	        this.uvRespectAnchor = false;
+	    }
+
+	    if ( Sprite ) { TilingSprite.__proto__ = Sprite; }
+	    TilingSprite.prototype = Object.create( Sprite && Sprite.prototype );
+	    TilingSprite.prototype.constructor = TilingSprite;
+
+	    var prototypeAccessors = { clampMargin: { configurable: true },tileScale: { configurable: true },tilePosition: { configurable: true },width: { configurable: true },height: { configurable: true } };
+	    /**
+	     * Changes frame clamping in corresponding textureTransform, shortcut
+	     * Change to -0.5 to add a pixel to the edge, recommended for transparent trimmed textures in atlas
+	     *
+	     * @default 0.5
+	     * @member {number}
+	     */
+	    prototypeAccessors.clampMargin.get = function ()
+	    {
+	        return this.uvMatrix.clampMargin;
+	    };
+
+	    prototypeAccessors.clampMargin.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        this.uvMatrix.clampMargin = value;
+	        this.uvMatrix.update(true);
+	    };
+
+	    /**
+	     * The scaling of the image that is being tiled
+	     *
+	     * @member {PIXI.ObservablePoint}
+	     */
+	    prototypeAccessors.tileScale.get = function ()
+	    {
+	        return this.tileTransform.scale;
+	    };
+
+	    prototypeAccessors.tileScale.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        this.tileTransform.scale.copyFrom(value);
+	    };
+
+	    /**
+	     * The offset of the image that is being tiled
+	     *
+	     * @member {PIXI.ObservablePoint}
+	     */
+	    prototypeAccessors.tilePosition.get = function ()
+	    {
+	        return this.tileTransform.position;
+	    };
+
+	    prototypeAccessors.tilePosition.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        this.tileTransform.position.copyFrom(value);
+	    };
+
+	    /**
+	     * @private
+	     */
+	    TilingSprite.prototype._onTextureUpdate = function _onTextureUpdate ()
+	    {
+	        if (this.uvMatrix)
+	        {
+	            this.uvMatrix.texture = this._texture;
+	        }
+	        this._cachedTint = 0xFFFFFF;
+	    };
+
+	    /**
+	     * Renders the object using the WebGL renderer
+	     *
+	     * @protected
+	     * @param {PIXI.Renderer} renderer - The renderer
+	     */
+	    TilingSprite.prototype._render = function _render (renderer)
+	    {
+	        // tweak our texture temporarily..
+	        var texture = this._texture;
+
+	        if (!texture || !texture.valid)
+	        {
+	            return;
+	        }
+
+	        this.tileTransform.updateLocalTransform();
+	        this.uvMatrix.update();
+
+	        renderer.batch.setObjectRenderer(renderer.plugins[this.pluginName]);
+	        renderer.plugins[this.pluginName].render(this);
+	    };
+
+	    /**
+	     * Updates the bounds of the tiling sprite.
+	     *
+	     * @protected
+	     */
+	    TilingSprite.prototype._calculateBounds = function _calculateBounds ()
+	    {
+	        var minX = this._width * -this._anchor._x;
+	        var minY = this._height * -this._anchor._y;
+	        var maxX = this._width * (1 - this._anchor._x);
+	        var maxY = this._height * (1 - this._anchor._y);
+
+	        this._bounds.addFrame(this.transform, minX, minY, maxX, maxY);
+	    };
+
+	    /**
+	     * Gets the local bounds of the sprite object.
+	     *
+	     * @param {PIXI.Rectangle} rect - The output rectangle.
+	     * @return {PIXI.Rectangle} The bounds.
+	     */
+	    TilingSprite.prototype.getLocalBounds = function getLocalBounds (rect)
+	    {
+	        // we can do a fast local bounds if the sprite has no children!
+	        if (this.children.length === 0)
+	        {
+	            this._bounds.minX = this._width * -this._anchor._x;
+	            this._bounds.minY = this._height * -this._anchor._y;
+	            this._bounds.maxX = this._width * (1 - this._anchor._x);
+	            this._bounds.maxY = this._height * (1 - this._anchor._y);
+
+	            if (!rect)
+	            {
+	                if (!this._localBoundsRect)
+	                {
+	                    this._localBoundsRect = new Rectangle();
+	                }
+
+	                rect = this._localBoundsRect;
+	            }
+
+	            return this._bounds.getRectangle(rect);
+	        }
+
+	        return Sprite.prototype.getLocalBounds.call(this, rect);
+	    };
+
+	    /**
+	     * Checks if a point is inside this tiling sprite.
+	     *
+	     * @param {PIXI.Point} point - the point to check
+	     * @return {boolean} Whether or not the sprite contains the point.
+	     */
+	    TilingSprite.prototype.containsPoint = function containsPoint (point)
+	    {
+	        this.worldTransform.applyInverse(point, tempPoint$1);
+
+	        var width = this._width;
+	        var height = this._height;
+	        var x1 = -width * this.anchor._x;
+
+	        if (tempPoint$1.x >= x1 && tempPoint$1.x < x1 + width)
+	        {
+	            var y1 = -height * this.anchor._y;
+
+	            if (tempPoint$1.y >= y1 && tempPoint$1.y < y1 + height)
+	            {
+	                return true;
+	            }
+	        }
+
+	        return false;
+	    };
+
+	    /**
+	     * Destroys this sprite and optionally its texture and children
+	     *
+	     * @param {object|boolean} [options] - Options parameter. A boolean will act as if all options
+	     *  have been set to that value
+	     * @param {boolean} [options.children=false] - if set to true, all the children will have their destroy
+	     *      method called as well. 'options' will be passed on to those calls.
+	     * @param {boolean} [options.texture=false] - Should it destroy the current texture of the sprite as well
+	     * @param {boolean} [options.baseTexture=false] - Should it destroy the base texture of the sprite as well
+	     */
+	    TilingSprite.prototype.destroy = function destroy (options)
+	    {
+	        Sprite.prototype.destroy.call(this, options);
+
+	        this.tileTransform = null;
+	        this.uvMatrix = null;
+	    };
+
+	    /**
+	     * Helper function that creates a new tiling sprite based on the source you provide.
+	     * The source can be - frame id, image url, video url, canvas element, video element, base texture
+	     *
+	     * @static
+	     * @param {number|string|PIXI.Texture|HTMLCanvasElement|HTMLVideoElement} source - Source to create texture from
+	     * @param {number} width - the width of the tiling sprite
+	     * @param {number} height - the height of the tiling sprite
+	     * @return {PIXI.TilingSprite} The newly created texture
+	     */
+	    TilingSprite.from = function from (source, width, height)
+	    {
+	        return new TilingSprite(Texture.from(source), width, height);
+	    };
+
+	    /**
+	     * Helper function that creates a tiling sprite that will use a texture from the TextureCache based on the frameId
+	     * The frame ids are created when a Texture packer file has been loaded
+	     *
+	     * @static
+	     * @param {string} frameId - The frame Id of the texture in the cache
+	     * @param {number} width - the width of the tiling sprite
+	     * @param {number} height - the height of the tiling sprite
+	     * @return {PIXI.TilingSprite} A new TilingSprite using a texture from the texture cache matching the frameId
+	     */
+	    TilingSprite.fromFrame = function fromFrame (frameId, width, height)
+	    {
+	        var texture = TextureCache[frameId];
+
+	        if (!texture)
+	        {
+	            throw new Error(("The frameId \"" + frameId + "\" does not exist in the texture cache " + (this)));
+	        }
+
+	        return new TilingSprite(texture, width, height);
+	    };
+
+	    /**
+	     * Helper function that creates a sprite that will contain a texture based on an image url
+	     * If the image is not in the texture cache it will be loaded
+	     *
+	     * @static
+	     * @param {string} imageId - The image url of the texture
+	     * @param {number} width - the width of the tiling sprite
+	     * @param {number} height - the height of the tiling sprite
+	     * @param {Object} [options] - See {@link PIXI.BaseTexture}'s constructor for options.
+	     * @return {PIXI.TilingSprite} A new TilingSprite using a texture from the texture cache matching the image id
+	     */
+	    TilingSprite.fromImage = function fromImage (imageId, width, height, options)
+	    {
+	        // Fallback support for crossorigin, scaleMode parameters
+	        if (options && typeof options !== 'object')
+	        {
+	            options = {
+	                scaleMode: arguments[4],
+	                resourceOptions: {
+	                    crossorigin: arguments[3],
+	                },
+	            };
+	        }
+
+	        return new TilingSprite(Texture.from(imageId, options), width, height);
+	    };
+
+	    /**
+	     * The width of the sprite, setting this will actually modify the scale to achieve the value set
+	     *
+	     * @member {number}
+	     */
+	    prototypeAccessors.width.get = function ()
+	    {
+	        return this._width;
+	    };
+
+	    prototypeAccessors.width.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        this._width = value;
+	    };
+
+	    /**
+	     * The height of the TilingSprite, setting this will actually modify the scale to achieve the value set
+	     *
+	     * @member {number}
+	     */
+	    prototypeAccessors.height.get = function ()
+	    {
+	        return this._height;
+	    };
+
+	    prototypeAccessors.height.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        this._height = value;
+	    };
+
+	    Object.defineProperties( TilingSprite.prototype, prototypeAccessors );
+
+	    return TilingSprite;
+	}(Sprite));
+
+	var vertex$2 = "attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTransform;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n    gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n    vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;\n}\n";
+
+	var fragment$2 = "varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 uColor;\nuniform mat3 uMapCoord;\nuniform vec4 uClampFrame;\nuniform vec2 uClampOffset;\n\nvoid main(void)\n{\n    vec2 coord = mod(vTextureCoord - uClampOffset, vec2(1.0, 1.0)) + uClampOffset;\n    coord = (uMapCoord * vec3(coord, 1.0)).xy;\n    coord = clamp(coord, uClampFrame.xy, uClampFrame.zw);\n\n    vec4 sample = texture2D(uSampler, coord);\n    gl_FragColor = sample * uColor;\n}\n";
+
+	var fragmentSimple = "varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 uColor;\n\nvoid main(void)\n{\n    vec4 sample = texture2D(uSampler, vTextureCoord);\n    gl_FragColor = sample * uColor;\n}\n";
+
+	var tempMat$1 = new Matrix();
+
+	/**
+	 * WebGL renderer plugin for tiling sprites
+	 *
+	 * @class
+	 * @memberof PIXI
+	 * @extends PIXI.ObjectRenderer
+	 */
+	var TilingSpriteRenderer = /*@__PURE__*/(function (ObjectRenderer) {
+	    function TilingSpriteRenderer(renderer)
+	    {
+	        ObjectRenderer.call(this, renderer);
+
+	        var uniforms = { globals: this.renderer.globalUniforms };
+
+	        this.shader = Shader.from(vertex$2, fragment$2, uniforms);
+
+	        this.simpleShader = Shader.from(vertex$2, fragmentSimple, uniforms);
+
+	        this.quad = new QuadUv();
+	    }
+
+	    if ( ObjectRenderer ) { TilingSpriteRenderer.__proto__ = ObjectRenderer; }
+	    TilingSpriteRenderer.prototype = Object.create( ObjectRenderer && ObjectRenderer.prototype );
+	    TilingSpriteRenderer.prototype.constructor = TilingSpriteRenderer;
+
+	    /**
+	     *
+	     * @param {PIXI.TilingSprite} ts tilingSprite to be rendered
+	     */
+	    TilingSpriteRenderer.prototype.render = function render (ts)
+	    {
+	        var renderer = this.renderer;
+	        var quad = this.quad;
+
+	        var vertices = quad.vertices;
+
+	        vertices[0] = vertices[6] = (ts._width) * -ts.anchor.x;
+	        vertices[1] = vertices[3] = ts._height * -ts.anchor.y;
+
+	        vertices[2] = vertices[4] = (ts._width) * (1.0 - ts.anchor.x);
+	        vertices[5] = vertices[7] = ts._height * (1.0 - ts.anchor.y);
+
+	        if (ts.uvRespectAnchor)
+	        {
+	            vertices = quad.uvs;
+
+	            vertices[0] = vertices[6] = -ts.anchor.x;
+	            vertices[1] = vertices[3] = -ts.anchor.y;
+
+	            vertices[2] = vertices[4] = 1.0 - ts.anchor.x;
+	            vertices[5] = vertices[7] = 1.0 - ts.anchor.y;
+	        }
+
+	        quad.invalidate();
+
+	        var tex = ts._texture;
+	        var baseTex = tex.baseTexture;
+	        var lt = ts.tileTransform.localTransform;
+	        var uv = ts.uvMatrix;
+	        var isSimple = baseTex.isPowerOfTwo
+	            && tex.frame.width === baseTex.width && tex.frame.height === baseTex.height;
+
+	        // auto, force repeat wrapMode for big tiling textures
+	        if (isSimple)
+	        {
+	            if (!baseTex._glTextures[renderer.CONTEXT_UID])
+	            {
+	                if (baseTex.wrapMode === WRAP_MODES.CLAMP)
+	                {
+	                    baseTex.wrapMode = WRAP_MODES.REPEAT;
+	                }
+	            }
+	            else
+	            {
+	                isSimple = baseTex.wrapMode !== WRAP_MODES.CLAMP;
+	            }
+	        }
+
+	        var shader = isSimple ? this.simpleShader : this.shader;
+
+	        var w = tex.width;
+	        var h = tex.height;
+	        var W = ts._width;
+	        var H = ts._height;
+
+	        tempMat$1.set(lt.a * w / W,
+	            lt.b * w / H,
+	            lt.c * h / W,
+	            lt.d * h / H,
+	            lt.tx / W,
+	            lt.ty / H);
+
+	        // that part is the same as above:
+	        // tempMat.identity();
+	        // tempMat.scale(tex.width, tex.height);
+	        // tempMat.prepend(lt);
+	        // tempMat.scale(1.0 / ts._width, 1.0 / ts._height);
+
+	        tempMat$1.invert();
+	        if (isSimple)
+	        {
+	            tempMat$1.prepend(uv.mapCoord);
+	        }
+	        else
+	        {
+	            shader.uniforms.uMapCoord = uv.mapCoord.toArray(true);
+	            shader.uniforms.uClampFrame = uv.uClampFrame;
+	            shader.uniforms.uClampOffset = uv.uClampOffset;
+	        }
+
+	        shader.uniforms.uTransform = tempMat$1.toArray(true);
+	        shader.uniforms.uColor = premultiplyTintToRgba(ts.tint, ts.worldAlpha,
+	            shader.uniforms.uColor, baseTex.premultiplyAlpha);
+	        shader.uniforms.translationMatrix = ts.transform.worldTransform.toArray(true);
+	        shader.uniforms.uSampler = tex;
+
+	        renderer.shader.bind(shader);
+	        renderer.geometry.bind(quad);// , renderer.shader.getGLShader());
+
+	        renderer.state.setBlendMode(correctBlendMode(ts.blendMode, baseTex.premultiplyAlpha));
+	        renderer.geometry.draw(this.renderer.gl.TRIANGLES, 6, 0);
+	    };
+
+	    return TilingSpriteRenderer;
+	}(ObjectRenderer));
+
+	/*!
+	 * @pixi/text-bitmap - v5.1.4
+	 * Compiled Fri, 20 Sep 2019 17:22:13 UTC
+	 *
+	 * @pixi/text-bitmap is licensed under the MIT License.
+	 * http://www.opensource.org/licenses/mit-license
+	 */
+
+	/**
+	 * A BitmapText object will create a line or multiple lines of text using bitmap font.
+	 *
+	 * The primary advantage of this class over Text is that all of your textures are pre-generated and loading,
+	 * meaning that rendering is fast, and changing text has no performance implications.
+	 *
+	 * The primary disadvantage is that you need to preload the bitmap font assets, and thus the styling is set in stone.
+	 * Supporting character sets other than latin, such as CJK languages, may be impractical due to the number of characters.
+	 *
+	 * To split a line you can use '\n', '\r' or '\r\n' in your string.
+	 *
+	 * You can generate the fnt files using
+	 * http://www.angelcode.com/products/bmfont/ for Windows or
+	 * http://www.bmglyph.com/ for Mac.
+	 *
+	 * A BitmapText can only be created when the font is loaded.
+	 *
+	 * ```js
+	 * // in this case the font is in a file called 'desyrel.fnt'
+	 * let bitmapText = new PIXI.BitmapText("text using a fancy font!", {font: "35px Desyrel", align: "right"});
+	 * ```
+	 *
+	 * @class
+	 * @extends PIXI.Container
+	 * @memberof PIXI
+	 */
+	var BitmapText = /*@__PURE__*/(function (Container) {
+	    function BitmapText(text, style)
+	    {
+	        var this$1 = this;
+	        if ( style === void 0 ) { style = {}; }
+
+	        Container.call(this);
+
+	        /**
+	         * Private tracker for the width of the overall text
+	         *
+	         * @member {number}
+	         * @private
+	         */
+	        this._textWidth = 0;
+
+	        /**
+	         * Private tracker for the height of the overall text
+	         *
+	         * @member {number}
+	         * @private
+	         */
+	        this._textHeight = 0;
+
+	        /**
+	         * Private tracker for the letter sprite pool.
+	         *
+	         * @member {PIXI.Sprite[]}
+	         * @private
+	         */
+	        this._glyphs = [];
+
+	        /**
+	         * Private tracker for the current style.
+	         *
+	         * @member {object}
+	         * @private
+	         */
+	        this._font = {
+	            tint: style.tint !== undefined ? style.tint : 0xFFFFFF,
+	            align: style.align || 'left',
+	            name: null,
+	            size: 0,
+	        };
+
+	        /**
+	         * Private tracker for the current font.
+	         *
+	         * @member {object}
+	         * @private
+	         */
+	        this.font = style.font; // run font setter
+
+	        /**
+	         * Private tracker for the current text.
+	         *
+	         * @member {string}
+	         * @private
+	         */
+	        this._text = text;
+
+	        /**
+	         * The max width of this bitmap text in pixels. If the text provided is longer than the
+	         * value provided, line breaks will be automatically inserted in the last whitespace.
+	         * Disable by setting value to 0
+	         *
+	         * @member {number}
+	         * @private
+	         */
+	        this._maxWidth = 0;
+
+	        /**
+	         * The max line height. This is useful when trying to use the total height of the Text,
+	         * ie: when trying to vertically align.
+	         *
+	         * @member {number}
+	         * @private
+	         */
+	        this._maxLineHeight = 0;
+
+	        /**
+	         * Letter spacing. This is useful for setting the space between characters.
+	         * @member {number}
+	         * @private
+	         */
+	        this._letterSpacing = 0;
+
+	        /**
+	         * Text anchor. read-only
+	         *
+	         * @member {PIXI.ObservablePoint}
+	         * @private
+	         */
+	        this._anchor = new ObservablePoint(function () { this$1.dirty = true; }, this, 0, 0);
+
+	        /**
+	         * The dirty state of this object.
+	         *
+	         * @member {boolean}
+	         */
+	        this.dirty = false;
+
+	        /**
+	         * If true PixiJS will Math.floor() x/y values when rendering, stopping pixel interpolation.
+	         * Advantages can include sharper image quality (like text) and faster rendering on canvas.
+	         * The main disadvantage is movement of objects may appear less smooth.
+	         * To set the global default, change {@link PIXI.settings.ROUND_PIXELS}
+	         *
+	         * @member {boolean}
+	         * @default false
+	         */
+	        this.roundPixels = settings.ROUND_PIXELS;
+
+	        this.updateText();
+	    }
+
+	    if ( Container ) { BitmapText.__proto__ = Container; }
+	    BitmapText.prototype = Object.create( Container && Container.prototype );
+	    BitmapText.prototype.constructor = BitmapText;
+
+	    var prototypeAccessors = { tint: { configurable: true },align: { configurable: true },anchor: { configurable: true },font: { configurable: true },text: { configurable: true },maxWidth: { configurable: true },maxLineHeight: { configurable: true },textWidth: { configurable: true },letterSpacing: { configurable: true },textHeight: { configurable: true } };
+
+	    /**
+	     * Renders text and updates it when needed
+	     *
+	     * @private
+	     */
+	    BitmapText.prototype.updateText = function updateText ()
+	    {
+	        var data = BitmapText.fonts[this._font.name];
+	        var scale = this._font.size / data.size;
+	        var pos = new Point();
+	        var chars = [];
+	        var lineWidths = [];
+	        var text = this._text.replace(/(?:\r\n|\r)/g, '\n') || ' ';
+	        var textLength = text.length;
+	        var maxWidth = this._maxWidth * data.size / this._font.size;
+
+	        var prevCharCode = null;
+	        var lastLineWidth = 0;
+	        var maxLineWidth = 0;
+	        var line = 0;
+	        var lastBreakPos = -1;
+	        var lastBreakWidth = 0;
+	        var spacesRemoved = 0;
+	        var maxLineHeight = 0;
+
+	        for (var i = 0; i < textLength; i++)
+	        {
+	            var charCode = text.charCodeAt(i);
+	            var char = text.charAt(i);
+
+	            if ((/(?:\s)/).test(char))
+	            {
+	                lastBreakPos = i;
+	                lastBreakWidth = lastLineWidth;
+	            }
+
+	            if (char === '\r' || char === '\n')
+	            {
+	                lineWidths.push(lastLineWidth);
+	                maxLineWidth = Math.max(maxLineWidth, lastLineWidth);
+	                ++line;
+	                ++spacesRemoved;
+
+	                pos.x = 0;
+	                pos.y += data.lineHeight;
+	                prevCharCode = null;
+	                continue;
+	            }
+
+	            var charData = data.chars[charCode];
+
+	            if (!charData)
+	            {
+	                continue;
+	            }
+
+	            if (prevCharCode && charData.kerning[prevCharCode])
+	            {
+	                pos.x += charData.kerning[prevCharCode];
+	            }
+
+	            chars.push({
+	                texture: charData.texture,
+	                line: line,
+	                charCode: charCode,
+	                position: new Point(pos.x + charData.xOffset + (this._letterSpacing / 2), pos.y + charData.yOffset),
+	            });
+	            pos.x += charData.xAdvance + this._letterSpacing;
+	            lastLineWidth = pos.x;
+	            maxLineHeight = Math.max(maxLineHeight, (charData.yOffset + charData.texture.height));
+	            prevCharCode = charCode;
+
+	            if (lastBreakPos !== -1 && maxWidth > 0 && pos.x > maxWidth)
+	            {
+	                ++spacesRemoved;
+	                removeItems(chars, 1 + lastBreakPos - spacesRemoved, 1 + i - lastBreakPos);
+	                i = lastBreakPos;
+	                lastBreakPos = -1;
+
+	                lineWidths.push(lastBreakWidth);
+	                maxLineWidth = Math.max(maxLineWidth, lastBreakWidth);
+	                line++;
+
+	                pos.x = 0;
+	                pos.y += data.lineHeight;
+	                prevCharCode = null;
+	            }
+	        }
+
+	        var lastChar = text.charAt(text.length - 1);
+
+	        if (lastChar !== '\r' && lastChar !== '\n')
+	        {
+	            if ((/(?:\s)/).test(lastChar))
+	            {
+	                lastLineWidth = lastBreakWidth;
+	            }
+
+	            lineWidths.push(lastLineWidth);
+	            maxLineWidth = Math.max(maxLineWidth, lastLineWidth);
+	        }
+
+	        var lineAlignOffsets = [];
+
+	        for (var i$1 = 0; i$1 <= line; i$1++)
+	        {
+	            var alignOffset = 0;
+
+	            if (this._font.align === 'right')
+	            {
+	                alignOffset = maxLineWidth - lineWidths[i$1];
+	            }
+	            else if (this._font.align === 'center')
+	            {
+	                alignOffset = (maxLineWidth - lineWidths[i$1]) / 2;
+	            }
+
+	            lineAlignOffsets.push(alignOffset);
+	        }
+
+	        var lenChars = chars.length;
+	        var tint = this.tint;
+
+	        for (var i$2 = 0; i$2 < lenChars; i$2++)
+	        {
+	            var c = this._glyphs[i$2]; // get the next glyph sprite
+
+	            if (c)
+	            {
+	                c.texture = chars[i$2].texture;
+	            }
+	            else
+	            {
+	                c = new Sprite(chars[i$2].texture);
+	                c.roundPixels = this.roundPixels;
+	                this._glyphs.push(c);
+	            }
+
+	            c.position.x = (chars[i$2].position.x + lineAlignOffsets[chars[i$2].line]) * scale;
+	            c.position.y = chars[i$2].position.y * scale;
+	            c.scale.x = c.scale.y = scale;
+	            c.tint = tint;
+
+	            if (!c.parent)
+	            {
+	                this.addChild(c);
+	            }
+	        }
+
+	        // remove unnecessary children.
+	        for (var i$3 = lenChars; i$3 < this._glyphs.length; ++i$3)
+	        {
+	            this.removeChild(this._glyphs[i$3]);
+	        }
+
+	        this._textWidth = maxLineWidth * scale;
+	        this._textHeight = (pos.y + data.lineHeight) * scale;
+
+	        // apply anchor
+	        if (this.anchor.x !== 0 || this.anchor.y !== 0)
+	        {
+	            for (var i$4 = 0; i$4 < lenChars; i$4++)
+	            {
+	                this._glyphs[i$4].x -= this._textWidth * this.anchor.x;
+	                this._glyphs[i$4].y -= this._textHeight * this.anchor.y;
+	            }
+	        }
+	        this._maxLineHeight = maxLineHeight * scale;
+	    };
+
+	    /**
+	     * Updates the transform of this object
+	     *
+	     * @private
+	     */
+	    BitmapText.prototype.updateTransform = function updateTransform ()
+	    {
+	        this.validate();
+	        this.containerUpdateTransform();
+	    };
+
+	    /**
+	     * Validates text before calling parent's getLocalBounds
+	     *
+	     * @return {PIXI.Rectangle} The rectangular bounding area
+	     */
+	    BitmapText.prototype.getLocalBounds = function getLocalBounds ()
+	    {
+	        this.validate();
+
+	        return Container.prototype.getLocalBounds.call(this);
+	    };
+
+	    /**
+	     * Updates text when needed
+	     *
+	     * @private
+	     */
+	    BitmapText.prototype.validate = function validate ()
+	    {
+	        if (this.dirty)
+	        {
+	            this.updateText();
+	            this.dirty = false;
+	        }
+	    };
+
+	    /**
+	     * The tint of the BitmapText object.
+	     *
+	     * @member {number}
+	     */
+	    prototypeAccessors.tint.get = function ()
+	    {
+	        return this._font.tint;
+	    };
+
+	    prototypeAccessors.tint.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        this._font.tint = (typeof value === 'number' && value >= 0) ? value : 0xFFFFFF;
+
+	        this.dirty = true;
+	    };
+
+	    /**
+	     * The alignment of the BitmapText object.
+	     *
+	     * @member {string}
+	     * @default 'left'
+	     */
+	    prototypeAccessors.align.get = function ()
+	    {
+	        return this._font.align;
+	    };
+
+	    prototypeAccessors.align.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        this._font.align = value || 'left';
+
+	        this.dirty = true;
+	    };
+
+	    /**
+	     * The anchor sets the origin point of the text.
+	     *
+	     * The default is `(0,0)`, this means the text's origin is the top left.
+	     *
+	     * Setting the anchor to `(0.5,0.5)` means the text's origin is centered.
+	     *
+	     * Setting the anchor to `(1,1)` would mean the text's origin point will be the bottom right corner.
+	     *
+	     * @member {PIXI.Point | number}
+	     */
+	    prototypeAccessors.anchor.get = function ()
+	    {
+	        return this._anchor;
+	    };
+
+	    prototypeAccessors.anchor.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        if (typeof value === 'number')
+	        {
+	            this._anchor.set(value);
+	        }
+	        else
+	        {
+	            this._anchor.copyFrom(value);
+	        }
+	    };
+
+	    /**
+	     * The font descriptor of the BitmapText object.
+	     *
+	     * @member {object}
+	     */
+	    prototypeAccessors.font.get = function ()
+	    {
+	        return this._font;
+	    };
+
+	    prototypeAccessors.font.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        if (!value)
+	        {
+	            return;
+	        }
+
+	        if (typeof value === 'string')
+	        {
+	            value = value.split(' ');
+
+	            this._font.name = value.length === 1 ? value[0] : value.slice(1).join(' ');
+	            this._font.size = value.length >= 2 ? parseInt(value[0], 10) : BitmapText.fonts[this._font.name].size;
+	        }
+	        else
+	        {
+	            this._font.name = value.name;
+	            this._font.size = typeof value.size === 'number' ? value.size : parseInt(value.size, 10);
+	        }
+
+	        this.dirty = true;
+	    };
+
+	    /**
+	     * The text of the BitmapText object.
+	     *
+	     * @member {string}
+	     */
+	    prototypeAccessors.text.get = function ()
+	    {
+	        return this._text;
+	    };
+
+	    prototypeAccessors.text.set = function (text) // eslint-disable-line require-jsdoc
+	    {
+	        text = String(text === null || text === undefined ? '' : text);
+
+	        if (this._text === text)
+	        {
+	            return;
+	        }
+	        this._text = text;
+	        this.dirty = true;
+	    };
+
+	    /**
+	     * The max width of this bitmap text in pixels. If the text provided is longer than the
+	     * value provided, line breaks will be automatically inserted in the last whitespace.
+	     * Disable by setting the value to 0.
+	     *
+	     * @member {number}
+	     */
+	    prototypeAccessors.maxWidth.get = function ()
+	    {
+	        return this._maxWidth;
+	    };
+
+	    prototypeAccessors.maxWidth.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        if (this._maxWidth === value)
+	        {
+	            return;
+	        }
+	        this._maxWidth = value;
+	        this.dirty = true;
+	    };
+
+	    /**
+	     * The max line height. This is useful when trying to use the total height of the Text,
+	     * i.e. when trying to vertically align.
+	     *
+	     * @member {number}
+	     * @readonly
+	     */
+	    prototypeAccessors.maxLineHeight.get = function ()
+	    {
+	        this.validate();
+
+	        return this._maxLineHeight;
+	    };
+
+	    /**
+	     * The width of the overall text, different from fontSize,
+	     * which is defined in the style object.
+	     *
+	     * @member {number}
+	     * @readonly
+	     */
+	    prototypeAccessors.textWidth.get = function ()
+	    {
+	        this.validate();
+
+	        return this._textWidth;
+	    };
+
+	    /**
+	     * Additional space between characters.
+	     *
+	     * @member {number}
+	     */
+	    prototypeAccessors.letterSpacing.get = function ()
+	    {
+	        return this._letterSpacing;
+	    };
+
+	    prototypeAccessors.letterSpacing.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        if (this._letterSpacing !== value)
+	        {
+	            this._letterSpacing = value;
+	            this.dirty = true;
+	        }
+	    };
+
+	    /**
+	     * The height of the overall text, different from fontSize,
+	     * which is defined in the style object.
+	     *
+	     * @member {number}
+	     * @readonly
+	     */
+	    prototypeAccessors.textHeight.get = function ()
+	    {
+	        this.validate();
+
+	        return this._textHeight;
+	    };
+
+	    /**
+	     * Register a bitmap font with data and a texture.
+	     *
+	     * @static
+	     * @param {XMLDocument} xml - The XML document data.
+	     * @param {Object.<string, PIXI.Texture>|PIXI.Texture|PIXI.Texture[]} textures - List of textures for each page.
+	     *  If providing an object, the key is the `<page>` element's `file` attribute in the FNT file.
+	     * @return {Object} Result font object with font, size, lineHeight and char fields.
+	     */
+	    BitmapText.registerFont = function registerFont (xml, textures)
+	    {
+	        var data = {};
+	        var info = xml.getElementsByTagName('info')[0];
+	        var common = xml.getElementsByTagName('common')[0];
+	        var pages = xml.getElementsByTagName('page');
+	        var res = getResolutionOfUrl(pages[0].getAttribute('file'), settings.RESOLUTION);
+	        var pagesTextures = {};
+
+	        data.font = info.getAttribute('face');
+	        data.size = parseInt(info.getAttribute('size'), 10);
+	        data.lineHeight = parseInt(common.getAttribute('lineHeight'), 10) / res;
+	        data.chars = {};
+
+	        // Single texture, convert to list
+	        if (textures instanceof Texture)
+	        {
+	            textures = [textures];
+	        }
+
+	        // Convert the input Texture, Textures or object
+	        // into a page Texture lookup by "id"
+	        for (var i = 0; i < pages.length; i++)
+	        {
+	            var id = pages[i].getAttribute('id');
+	            var file = pages[i].getAttribute('file');
+
+	            pagesTextures[id] = textures instanceof Array ? textures[i] : textures[file];
+	        }
+
+	        // parse letters
+	        var letters = xml.getElementsByTagName('char');
+
+	        for (var i$1 = 0; i$1 < letters.length; i$1++)
+	        {
+	            var letter = letters[i$1];
+	            var charCode = parseInt(letter.getAttribute('id'), 10);
+	            var page = letter.getAttribute('page') || 0;
+	            var textureRect = new Rectangle(
+	                (parseInt(letter.getAttribute('x'), 10) / res) + (pagesTextures[page].frame.x / res),
+	                (parseInt(letter.getAttribute('y'), 10) / res) + (pagesTextures[page].frame.y / res),
+	                parseInt(letter.getAttribute('width'), 10) / res,
+	                parseInt(letter.getAttribute('height'), 10) / res
+	            );
+
+	            data.chars[charCode] = {
+	                xOffset: parseInt(letter.getAttribute('xoffset'), 10) / res,
+	                yOffset: parseInt(letter.getAttribute('yoffset'), 10) / res,
+	                xAdvance: parseInt(letter.getAttribute('xadvance'), 10) / res,
+	                kerning: {},
+	                texture: new Texture(pagesTextures[page].baseTexture, textureRect),
+	                page: page,
+	            };
+	        }
+
+	        // parse kernings
+	        var kernings = xml.getElementsByTagName('kerning');
+
+	        for (var i$2 = 0; i$2 < kernings.length; i$2++)
+	        {
+	            var kerning = kernings[i$2];
+	            var first = parseInt(kerning.getAttribute('first'), 10) / res;
+	            var second = parseInt(kerning.getAttribute('second'), 10) / res;
+	            var amount = parseInt(kerning.getAttribute('amount'), 10) / res;
+
+	            if (data.chars[second])
+	            {
+	                data.chars[second].kerning[first] = amount;
+	            }
+	        }
+
+	        // I'm leaving this as a temporary fix so we can test the bitmap fonts in v3
+	        // but it's very likely to change
+	        BitmapText.fonts[data.font] = data;
+
+	        return data;
+	    };
+
+	    Object.defineProperties( BitmapText.prototype, prototypeAccessors );
+
+	    return BitmapText;
+	}(Container));
+
+	BitmapText.fonts = {};
+
+	/**
+	 * {@link PIXI.Loader Loader} middleware for loading
+	 * bitmap-based fonts suitable for using with {@link PIXI.BitmapText}.
+	 * @class
+	 * @memberof PIXI
+	 * @implements PIXI.ILoaderPlugin
+	 */
+	var BitmapFontLoader = function BitmapFontLoader () {};
+
+	BitmapFontLoader.parse = function parse (resource, texture)
+	{
+	    resource.bitmapFont = BitmapText.registerFont(resource.data, texture);
+	};
+
+	/**
+	 * Called when the plugin is installed.
+	 *
+	 * @see PIXI.Loader.registerPlugin
+	 */
+	BitmapFontLoader.add = function add ()
+	{
+	    LoaderResource.setExtensionXhrType('fnt', LoaderResource.XHR_RESPONSE_TYPE.DOCUMENT);
+	};
+
+	/**
+	 * Replacement for NodeJS's path.dirname
+	 * @private
+	 * @param {string} url Path to get directory for
+	 */
+	BitmapFontLoader.dirname = function dirname (url)
+	{
+	    var dir = url
+	        .replace(/\/$/, '') // replace trailing slash
+	        .replace(/\/[^\/]*$/, ''); // remove everything after the last
+
+	    // File request is relative, use current directory
+	    if (dir === url)
+	    {
+	        return '.';
+	    }
+	    // Started with a slash
+	    else if (dir === '')
+	    {
+	        return '/';
+	    }
+
+	    return dir;
+	};
+
+	/**
+	 * Called after a resource is loaded.
+	 * @see PIXI.Loader.loaderMiddleware
+	 * @param {PIXI.LoaderResource} resource
+	 * @param {function} next
+	 */
+	BitmapFontLoader.use = function use (resource, next)
+	{
+	    // skip if no data or not xml data
+	    if (!resource.data || resource.type !== LoaderResource.TYPE.XML)
+	    {
+	        next();
+
+	        return;
+	    }
+
+	    // skip if not bitmap font data, using some silly duck-typing
+	    if (resource.data.getElementsByTagName('page').length === 0
+	        || resource.data.getElementsByTagName('info').length === 0
+	        || resource.data.getElementsByTagName('info')[0].getAttribute('face') === null
+	    )
+	    {
+	        next();
+
+	        return;
+	    }
+
+	    var xmlUrl = !resource.isDataUrl ? BitmapFontLoader.dirname(resource.url) : '';
+
+	    if (resource.isDataUrl)
+	    {
+	        if (xmlUrl === '.')
+	        {
+	            xmlUrl = '';
+	        }
+
+	        if (this.baseUrl && xmlUrl)
+	        {
+	            // if baseurl has a trailing slash then add one to xmlUrl so the replace works below
+	            if (this.baseUrl.charAt(this.baseUrl.length - 1) === '/')
+	            {
+	                xmlUrl += '/';
+	            }
+	        }
+	    }
+
+	    // remove baseUrl from xmlUrl
+	    xmlUrl = xmlUrl.replace(this.baseUrl, '');
+
+	    // if there is an xmlUrl now, it needs a trailing slash. Ensure that it does if the string isn't empty.
+	    if (xmlUrl && xmlUrl.charAt(xmlUrl.length - 1) !== '/')
+	    {
+	        xmlUrl += '/';
+	    }
+
+	    var pages = resource.data.getElementsByTagName('page');
+	    var textures = {};
+
+	    // Handle completed, when the number of textures
+	    // load is the same number as references in the fnt file
+	    var completed = function (page) {
+	        textures[page.metadata.pageFile] = page.texture;
+
+	        if (Object.keys(textures).length === pages.length)
+	        {
+	            BitmapFontLoader.parse(resource, textures);
+	            next();
+	        }
+	    };
+
+	    for (var i = 0; i < pages.length; ++i)
+	    {
+	        var pageFile = pages[i].getAttribute('file');
+	        var url = xmlUrl + pageFile;
+	        var exists = false;
+
+	        // incase the image is loaded outside
+	        // using the same loader, resource will be available
+	        for (var name in this.resources)
+	        {
+	            var bitmapResource = this.resources[name];
+
+	            if (bitmapResource.url === url)
+	            {
+	                bitmapResource.metadata.pageFile = pageFile;
+	                if (bitmapResource.texture)
+	                {
+	                    completed(bitmapResource);
+	                }
+	                else
+	                {
+	                    bitmapResource.onAfterMiddleware.add(completed);
+	                }
+	                exists = true;
+	                break;
+	            }
+	        }
+
+	        // texture is not loaded, we'll attempt to add
+	        // it to the load and add the texture to the list
+	        if (!exists)
+	        {
+	            // Standard loading options for images
+	            var options = {
+	                crossOrigin: resource.crossOrigin,
+	                loadType: LoaderResource.LOAD_TYPE.IMAGE,
+	                metadata: Object.assign(
+	                    { pageFile: pageFile },
+	                    resource.metadata.imageMetadata
+	                ),
+	                parentResource: resource,
+	            };
+
+	            this.add(url, options, completed);
+	        }
+	    }
+	};
+
+	/*!
+	 * @pixi/filter-alpha - v5.1.4
+	 * Compiled Fri, 20 Sep 2019 17:22:13 UTC
+	 *
+	 * @pixi/filter-alpha is licensed under the MIT License.
+	 * http://www.opensource.org/licenses/mit-license
+	 */
+
+	var fragment$3 = "varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float uAlpha;\n\nvoid main(void)\n{\n   gl_FragColor = texture2D(uSampler, vTextureCoord) * uAlpha;\n}\n";
+
+	/**
+	 * Simplest filter - applies alpha.
+	 *
+	 * Use this instead of Container's alpha property to avoid visual layering of individual elements.
+	 * AlphaFilter applies alpha evenly across the entire display object and any opaque elements it contains.
+	 * If elements are not opaque, they will blend with each other anyway.
+	 *
+	 * Very handy if you want to use common features of all filters:
+	 *
+	 * 1. Assign a blendMode to this filter, blend all elements inside display object with background.
+	 *
+	 * 2. To use clipping in display coordinates, assign a filterArea to the same container that has this filter.
+	 *
+	 * @class
+	 * @extends PIXI.Filter
+	 * @memberof PIXI.filters
+	 */
+	var AlphaFilter = /*@__PURE__*/(function (Filter) {
+	    function AlphaFilter(alpha)
+	    {
+	        if ( alpha === void 0 ) { alpha = 1.0; }
+
+	        Filter.call(this, _default, fragment$3, { uAlpha: 1 });
+
+	        this.alpha = alpha;
+	    }
+
+	    if ( Filter ) { AlphaFilter.__proto__ = Filter; }
+	    AlphaFilter.prototype = Object.create( Filter && Filter.prototype );
+	    AlphaFilter.prototype.constructor = AlphaFilter;
+
+	    var prototypeAccessors = { alpha: { configurable: true } };
+
+	    /**
+	     * Coefficient for alpha multiplication
+	     *
+	     * @member {number}
+	     * @default 1
+	     */
+	    prototypeAccessors.alpha.get = function ()
+	    {
+	        return this.uniforms.uAlpha;
+	    };
+
+	    prototypeAccessors.alpha.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        this.uniforms.uAlpha = value;
+	    };
+
+	    Object.defineProperties( AlphaFilter.prototype, prototypeAccessors );
+
+	    return AlphaFilter;
+	}(Filter));
+
+	/*!
+	 * @pixi/filter-blur - v5.1.4
+	 * Compiled Fri, 20 Sep 2019 17:22:13 UTC
+	 *
+	 * @pixi/filter-blur is licensed under the MIT License.
+	 * http://www.opensource.org/licenses/mit-license
+	 */
+
+	var vertTemplate = "\n    attribute vec2 aVertexPosition;\n\n    uniform mat3 projectionMatrix;\n\n    uniform float strength;\n\n    varying vec2 vBlurTexCoords[%size%];\n\n    uniform vec4 inputSize;\n    uniform vec4 outputFrame;\n    \n    vec4 filterVertexPosition( void )\n    {\n        vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n    \n        return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n    }\n    \n    vec2 filterTextureCoord( void )\n    {\n        return aVertexPosition * (outputFrame.zw * inputSize.zw);\n    }\n\n    void main(void)\n    {\n        gl_Position = filterVertexPosition();\n\n        vec2 textureCoord = filterTextureCoord();\n        %blur%\n    }";
+
+	function generateBlurVertSource(kernelSize, x)
+	{
+	    var halfLength = Math.ceil(kernelSize / 2);
+
+	    var vertSource = vertTemplate;
+
+	    var blurLoop = '';
+	    var template;
+	    // let value;
+
+	    if (x)
+	    {
+	        template = 'vBlurTexCoords[%index%] =  textureCoord + vec2(%sampleIndex% * strength, 0.0);';
+	    }
+	    else
+	    {
+	        template = 'vBlurTexCoords[%index%] =  textureCoord + vec2(0.0, %sampleIndex% * strength);';
+	    }
+
+	    for (var i = 0; i < kernelSize; i++)
+	    {
+	        var blur = template.replace('%index%', i);
+
+	        // value = i;
+
+	        // if(i >= halfLength)
+	        // {
+	        //     value = kernelSize - i - 1;
+	        // }
+
+	        blur = blur.replace('%sampleIndex%', ((i - (halfLength - 1)) + ".0"));
+
+	        blurLoop += blur;
+	        blurLoop += '\n';
+	    }
+
+	    vertSource = vertSource.replace('%blur%', blurLoop);
+	    vertSource = vertSource.replace('%size%', kernelSize);
+
+	    return vertSource;
+	}
+
+	var GAUSSIAN_VALUES = {
+	    5: [0.153388, 0.221461, 0.250301],
+	    7: [0.071303, 0.131514, 0.189879, 0.214607],
+	    9: [0.028532, 0.067234, 0.124009, 0.179044, 0.20236],
+	    11: [0.0093, 0.028002, 0.065984, 0.121703, 0.175713, 0.198596],
+	    13: [0.002406, 0.009255, 0.027867, 0.065666, 0.121117, 0.174868, 0.197641],
+	    15: [0.000489, 0.002403, 0.009246, 0.02784, 0.065602, 0.120999, 0.174697, 0.197448],
+	};
+
+	var fragTemplate$1 = [
+	    'varying vec2 vBlurTexCoords[%size%];',
+	    'uniform sampler2D uSampler;',
+
+	    'void main(void)',
+	    '{',
+	    '    gl_FragColor = vec4(0.0);',
+	    '    %blur%',
+	    '}' ].join('\n');
+
+	function generateBlurFragSource(kernelSize)
+	{
+	    var kernel = GAUSSIAN_VALUES[kernelSize];
+	    var halfLength = kernel.length;
+
+	    var fragSource = fragTemplate$1;
+
+	    var blurLoop = '';
+	    var template = 'gl_FragColor += texture2D(uSampler, vBlurTexCoords[%index%]) * %value%;';
+	    var value;
+
+	    for (var i = 0; i < kernelSize; i++)
+	    {
+	        var blur = template.replace('%index%', i);
+
+	        value = i;
+
+	        if (i >= halfLength)
+	        {
+	            value = kernelSize - i - 1;
+	        }
+
+	        blur = blur.replace('%value%', kernel[value]);
+
+	        blurLoop += blur;
+	        blurLoop += '\n';
+	    }
+
+	    fragSource = fragSource.replace('%blur%', blurLoop);
+	    fragSource = fragSource.replace('%size%', kernelSize);
+
+	    return fragSource;
+	}
+
+	/**
+	 * The BlurFilterPass applies a horizontal or vertical Gaussian blur to an object.
+	 *
+	 * @class
+	 * @extends PIXI.Filter
+	 * @memberof PIXI.filters
+	 */
+	var BlurFilterPass = /*@__PURE__*/(function (Filter) {
+	    function BlurFilterPass(horizontal, strength, quality, resolution, kernelSize)
+	    {
+	        kernelSize = kernelSize || 5;
+	        var vertSrc = generateBlurVertSource(kernelSize, horizontal);
+	        var fragSrc = generateBlurFragSource(kernelSize);
+
+	        Filter.call(
+	            // vertex shader
+	            this, vertSrc,
+	            // fragment shader
+	            fragSrc
+	        );
+
+	        this.horizontal = horizontal;
+
+	        this.resolution = resolution || settings.RESOLUTION;
+
+	        this._quality = 0;
+
+	        this.quality = quality || 4;
+
+	        this.blur = strength || 8;
+	    }
+
+	    if ( Filter ) { BlurFilterPass.__proto__ = Filter; }
+	    BlurFilterPass.prototype = Object.create( Filter && Filter.prototype );
+	    BlurFilterPass.prototype.constructor = BlurFilterPass;
+
+	    var prototypeAccessors = { blur: { configurable: true },quality: { configurable: true } };
+
+	    BlurFilterPass.prototype.apply = function apply (filterManager, input, output, clear)
+	    {
+	        if (output)
+	        {
+	            if (this.horizontal)
+	            {
+	                this.uniforms.strength = (1 / output.width) * (output.width / input.width);
+	            }
+	            else
+	            {
+	                this.uniforms.strength = (1 / output.height) * (output.height / input.height);
+	            }
+	        }
+	        else
+	        {
+	            if (this.horizontal) // eslint-disable-line
+	            {
+	                this.uniforms.strength = (1 / filterManager.renderer.width) * (filterManager.renderer.width / input.width);
+	            }
+	            else
+	            {
+	                this.uniforms.strength = (1 / filterManager.renderer.height) * (filterManager.renderer.height / input.height); // eslint-disable-line
+	            }
+	        }
+
+	        // screen space!
+	        this.uniforms.strength *= this.strength;
+	        this.uniforms.strength /= this.passes;
+
+	        if (this.passes === 1)
+	        {
+	            filterManager.applyFilter(this, input, output, clear);
+	        }
+	        else
+	        {
+	            var renderTarget = filterManager.getFilterTexture();
+	            var renderer = filterManager.renderer;
+
+	            var flip = input;
+	            var flop = renderTarget;
+
+	            this.state.blend = false;
+	            filterManager.applyFilter(this, flip, flop, false);
+
+	            for (var i = 1; i < this.passes - 1; i++)
+	            {
+	                renderer.renderTexture.bind(flip, flip.filterFrame);
+
+	                this.uniforms.uSampler = flop;
+
+	                var temp = flop;
+
+	                flop = flip;
+	                flip = temp;
+
+	                renderer.shader.bind(this);
+	                renderer.geometry.draw(5);
+	            }
+
+	            this.state.blend = true;
+	            filterManager.applyFilter(this, flop, output, clear);
+	            filterManager.returnFilterTexture(renderTarget);
+	        }
+	    };
+	    /**
+	     * Sets the strength of both the blur.
+	     *
+	     * @member {number}
+	     * @default 16
+	     */
+	    prototypeAccessors.blur.get = function ()
+	    {
+	        return this.strength;
+	    };
+
+	    prototypeAccessors.blur.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        this.padding = 1 + (Math.abs(value) * 2);
+	        this.strength = value;
+	    };
+
+	    /**
+	     * Sets the quality of the blur by modifying the number of passes. More passes means higher
+	     * quaility bluring but the lower the performance.
+	     *
+	     * @member {number}
+	     * @default 4
+	     */
+	    prototypeAccessors.quality.get = function ()
+	    {
+	        return this._quality;
+	    };
+
+	    prototypeAccessors.quality.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        this._quality = value;
+	        this.passes = value;
+	    };
+
+	    Object.defineProperties( BlurFilterPass.prototype, prototypeAccessors );
+
+	    return BlurFilterPass;
+	}(Filter));
+
+	/**
+	 * The BlurFilter applies a Gaussian blur to an object.
+	 *
+	 * The strength of the blur can be set for the x-axis and y-axis separately.
+	 *
+	 * @class
+	 * @extends PIXI.Filter
+	 * @memberof PIXI.filters
+	 */
+	var BlurFilter = /*@__PURE__*/(function (Filter) {
+	    function BlurFilter(strength, quality, resolution, kernelSize)
+	    {
+	        Filter.call(this);
+
+	        this.blurXFilter = new BlurFilterPass(true, strength, quality, resolution, kernelSize);
+	        this.blurYFilter = new BlurFilterPass(false, strength, quality, resolution, kernelSize);
+
+	        this.resolution = resolution || settings.RESOLUTION;
+	        this.quality = quality || 4;
+	        this.blur = strength || 8;
+
+	        this.repeatEdgePixels = false;
+	    }
+
+	    if ( Filter ) { BlurFilter.__proto__ = Filter; }
+	    BlurFilter.prototype = Object.create( Filter && Filter.prototype );
+	    BlurFilter.prototype.constructor = BlurFilter;
+
+	    var prototypeAccessors = { blur: { configurable: true },quality: { configurable: true },blurX: { configurable: true },blurY: { configurable: true },blendMode: { configurable: true },repeatEdgePixels: { configurable: true } };
+
+	    /**
+	     * Applies the filter.
+	     *
+	     * @param {PIXI.systems.FilterSystem} filterManager - The manager.
+	     * @param {PIXI.RenderTexture} input - The input target.
+	     * @param {PIXI.RenderTexture} output - The output target.
+	     */
+	    BlurFilter.prototype.apply = function apply (filterManager, input, output, clear)
+	    {
+	        var xStrength = Math.abs(this.blurXFilter.strength);
+	        var yStrength = Math.abs(this.blurYFilter.strength);
+
+	        if (xStrength && yStrength)
+	        {
+	            var renderTarget = filterManager.getFilterTexture();
+
+	            this.blurXFilter.apply(filterManager, input, renderTarget, true);
+	            this.blurYFilter.apply(filterManager, renderTarget, output, clear);
+
+	            filterManager.returnFilterTexture(renderTarget);
+	        }
+	        else if (yStrength)
+	        {
+	            this.blurYFilter.apply(filterManager, input, output, clear);
+	        }
+	        else
+	        {
+	            this.blurXFilter.apply(filterManager, input, output, clear);
+	        }
+	    };
+
+	    BlurFilter.prototype.updatePadding = function updatePadding ()
+	    {
+	        if (this._repeatEdgePixels)
+	        {
+	            this.padding = 0;
+	        }
+	        else
+	        {
+	            this.padding = Math.max(Math.abs(this.blurXFilter.strength), Math.abs(this.blurYFilter.strength)) * 2;
+	        }
+	    };
+
+	    /**
+	     * Sets the strength of both the blurX and blurY properties simultaneously
+	     *
+	     * @member {number}
+	     * @default 2
+	     */
+	    prototypeAccessors.blur.get = function ()
+	    {
+	        return this.blurXFilter.blur;
+	    };
+
+	    prototypeAccessors.blur.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        this.blurXFilter.blur = this.blurYFilter.blur = value;
+	        this.updatePadding();
+	    };
+
+	    /**
+	     * Sets the number of passes for blur. More passes means higher quaility bluring.
+	     *
+	     * @member {number}
+	     * @default 1
+	     */
+	    prototypeAccessors.quality.get = function ()
+	    {
+	        return this.blurXFilter.quality;
+	    };
+
+	    prototypeAccessors.quality.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        this.blurXFilter.quality = this.blurYFilter.quality = value;
+	    };
+
+	    /**
+	     * Sets the strength of the blurX property
+	     *
+	     * @member {number}
+	     * @default 2
+	     */
+	    prototypeAccessors.blurX.get = function ()
+	    {
+	        return this.blurXFilter.blur;
+	    };
+
+	    prototypeAccessors.blurX.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        this.blurXFilter.blur = value;
+	        this.updatePadding();
+	    };
+
+	    /**
+	     * Sets the strength of the blurY property
+	     *
+	     * @member {number}
+	     * @default 2
+	     */
+	    prototypeAccessors.blurY.get = function ()
+	    {
+	        return this.blurYFilter.blur;
+	    };
+
+	    prototypeAccessors.blurY.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        this.blurYFilter.blur = value;
+	        this.updatePadding();
+	    };
+
+	    /**
+	     * Sets the blendmode of the filter
+	     *
+	     * @member {number}
+	     * @default PIXI.BLEND_MODES.NORMAL
+	     */
+	    prototypeAccessors.blendMode.get = function ()
+	    {
+	        return this.blurYFilter.blendMode;
+	    };
+
+	    prototypeAccessors.blendMode.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        this.blurYFilter.blendMode = value;
+	    };
+
+	    /**
+	     * If set to true the edge of the target will be clamped
+	     *
+	     * @member {bool}
+	     * @default false
+	     */
+	    prototypeAccessors.repeatEdgePixels.get = function ()
+	    {
+	        return this._repeatEdgePixels;
+	    };
+
+	    prototypeAccessors.repeatEdgePixels.set = function (value)
+	    {
+	        this._repeatEdgePixels = value;
+	        this.updatePadding();
+	    };
+
+	    Object.defineProperties( BlurFilter.prototype, prototypeAccessors );
+
+	    return BlurFilter;
+	}(Filter));
+
+	/*!
+	 * @pixi/filter-color-matrix - v5.1.4
+	 * Compiled Fri, 20 Sep 2019 17:22:13 UTC
+	 *
+	 * @pixi/filter-color-matrix is licensed under the MIT License.
+	 * http://www.opensource.org/licenses/mit-license
+	 */
+
+	var fragment$4 = "varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform float m[20];\nuniform float uAlpha;\n\nvoid main(void)\n{\n    vec4 c = texture2D(uSampler, vTextureCoord);\n\n    if (uAlpha == 0.0) {\n        gl_FragColor = c;\n        return;\n    }\n\n    // Un-premultiply alpha before applying the color matrix. See issue #3539.\n    if (c.a > 0.0) {\n      c.rgb /= c.a;\n    }\n\n    vec4 result;\n\n    result.r = (m[0] * c.r);\n        result.r += (m[1] * c.g);\n        result.r += (m[2] * c.b);\n        result.r += (m[3] * c.a);\n        result.r += m[4];\n\n    result.g = (m[5] * c.r);\n        result.g += (m[6] * c.g);\n        result.g += (m[7] * c.b);\n        result.g += (m[8] * c.a);\n        result.g += m[9];\n\n    result.b = (m[10] * c.r);\n       result.b += (m[11] * c.g);\n       result.b += (m[12] * c.b);\n       result.b += (m[13] * c.a);\n       result.b += m[14];\n\n    result.a = (m[15] * c.r);\n       result.a += (m[16] * c.g);\n       result.a += (m[17] * c.b);\n       result.a += (m[18] * c.a);\n       result.a += m[19];\n\n    vec3 rgb = mix(c.rgb, result.rgb, uAlpha);\n\n    // Premultiply alpha again.\n    rgb *= result.a;\n\n    gl_FragColor = vec4(rgb, result.a);\n}\n";
+
+	/**
+	 * The ColorMatrixFilter class lets you apply a 5x4 matrix transformation on the RGBA
+	 * color and alpha values of every pixel on your displayObject to produce a result
+	 * with a new set of RGBA color and alpha values. It's pretty powerful!
+	 *
+	 * ```js
+	 *  let colorMatrix = new PIXI.filters.ColorMatrixFilter();
+	 *  container.filters = [colorMatrix];
+	 *  colorMatrix.contrast(2);
+	 * ```
+	 * @author Clément Chenebault <clement@goodboydigital.com>
+	 * @class
+	 * @extends PIXI.Filter
+	 * @memberof PIXI.filters
+	 */
+	var ColorMatrixFilter = /*@__PURE__*/(function (Filter) {
+	    function ColorMatrixFilter()
+	    {
+	        var uniforms = {
+	            m: new Float32Array([1, 0, 0, 0, 0,
+	                0, 1, 0, 0, 0,
+	                0, 0, 1, 0, 0,
+	                0, 0, 0, 1, 0]),
+	            uAlpha: 1,
+	        };
+
+	        Filter.call(this, defaultFilter, fragment$4, uniforms);
+
+	        this.alpha = 1;
+	    }
+
+	    if ( Filter ) { ColorMatrixFilter.__proto__ = Filter; }
+	    ColorMatrixFilter.prototype = Object.create( Filter && Filter.prototype );
+	    ColorMatrixFilter.prototype.constructor = ColorMatrixFilter;
+
+	    var prototypeAccessors = { matrix: { configurable: true },alpha: { configurable: true } };
+
+	    /**
+	     * Transforms current matrix and set the new one
+	     *
+	     * @param {number[]} matrix - 5x4 matrix
+	     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,
+	     *  just set the current matrix with @param matrix
+	     */
+	    ColorMatrixFilter.prototype._loadMatrix = function _loadMatrix (matrix, multiply)
+	    {
+	        if ( multiply === void 0 ) { multiply = false; }
+
+	        var newMatrix = matrix;
+
+	        if (multiply)
+	        {
+	            this._multiply(newMatrix, this.uniforms.m, matrix);
+	            newMatrix = this._colorMatrix(newMatrix);
+	        }
+
+	        // set the new matrix
+	        this.uniforms.m = newMatrix;
+	    };
+
+	    /**
+	     * Multiplies two mat5's
+	     *
+	     * @private
+	     * @param {number[]} out - 5x4 matrix the receiving matrix
+	     * @param {number[]} a - 5x4 matrix the first operand
+	     * @param {number[]} b - 5x4 matrix the second operand
+	     * @returns {number[]} 5x4 matrix
+	     */
+	    ColorMatrixFilter.prototype._multiply = function _multiply (out, a, b)
+	    {
+	        // Red Channel
+	        out[0] = (a[0] * b[0]) + (a[1] * b[5]) + (a[2] * b[10]) + (a[3] * b[15]);
+	        out[1] = (a[0] * b[1]) + (a[1] * b[6]) + (a[2] * b[11]) + (a[3] * b[16]);
+	        out[2] = (a[0] * b[2]) + (a[1] * b[7]) + (a[2] * b[12]) + (a[3] * b[17]);
+	        out[3] = (a[0] * b[3]) + (a[1] * b[8]) + (a[2] * b[13]) + (a[3] * b[18]);
+	        out[4] = (a[0] * b[4]) + (a[1] * b[9]) + (a[2] * b[14]) + (a[3] * b[19]) + a[4];
+
+	        // Green Channel
+	        out[5] = (a[5] * b[0]) + (a[6] * b[5]) + (a[7] * b[10]) + (a[8] * b[15]);
+	        out[6] = (a[5] * b[1]) + (a[6] * b[6]) + (a[7] * b[11]) + (a[8] * b[16]);
+	        out[7] = (a[5] * b[2]) + (a[6] * b[7]) + (a[7] * b[12]) + (a[8] * b[17]);
+	        out[8] = (a[5] * b[3]) + (a[6] * b[8]) + (a[7] * b[13]) + (a[8] * b[18]);
+	        out[9] = (a[5] * b[4]) + (a[6] * b[9]) + (a[7] * b[14]) + (a[8] * b[19]) + a[9];
+
+	        // Blue Channel
+	        out[10] = (a[10] * b[0]) + (a[11] * b[5]) + (a[12] * b[10]) + (a[13] * b[15]);
+	        out[11] = (a[10] * b[1]) + (a[11] * b[6]) + (a[12] * b[11]) + (a[13] * b[16]);
+	        out[12] = (a[10] * b[2]) + (a[11] * b[7]) + (a[12] * b[12]) + (a[13] * b[17]);
+	        out[13] = (a[10] * b[3]) + (a[11] * b[8]) + (a[12] * b[13]) + (a[13] * b[18]);
+	        out[14] = (a[10] * b[4]) + (a[11] * b[9]) + (a[12] * b[14]) + (a[13] * b[19]) + a[14];
+
+	        // Alpha Channel
+	        out[15] = (a[15] * b[0]) + (a[16] * b[5]) + (a[17] * b[10]) + (a[18] * b[15]);
+	        out[16] = (a[15] * b[1]) + (a[16] * b[6]) + (a[17] * b[11]) + (a[18] * b[16]);
+	        out[17] = (a[15] * b[2]) + (a[16] * b[7]) + (a[17] * b[12]) + (a[18] * b[17]);
+	        out[18] = (a[15] * b[3]) + (a[16] * b[8]) + (a[17] * b[13]) + (a[18] * b[18]);
+	        out[19] = (a[15] * b[4]) + (a[16] * b[9]) + (a[17] * b[14]) + (a[18] * b[19]) + a[19];
+
+	        return out;
+	    };
+
+	    /**
+	     * Create a Float32 Array and normalize the offset component to 0-1
+	     *
+	     * @private
+	     * @param {number[]} matrix - 5x4 matrix
+	     * @return {number[]} 5x4 matrix with all values between 0-1
+	     */
+	    ColorMatrixFilter.prototype._colorMatrix = function _colorMatrix (matrix)
+	    {
+	        // Create a Float32 Array and normalize the offset component to 0-1
+	        var m = new Float32Array(matrix);
+
+	        m[4] /= 255;
+	        m[9] /= 255;
+	        m[14] /= 255;
+	        m[19] /= 255;
+
+	        return m;
+	    };
+
+	    /**
+	     * Adjusts brightness
+	     *
+	     * @param {number} b - value of the brigthness (0-1, where 0 is black)
+	     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,
+	     *  just set the current matrix with @param matrix
+	     */
+	    ColorMatrixFilter.prototype.brightness = function brightness (b, multiply)
+	    {
+	        var matrix = [
+	            b, 0, 0, 0, 0,
+	            0, b, 0, 0, 0,
+	            0, 0, b, 0, 0,
+	            0, 0, 0, 1, 0 ];
+
+	        this._loadMatrix(matrix, multiply);
+	    };
+
+	    /**
+	     * Set the matrices in grey scales
+	     *
+	     * @param {number} scale - value of the grey (0-1, where 0 is black)
+	     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,
+	     *  just set the current matrix with @param matrix
+	     */
+	    ColorMatrixFilter.prototype.greyscale = function greyscale (scale, multiply)
+	    {
+	        var matrix = [
+	            scale, scale, scale, 0, 0,
+	            scale, scale, scale, 0, 0,
+	            scale, scale, scale, 0, 0,
+	            0, 0, 0, 1, 0 ];
+
+	        this._loadMatrix(matrix, multiply);
+	    };
+
+	    /**
+	     * Set the black and white matrice.
+	     *
+	     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,
+	     *  just set the current matrix with @param matrix
+	     */
+	    ColorMatrixFilter.prototype.blackAndWhite = function blackAndWhite (multiply)
+	    {
+	        var matrix = [
+	            0.3, 0.6, 0.1, 0, 0,
+	            0.3, 0.6, 0.1, 0, 0,
+	            0.3, 0.6, 0.1, 0, 0,
+	            0, 0, 0, 1, 0 ];
+
+	        this._loadMatrix(matrix, multiply);
+	    };
+
+	    /**
+	     * Set the hue property of the color
+	     *
+	     * @param {number} rotation - in degrees
+	     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,
+	     *  just set the current matrix with @param matrix
+	     */
+	    ColorMatrixFilter.prototype.hue = function hue (rotation, multiply)
+	    {
+	        rotation = (rotation || 0) / 180 * Math.PI;
+
+	        var cosR = Math.cos(rotation);
+	        var sinR = Math.sin(rotation);
+	        var sqrt = Math.sqrt;
+
+	        /* a good approximation for hue rotation
+	         This matrix is far better than the versions with magic luminance constants
+	         formerly used here, but also used in the starling framework (flash) and known from this
+	         old part of the internet: quasimondo.com/archives/000565.php
+
+	         This new matrix is based on rgb cube rotation in space. Look here for a more descriptive
+	         implementation as a shader not a general matrix:
+	         https://github.com/evanw/glfx.js/blob/58841c23919bd59787effc0333a4897b43835412/src/filters/adjust/huesaturation.js
+
+	         This is the source for the code:
+	         see http://stackoverflow.com/questions/8507885/shift-hue-of-an-rgb-color/8510751#8510751
+	         */
+
+	        var w = 1 / 3;
+	        var sqrW = sqrt(w); // weight is
+
+	        var a00 = cosR + ((1.0 - cosR) * w);
+	        var a01 = (w * (1.0 - cosR)) - (sqrW * sinR);
+	        var a02 = (w * (1.0 - cosR)) + (sqrW * sinR);
+
+	        var a10 = (w * (1.0 - cosR)) + (sqrW * sinR);
+	        var a11 = cosR + (w * (1.0 - cosR));
+	        var a12 = (w * (1.0 - cosR)) - (sqrW * sinR);
+
+	        var a20 = (w * (1.0 - cosR)) - (sqrW * sinR);
+	        var a21 = (w * (1.0 - cosR)) + (sqrW * sinR);
+	        var a22 = cosR + (w * (1.0 - cosR));
+
+	        var matrix = [
+	            a00, a01, a02, 0, 0,
+	            a10, a11, a12, 0, 0,
+	            a20, a21, a22, 0, 0,
+	            0, 0, 0, 1, 0 ];
+
+	        this._loadMatrix(matrix, multiply);
+	    };
+
+	    /**
+	     * Set the contrast matrix, increase the separation between dark and bright
+	     * Increase contrast : shadows darker and highlights brighter
+	     * Decrease contrast : bring the shadows up and the highlights down
+	     *
+	     * @param {number} amount - value of the contrast (0-1)
+	     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,
+	     *  just set the current matrix with @param matrix
+	     */
+	    ColorMatrixFilter.prototype.contrast = function contrast (amount, multiply)
+	    {
+	        var v = (amount || 0) + 1;
+	        var o = -0.5 * (v - 1);
+
+	        var matrix = [
+	            v, 0, 0, 0, o,
+	            0, v, 0, 0, o,
+	            0, 0, v, 0, o,
+	            0, 0, 0, 1, 0 ];
+
+	        this._loadMatrix(matrix, multiply);
+	    };
+
+	    /**
+	     * Set the saturation matrix, increase the separation between colors
+	     * Increase saturation : increase contrast, brightness, and sharpness
+	     *
+	     * @param {number} amount - The saturation amount (0-1)
+	     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,
+	     *  just set the current matrix with @param matrix
+	     */
+	    ColorMatrixFilter.prototype.saturate = function saturate (amount, multiply)
+	    {
+	        if ( amount === void 0 ) { amount = 0; }
+
+	        var x = (amount * 2 / 3) + 1;
+	        var y = ((x - 1) * -0.5);
+
+	        var matrix = [
+	            x, y, y, 0, 0,
+	            y, x, y, 0, 0,
+	            y, y, x, 0, 0,
+	            0, 0, 0, 1, 0 ];
+
+	        this._loadMatrix(matrix, multiply);
+	    };
+
+	    /**
+	     * Desaturate image (remove color)
+	     *
+	     * Call the saturate function
+	     *
+	     */
+	    ColorMatrixFilter.prototype.desaturate = function desaturate () // eslint-disable-line no-unused-vars
+	    {
+	        this.saturate(-1);
+	    };
+
+	    /**
+	     * Negative image (inverse of classic rgb matrix)
+	     *
+	     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,
+	     *  just set the current matrix with @param matrix
+	     */
+	    ColorMatrixFilter.prototype.negative = function negative (multiply)
+	    {
+	        var matrix = [
+	            -1, 0, 0, 1, 0,
+	            0, -1, 0, 1, 0,
+	            0, 0, -1, 1, 0,
+	            0, 0, 0, 1, 0 ];
+
+	        this._loadMatrix(matrix, multiply);
+	    };
+
+	    /**
+	     * Sepia image
+	     *
+	     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,
+	     *  just set the current matrix with @param matrix
+	     */
+	    ColorMatrixFilter.prototype.sepia = function sepia (multiply)
+	    {
+	        var matrix = [
+	            0.393, 0.7689999, 0.18899999, 0, 0,
+	            0.349, 0.6859999, 0.16799999, 0, 0,
+	            0.272, 0.5339999, 0.13099999, 0, 0,
+	            0, 0, 0, 1, 0 ];
+
+	        this._loadMatrix(matrix, multiply);
+	    };
+
+	    /**
+	     * Color motion picture process invented in 1916 (thanks Dominic Szablewski)
+	     *
+	     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,
+	     *  just set the current matrix with @param matrix
+	     */
+	    ColorMatrixFilter.prototype.technicolor = function technicolor (multiply)
+	    {
+	        var matrix = [
+	            1.9125277891456083, -0.8545344976951645, -0.09155508482755585, 0, 11.793603434377337,
+	            -0.3087833385928097, 1.7658908555458428, -0.10601743074722245, 0, -70.35205161461398,
+	            -0.231103377548616, -0.7501899197440212, 1.847597816108189, 0, 30.950940869491138,
+	            0, 0, 0, 1, 0 ];
+
+	        this._loadMatrix(matrix, multiply);
+	    };
+
+	    /**
+	     * Polaroid filter
+	     *
+	     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,
+	     *  just set the current matrix with @param matrix
+	     */
+	    ColorMatrixFilter.prototype.polaroid = function polaroid (multiply)
+	    {
+	        var matrix = [
+	            1.438, -0.062, -0.062, 0, 0,
+	            -0.122, 1.378, -0.122, 0, 0,
+	            -0.016, -0.016, 1.483, 0, 0,
+	            0, 0, 0, 1, 0 ];
+
+	        this._loadMatrix(matrix, multiply);
+	    };
+
+	    /**
+	     * Filter who transforms : Red -> Blue and Blue -> Red
+	     *
+	     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,
+	     *  just set the current matrix with @param matrix
+	     */
+	    ColorMatrixFilter.prototype.toBGR = function toBGR (multiply)
+	    {
+	        var matrix = [
+	            0, 0, 1, 0, 0,
+	            0, 1, 0, 0, 0,
+	            1, 0, 0, 0, 0,
+	            0, 0, 0, 1, 0 ];
+
+	        this._loadMatrix(matrix, multiply);
+	    };
+
+	    /**
+	     * Color reversal film introduced by Eastman Kodak in 1935. (thanks Dominic Szablewski)
+	     *
+	     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,
+	     *  just set the current matrix with @param matrix
+	     */
+	    ColorMatrixFilter.prototype.kodachrome = function kodachrome (multiply)
+	    {
+	        var matrix = [
+	            1.1285582396593525, -0.3967382283601348, -0.03992559172921793, 0, 63.72958762196502,
+	            -0.16404339962244616, 1.0835251566291304, -0.05498805115633132, 0, 24.732407896706203,
+	            -0.16786010706155763, -0.5603416277695248, 1.6014850761964943, 0, 35.62982807460946,
+	            0, 0, 0, 1, 0 ];
+
+	        this._loadMatrix(matrix, multiply);
+	    };
+
+	    /**
+	     * Brown delicious browni filter (thanks Dominic Szablewski)
+	     *
+	     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,
+	     *  just set the current matrix with @param matrix
+	     */
+	    ColorMatrixFilter.prototype.browni = function browni (multiply)
+	    {
+	        var matrix = [
+	            0.5997023498159715, 0.34553243048391263, -0.2708298674538042, 0, 47.43192855600873,
+	            -0.037703249837783157, 0.8609577587992641, 0.15059552388459913, 0, -36.96841498319127,
+	            0.24113635128153335, -0.07441037908422492, 0.44972182064877153, 0, -7.562075277591283,
+	            0, 0, 0, 1, 0 ];
+
+	        this._loadMatrix(matrix, multiply);
+	    };
+
+	    /**
+	     * Vintage filter (thanks Dominic Szablewski)
+	     *
+	     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,
+	     *  just set the current matrix with @param matrix
+	     */
+	    ColorMatrixFilter.prototype.vintage = function vintage (multiply)
+	    {
+	        var matrix = [
+	            0.6279345635605994, 0.3202183420819367, -0.03965408211312453, 0, 9.651285835294123,
+	            0.02578397704808868, 0.6441188644374771, 0.03259127616149294, 0, 7.462829176470591,
+	            0.0466055556782719, -0.0851232987247891, 0.5241648018700465, 0, 5.159190588235296,
+	            0, 0, 0, 1, 0 ];
+
+	        this._loadMatrix(matrix, multiply);
+	    };
+
+	    /**
+	     * We don't know exactly what it does, kind of gradient map, but funny to play with!
+	     *
+	     * @param {number} desaturation - Tone values.
+	     * @param {number} toned - Tone values.
+	     * @param {string} lightColor - Tone values, example: `0xFFE580`
+	     * @param {string} darkColor - Tone values, example: `0xFFE580`
+	     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,
+	     *  just set the current matrix with @param matrix
+	     */
+	    ColorMatrixFilter.prototype.colorTone = function colorTone (desaturation, toned, lightColor, darkColor, multiply)
+	    {
+	        desaturation = desaturation || 0.2;
+	        toned = toned || 0.15;
+	        lightColor = lightColor || 0xFFE580;
+	        darkColor = darkColor || 0x338000;
+
+	        var lR = ((lightColor >> 16) & 0xFF) / 255;
+	        var lG = ((lightColor >> 8) & 0xFF) / 255;
+	        var lB = (lightColor & 0xFF) / 255;
+
+	        var dR = ((darkColor >> 16) & 0xFF) / 255;
+	        var dG = ((darkColor >> 8) & 0xFF) / 255;
+	        var dB = (darkColor & 0xFF) / 255;
+
+	        var matrix = [
+	            0.3, 0.59, 0.11, 0, 0,
+	            lR, lG, lB, desaturation, 0,
+	            dR, dG, dB, toned, 0,
+	            lR - dR, lG - dG, lB - dB, 0, 0 ];
+
+	        this._loadMatrix(matrix, multiply);
+	    };
+
+	    /**
+	     * Night effect
+	     *
+	     * @param {number} intensity - The intensity of the night effect.
+	     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,
+	     *  just set the current matrix with @param matrix
+	     */
+	    ColorMatrixFilter.prototype.night = function night (intensity, multiply)
+	    {
+	        intensity = intensity || 0.1;
+	        var matrix = [
+	            intensity * (-2.0), -intensity, 0, 0, 0,
+	            -intensity, 0, intensity, 0, 0,
+	            0, intensity, intensity * 2.0, 0, 0,
+	            0, 0, 0, 1, 0 ];
+
+	        this._loadMatrix(matrix, multiply);
+	    };
+
+	    /**
+	     * Predator effect
+	     *
+	     * Erase the current matrix by setting a new indepent one
+	     *
+	     * @param {number} amount - how much the predator feels his future victim
+	     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,
+	     *  just set the current matrix with @param matrix
+	     */
+	    ColorMatrixFilter.prototype.predator = function predator (amount, multiply)
+	    {
+	        var matrix = [
+	            // row 1
+	            11.224130630493164 * amount,
+	            -4.794486999511719 * amount,
+	            -2.8746118545532227 * amount,
+	            0 * amount,
+	            0.40342438220977783 * amount,
+	            // row 2
+	            -3.6330697536468506 * amount,
+	            9.193157196044922 * amount,
+	            -2.951810836791992 * amount,
+	            0 * amount,
+	            -1.316135048866272 * amount,
+	            // row 3
+	            -3.2184197902679443 * amount,
+	            -4.2375030517578125 * amount,
+	            7.476448059082031 * amount,
+	            0 * amount,
+	            0.8044459223747253 * amount,
+	            // row 4
+	            0, 0, 0, 1, 0 ];
+
+	        this._loadMatrix(matrix, multiply);
+	    };
+
+	    /**
+	     * LSD effect
+	     *
+	     * Multiply the current matrix
+	     *
+	     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,
+	     *  just set the current matrix with @param matrix
+	     */
+	    ColorMatrixFilter.prototype.lsd = function lsd (multiply)
+	    {
+	        var matrix = [
+	            2, -0.4, 0.5, 0, 0,
+	            -0.5, 2, -0.4, 0, 0,
+	            -0.4, -0.5, 3, 0, 0,
+	            0, 0, 0, 1, 0 ];
+
+	        this._loadMatrix(matrix, multiply);
+	    };
+
+	    /**
+	     * Erase the current matrix by setting the default one
+	     *
+	     */
+	    ColorMatrixFilter.prototype.reset = function reset ()
+	    {
+	        var matrix = [
+	            1, 0, 0, 0, 0,
+	            0, 1, 0, 0, 0,
+	            0, 0, 1, 0, 0,
+	            0, 0, 0, 1, 0 ];
+
+	        this._loadMatrix(matrix, false);
+	    };
+
+	    /**
+	     * The matrix of the color matrix filter
+	     *
+	     * @member {number[]}
+	     * @default [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0]
+	     */
+	    prototypeAccessors.matrix.get = function ()
+	    {
+	        return this.uniforms.m;
+	    };
+
+	    prototypeAccessors.matrix.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        this.uniforms.m = value;
+	    };
+
+	    /**
+	     * The opacity value to use when mixing the original and resultant colors.
+	     *
+	     * When the value is 0, the original color is used without modification.
+	     * When the value is 1, the result color is used.
+	     * When in the range (0, 1) the color is interpolated between the original and result by this amount.
+	     *
+	     * @member {number}
+	     * @default 1
+	     */
+	    prototypeAccessors.alpha.get = function ()
+	    {
+	        return this.uniforms.uAlpha;
+	    };
+
+	    prototypeAccessors.alpha.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        this.uniforms.uAlpha = value;
+	    };
+
+	    Object.defineProperties( ColorMatrixFilter.prototype, prototypeAccessors );
+
+	    return ColorMatrixFilter;
+	}(Filter));
+
+	// Americanized alias
+	ColorMatrixFilter.prototype.grayscale = ColorMatrixFilter.prototype.greyscale;
+
+	/*!
+	 * @pixi/filter-displacement - v5.1.4
+	 * Compiled Fri, 20 Sep 2019 17:22:13 UTC
+	 *
+	 * @pixi/filter-displacement is licensed under the MIT License.
+	 * http://www.opensource.org/licenses/mit-license
+	 */
+
+	var vertex$3 = "attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\nuniform mat3 filterMatrix;\n\nvarying vec2 vTextureCoord;\nvarying vec2 vFilterCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n    vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n    return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n    return aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\n\nvoid main(void)\n{\n\tgl_Position = filterVertexPosition();\n\tvTextureCoord = filterTextureCoord();\n\tvFilterCoord = ( filterMatrix * vec3( vTextureCoord, 1.0)  ).xy;\n}\n";
+
+	var fragment$5 = "varying vec2 vFilterCoord;\nvarying vec2 vTextureCoord;\n\nuniform vec2 scale;\nuniform mat2 rotation;\nuniform sampler2D uSampler;\nuniform sampler2D mapSampler;\n\nuniform highp vec4 inputSize;\nuniform vec4 inputClamp;\n\nvoid main(void)\n{\n  vec4 map =  texture2D(mapSampler, vFilterCoord);\n\n  map -= 0.5;\n  map.xy = scale * inputSize.zw * (rotation * map.xy);\n\n  gl_FragColor = texture2D(uSampler, clamp(vec2(vTextureCoord.x + map.x, vTextureCoord.y + map.y), inputClamp.xy, inputClamp.zw));\n}\n";
+
+	/**
+	 * The DisplacementFilter class uses the pixel values from the specified texture
+	 * (called the displacement map) to perform a displacement of an object.
+	 *
+	 * You can use this filter to apply all manor of crazy warping effects.
+	 * Currently the `r` property of the texture is used to offset the `x`
+	 * and the `g` property of the texture is used to offset the `y`.
+	 *
+	 * The way it works is it uses the values of the displacement map to look up the
+	 * correct pixels to output. This means it's not technically moving the original.
+	 * Instead, it's starting at the output and asking "which pixel from the original goes here".
+	 * For example, if a displacement map pixel has `red = 1` and the filter scale is `20`,
+	 * this filter will output the pixel approximately 20 pixels to the right of the original.
+	 *
+	 * @class
+	 * @extends PIXI.Filter
+	 * @memberof PIXI.filters
+	 */
+	var DisplacementFilter = /*@__PURE__*/(function (Filter) {
+	    function DisplacementFilter(sprite, scale)
+	    {
+	        var maskMatrix = new Matrix();
+
+	        sprite.renderable = false;
+
+	        Filter.call(this, vertex$3, fragment$5, {
+	            mapSampler: sprite._texture,
+	            filterMatrix: maskMatrix,
+	            scale: { x: 1, y: 1 },
+	            rotation: new Float32Array([1, 0, 0, 1]),
+	        });
+
+	        this.maskSprite = sprite;
+	        this.maskMatrix = maskMatrix;
+
+	        if (scale === null || scale === undefined)
+	        {
+	            scale = 20;
+	        }
+
+	        /**
+	         * scaleX, scaleY for displacements
+	         * @member {PIXI.Point}
+	         */
+	        this.scale = new Point(scale, scale);
+	    }
+
+	    if ( Filter ) { DisplacementFilter.__proto__ = Filter; }
+	    DisplacementFilter.prototype = Object.create( Filter && Filter.prototype );
+	    DisplacementFilter.prototype.constructor = DisplacementFilter;
+
+	    var prototypeAccessors = { map: { configurable: true } };
+
+	    /**
+	     * Applies the filter.
+	     *
+	     * @param {PIXI.systems.FilterSystem} filterManager - The manager.
+	     * @param {PIXI.RenderTexture} input - The input target.
+	     * @param {PIXI.RenderTexture} output - The output target.
+	     * @param {boolean} clear - Should the output be cleared before rendering to it.
+	     */
+	    DisplacementFilter.prototype.apply = function apply (filterManager, input, output, clear)
+	    {
+	        // fill maskMatrix with _normalized sprite texture coords_
+	        this.uniforms.filterMatrix = filterManager.calculateSpriteMatrix(this.maskMatrix, this.maskSprite);
+	        this.uniforms.scale.x = this.scale.x;
+	        this.uniforms.scale.y = this.scale.y;
+
+	        // Extract rotation from world transform
+	        var wt = this.maskSprite.transform.worldTransform;
+	        var lenX = Math.sqrt((wt.a * wt.a) + (wt.b * wt.b));
+	        var lenY = Math.sqrt((wt.c * wt.c) + (wt.d * wt.d));
+
+	        if (lenX !== 0 && lenY !== 0)
+	        {
+	            this.uniforms.rotation[0] = wt.a / lenX;
+	            this.uniforms.rotation[1] = wt.b / lenX;
+	            this.uniforms.rotation[2] = wt.c / lenY;
+	            this.uniforms.rotation[3] = wt.d / lenY;
+	        }
+
+	        // draw the filter...
+	        filterManager.applyFilter(this, input, output, clear);
+	    };
+
+	    /**
+	     * The texture used for the displacement map. Must be power of 2 sized texture.
+	     *
+	     * @member {PIXI.Texture}
+	     */
+	    prototypeAccessors.map.get = function ()
+	    {
+	        return this.uniforms.mapSampler;
+	    };
+
+	    prototypeAccessors.map.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        this.uniforms.mapSampler = value;
+	    };
+
+	    Object.defineProperties( DisplacementFilter.prototype, prototypeAccessors );
+
+	    return DisplacementFilter;
+	}(Filter));
+
+	/*!
+	 * @pixi/filter-fxaa - v5.1.4
+	 * Compiled Fri, 20 Sep 2019 17:22:13 UTC
+	 *
+	 * @pixi/filter-fxaa is licensed under the MIT License.
+	 * http://www.opensource.org/licenses/mit-license
+	 */
+
+	var vertex$4 = "\nattribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 v_rgbNW;\nvarying vec2 v_rgbNE;\nvarying vec2 v_rgbSW;\nvarying vec2 v_rgbSE;\nvarying vec2 v_rgbM;\n\nvarying vec2 vFragCoord;\n\nuniform vec4 inputPixel;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n    vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n    return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvoid texcoords(vec2 fragCoord, vec2 inverseVP,\n               out vec2 v_rgbNW, out vec2 v_rgbNE,\n               out vec2 v_rgbSW, out vec2 v_rgbSE,\n               out vec2 v_rgbM) {\n    v_rgbNW = (fragCoord + vec2(-1.0, -1.0)) * inverseVP;\n    v_rgbNE = (fragCoord + vec2(1.0, -1.0)) * inverseVP;\n    v_rgbSW = (fragCoord + vec2(-1.0, 1.0)) * inverseVP;\n    v_rgbSE = (fragCoord + vec2(1.0, 1.0)) * inverseVP;\n    v_rgbM = vec2(fragCoord * inverseVP);\n}\n\nvoid main(void) {\n\n   gl_Position = filterVertexPosition();\n\n   vFragCoord = aVertexPosition * outputFrame.zw;\n\n   texcoords(vFragCoord, inputPixel.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n}\n";
+
+	var fragment$6 = "varying vec2 v_rgbNW;\nvarying vec2 v_rgbNE;\nvarying vec2 v_rgbSW;\nvarying vec2 v_rgbSE;\nvarying vec2 v_rgbM;\n\nvarying vec2 vFragCoord;\nuniform sampler2D uSampler;\nuniform highp vec4 inputPixel;\n\n\n/**\n Basic FXAA implementation based on the code on geeks3d.com with the\n modification that the texture2DLod stuff was removed since it's\n unsupported by WebGL.\n\n --\n\n From:\n https://github.com/mitsuhiko/webgl-meincraft\n\n Copyright (c) 2011 by Armin Ronacher.\n\n Some rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are\n met:\n\n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n\n * Redistributions in binary form must reproduce the above\n copyright notice, this list of conditions and the following\n disclaimer in the documentation and/or other materials provided\n with the distribution.\n\n * The names of the contributors may not be used to endorse or\n promote products derived from this software without specific\n prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n#ifndef FXAA_REDUCE_MIN\n#define FXAA_REDUCE_MIN   (1.0/ 128.0)\n#endif\n#ifndef FXAA_REDUCE_MUL\n#define FXAA_REDUCE_MUL   (1.0 / 8.0)\n#endif\n#ifndef FXAA_SPAN_MAX\n#define FXAA_SPAN_MAX     8.0\n#endif\n\n//optimized version for mobile, where dependent\n//texture reads can be a bottleneck\nvec4 fxaa(sampler2D tex, vec2 fragCoord, vec2 inverseVP,\n          vec2 v_rgbNW, vec2 v_rgbNE,\n          vec2 v_rgbSW, vec2 v_rgbSE,\n          vec2 v_rgbM) {\n    vec4 color;\n    vec3 rgbNW = texture2D(tex, v_rgbNW).xyz;\n    vec3 rgbNE = texture2D(tex, v_rgbNE).xyz;\n    vec3 rgbSW = texture2D(tex, v_rgbSW).xyz;\n    vec3 rgbSE = texture2D(tex, v_rgbSE).xyz;\n    vec4 texColor = texture2D(tex, v_rgbM);\n    vec3 rgbM  = texColor.xyz;\n    vec3 luma = vec3(0.299, 0.587, 0.114);\n    float lumaNW = dot(rgbNW, luma);\n    float lumaNE = dot(rgbNE, luma);\n    float lumaSW = dot(rgbSW, luma);\n    float lumaSE = dot(rgbSE, luma);\n    float lumaM  = dot(rgbM,  luma);\n    float lumaMin = min(lumaM, min(min(lumaNW, lumaNE), min(lumaSW, lumaSE)));\n    float lumaMax = max(lumaM, max(max(lumaNW, lumaNE), max(lumaSW, lumaSE)));\n\n    mediump vec2 dir;\n    dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));\n    dir.y =  ((lumaNW + lumaSW) - (lumaNE + lumaSE));\n\n    float dirReduce = max((lumaNW + lumaNE + lumaSW + lumaSE) *\n                          (0.25 * FXAA_REDUCE_MUL), FXAA_REDUCE_MIN);\n\n    float rcpDirMin = 1.0 / (min(abs(dir.x), abs(dir.y)) + dirReduce);\n    dir = min(vec2(FXAA_SPAN_MAX, FXAA_SPAN_MAX),\n              max(vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX),\n                  dir * rcpDirMin)) * inverseVP;\n\n    vec3 rgbA = 0.5 * (\n                       texture2D(tex, fragCoord * inverseVP + dir * (1.0 / 3.0 - 0.5)).xyz +\n                       texture2D(tex, fragCoord * inverseVP + dir * (2.0 / 3.0 - 0.5)).xyz);\n    vec3 rgbB = rgbA * 0.5 + 0.25 * (\n                                     texture2D(tex, fragCoord * inverseVP + dir * -0.5).xyz +\n                                     texture2D(tex, fragCoord * inverseVP + dir * 0.5).xyz);\n\n    float lumaB = dot(rgbB, luma);\n    if ((lumaB < lumaMin) || (lumaB > lumaMax))\n        color = vec4(rgbA, texColor.a);\n    else\n        color = vec4(rgbB, texColor.a);\n    return color;\n}\n\nvoid main() {\n\n      vec4 color;\n\n      color = fxaa(uSampler, vFragCoord, inputPixel.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n\n      gl_FragColor = color;\n}\n";
+
+	/**
+	 * Basic FXAA (Fast Approximate Anti-Aliasing) implementation based on the code on geeks3d.com
+	 * with the modification that the texture2DLod stuff was removed since it is unsupported by WebGL.
+	 *
+	 * @see https://github.com/mitsuhiko/webgl-meincraft
+	 *
+	 * @class
+	 * @extends PIXI.Filter
+	 * @memberof PIXI.filters
+	 *
+	 */
+	var FXAAFilter = /*@__PURE__*/(function (Filter) {
+	    function FXAAFilter()
+	    {
+	        // TODO - needs work
+	        Filter.call(this, vertex$4, fragment$6);
+	    }
+
+	    if ( Filter ) { FXAAFilter.__proto__ = Filter; }
+	    FXAAFilter.prototype = Object.create( Filter && Filter.prototype );
+	    FXAAFilter.prototype.constructor = FXAAFilter;
+
+	    return FXAAFilter;
+	}(Filter));
+
+	/*!
+	 * @pixi/filter-noise - v5.1.4
+	 * Compiled Fri, 20 Sep 2019 17:22:13 UTC
+	 *
+	 * @pixi/filter-noise is licensed under the MIT License.
+	 * http://www.opensource.org/licenses/mit-license
+	 */
+
+	var fragment$7 = "precision highp float;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform float uNoise;\nuniform float uSeed;\nuniform sampler2D uSampler;\n\nfloat rand(vec2 co)\n{\n    return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\n}\n\nvoid main()\n{\n    vec4 color = texture2D(uSampler, vTextureCoord);\n    float randomValue = rand(gl_FragCoord.xy * uSeed);\n    float diff = (randomValue - 0.5) * uNoise;\n\n    // Un-premultiply alpha before applying the color matrix. See issue #3539.\n    if (color.a > 0.0) {\n        color.rgb /= color.a;\n    }\n\n    color.r += diff;\n    color.g += diff;\n    color.b += diff;\n\n    // Premultiply alpha again.\n    color.rgb *= color.a;\n\n    gl_FragColor = color;\n}\n";
+
+	/**
+	 * @author Vico @vicocotea
+	 * original filter: https://github.com/evanw/glfx.js/blob/master/src/filters/adjust/noise.js
+	 */
+
+	/**
+	 * A Noise effect filter.
+	 *
+	 * @class
+	 * @extends PIXI.Filter
+	 * @memberof PIXI.filters
+	 */
+	var NoiseFilter = /*@__PURE__*/(function (Filter) {
+	    function NoiseFilter(noise, seed)
+	    {
+	        if ( noise === void 0 ) { noise = 0.5; }
+	        if ( seed === void 0 ) { seed = Math.random(); }
+
+	        Filter.call(this, defaultFilter, fragment$7, {
+	            uNoise: 0,
+	            uSeed: 0,
+	        });
+
+	        this.noise = noise;
+	        this.seed = seed;
+	    }
+
+	    if ( Filter ) { NoiseFilter.__proto__ = Filter; }
+	    NoiseFilter.prototype = Object.create( Filter && Filter.prototype );
+	    NoiseFilter.prototype.constructor = NoiseFilter;
+
+	    var prototypeAccessors = { noise: { configurable: true },seed: { configurable: true } };
+
+	    /**
+	     * The amount of noise to apply, this value should be in the range (0, 1].
+	     *
+	     * @member {number}
+	     * @default 0.5
+	     */
+	    prototypeAccessors.noise.get = function ()
+	    {
+	        return this.uniforms.uNoise;
+	    };
+
+	    prototypeAccessors.noise.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        this.uniforms.uNoise = value;
+	    };
+
+	    /**
+	     * A seed value to apply to the random noise generation. `Math.random()` is a good value to use.
+	     *
+	     * @member {number}
+	     */
+	    prototypeAccessors.seed.get = function ()
+	    {
+	        return this.uniforms.uSeed;
+	    };
+
+	    prototypeAccessors.seed.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        this.uniforms.uSeed = value;
+	    };
+
+	    Object.defineProperties( NoiseFilter.prototype, prototypeAccessors );
+
+	    return NoiseFilter;
+	}(Filter));
+
+	/*!
+	 * @pixi/mixin-cache-as-bitmap - v5.1.4
+	 * Compiled Fri, 20 Sep 2019 17:22:13 UTC
+	 *
+	 * @pixi/mixin-cache-as-bitmap is licensed under the MIT License.
+	 * http://www.opensource.org/licenses/mit-license
+	 */
+
+	var _tempMatrix = new Matrix();
+
+	DisplayObject.prototype._cacheAsBitmap = false;
+	DisplayObject.prototype._cacheData = false;
+
+	// figured theres no point adding ALL the extra variables to prototype.
+	// this model can hold the information needed. This can also be generated on demand as
+	// most objects are not cached as bitmaps.
+	/**
+	 * @class
+	 * @ignore
+	 */
+	var CacheData = function CacheData()
+	{
+	    this.textureCacheId = null;
+
+	    this.originalRender = null;
+	    this.originalRenderCanvas = null;
+	    this.originalCalculateBounds = null;
+	    this.originalGetLocalBounds = null;
+
+	    this.originalUpdateTransform = null;
+	    this.originalHitTest = null;
+	    this.originalDestroy = null;
+	    this.originalMask = null;
+	    this.originalFilterArea = null;
+	    this.sprite = null;
+	};
+
+	Object.defineProperties(DisplayObject.prototype, {
+	    /**
+	     * Set this to true if you want this display object to be cached as a bitmap.
+	     * This basically takes a snap shot of the display object as it is at that moment. It can
+	     * provide a performance benefit for complex static displayObjects.
+	     * To remove simply set this property to `false`
+	     *
+	     * IMPORTANT GOTCHA - Make sure that all your textures are preloaded BEFORE setting this property to true
+	     * as it will take a snapshot of what is currently there. If the textures have not loaded then they will not appear.
+	     *
+	     * @member {boolean}
+	     * @memberof PIXI.DisplayObject#
+	     */
+	    cacheAsBitmap: {
+	        get: function get()
+	        {
+	            return this._cacheAsBitmap;
+	        },
+	        set: function set(value)
+	        {
+	            if (this._cacheAsBitmap === value)
+	            {
+	                return;
+	            }
+
+	            this._cacheAsBitmap = value;
+
+	            var data;
+
+	            if (value)
+	            {
+	                if (!this._cacheData)
+	                {
+	                    this._cacheData = new CacheData();
+	                }
+
+	                data = this._cacheData;
+
+	                data.originalRender = this.render;
+	                data.originalRenderCanvas = this.renderCanvas;
+
+	                data.originalUpdateTransform = this.updateTransform;
+	                data.originalCalculateBounds = this.calculateBounds;
+	                data.originalGetLocalBounds = this.getLocalBounds;
+
+	                data.originalDestroy = this.destroy;
+
+	                data.originalContainsPoint = this.containsPoint;
+
+	                data.originalMask = this._mask;
+	                data.originalFilterArea = this.filterArea;
+
+	                this.render = this._renderCached;
+	                this.renderCanvas = this._renderCachedCanvas;
+
+	                this.destroy = this._cacheAsBitmapDestroy;
+	            }
+	            else
+	            {
+	                data = this._cacheData;
+
+	                if (data.sprite)
+	                {
+	                    this._destroyCachedDisplayObject();
+	                }
+
+	                this.render = data.originalRender;
+	                this.renderCanvas = data.originalRenderCanvas;
+	                this.calculateBounds = data.originalCalculateBounds;
+	                this.getLocalBounds = data.originalGetLocalBounds;
+
+	                this.destroy = data.originalDestroy;
+
+	                this.updateTransform = data.originalUpdateTransform;
+	                this.containsPoint = data.originalContainsPoint;
+
+	                this._mask = data.originalMask;
+	                this.filterArea = data.originalFilterArea;
+	            }
+	        },
+	    },
+	});
+
+	/**
+	 * Renders a cached version of the sprite with WebGL
+	 *
+	 * @private
+	 * @function _renderCached
+	 * @memberof PIXI.DisplayObject#
+	 * @param {PIXI.Renderer} renderer - the WebGL renderer
+	 */
+	DisplayObject.prototype._renderCached = function _renderCached(renderer)
+	{
+	    if (!this.visible || this.worldAlpha <= 0 || !this.renderable)
+	    {
+	        return;
+	    }
+
+	    this._initCachedDisplayObject(renderer);
+
+	    this._cacheData.sprite.transform._worldID = this.transform._worldID;
+	    this._cacheData.sprite.worldAlpha = this.worldAlpha;
+	    this._cacheData.sprite._render(renderer);
+	};
+
+	/**
+	 * Prepares the WebGL renderer to cache the sprite
+	 *
+	 * @private
+	 * @function _initCachedDisplayObject
+	 * @memberof PIXI.DisplayObject#
+	 * @param {PIXI.Renderer} renderer - the WebGL renderer
+	 */
+	DisplayObject.prototype._initCachedDisplayObject = function _initCachedDisplayObject(renderer)
+	{
+	    if (this._cacheData && this._cacheData.sprite)
+	    {
+	        return;
+	    }
+
+	    // make sure alpha is set to 1 otherwise it will get rendered as invisible!
+	    var cacheAlpha = this.alpha;
+
+	    this.alpha = 1;
+
+	    // first we flush anything left in the renderer (otherwise it would get rendered to the cached texture)
+	    renderer.batch.flush();
+	    // this.filters= [];
+
+	    // next we find the dimensions of the untransformed object
+	    // this function also calls updatetransform on all its children as part of the measuring.
+	    // This means we don't need to update the transform again in this function
+	    // TODO pass an object to clone too? saves having to create a new one each time!
+	    var bounds = this.getLocalBounds().clone();
+
+	    // add some padding!
+	    if (this.filters)
+	    {
+	        var padding = this.filters[0].padding;
+
+	        bounds.pad(padding);
+	    }
+
+	    bounds.ceil(settings.RESOLUTION);
+
+	    // for now we cache the current renderTarget that the WebGL renderer is currently using.
+	    // this could be more elegant..
+	    var cachedRenderTexture = renderer.renderTexture.current;
+	    var cachedSourceFrame = renderer.renderTexture.sourceFrame;
+	    var cachedProjectionTransform = renderer.projection.transform;
+
+	    // We also store the filter stack - I will definitely look to change how this works a little later down the line.
+	    // const stack = renderer.filterManager.filterStack;
+
+	    // this renderTexture will be used to store the cached DisplayObject
+	    var renderTexture = RenderTexture.create(bounds.width, bounds.height);
+
+	    var textureCacheId = "cacheAsBitmap_" + (uid());
+
+	    this._cacheData.textureCacheId = textureCacheId;
+
+	    BaseTexture.addToCache(renderTexture.baseTexture, textureCacheId);
+	    Texture.addToCache(renderTexture, textureCacheId);
+
+	    // need to set //
+	    var m = _tempMatrix;
+
+	    m.tx = -bounds.x;
+	    m.ty = -bounds.y;
+
+	    // reset
+	    this.transform.worldTransform.identity();
+
+	    // set all properties to there original so we can render to a texture
+	    this.render = this._cacheData.originalRender;
+
+	    renderer.render(this, renderTexture, true, m, true);
+
+	    // now restore the state be setting the new properties
+	    renderer.projection.transform = cachedProjectionTransform;
+	    renderer.renderTexture.bind(cachedRenderTexture, cachedSourceFrame);
+
+	    // renderer.filterManager.filterStack = stack;
+
+	    this.render = this._renderCached;
+	    // the rest is the same as for Canvas
+	    this.updateTransform = this.displayObjectUpdateTransform;
+	    this.calculateBounds = this._calculateCachedBounds;
+	    this.getLocalBounds = this._getCachedLocalBounds;
+
+	    this._mask = null;
+	    this.filterArea = null;
+
+	    // create our cached sprite
+	    var cachedSprite = new Sprite(renderTexture);
+
+	    cachedSprite.transform.worldTransform = this.transform.worldTransform;
+	    cachedSprite.anchor.x = -(bounds.x / bounds.width);
+	    cachedSprite.anchor.y = -(bounds.y / bounds.height);
+	    cachedSprite.alpha = cacheAlpha;
+	    cachedSprite._bounds = this._bounds;
+
+	    this._cacheData.sprite = cachedSprite;
+
+	    this.transform._parentID = -1;
+	    // restore the transform of the cached sprite to avoid the nasty flicker..
+	    if (!this.parent)
+	    {
+	        this.parent = renderer._tempDisplayObjectParent;
+	        this.updateTransform();
+	        this.parent = null;
+	    }
+	    else
+	    {
+	        this.updateTransform();
+	    }
+
+	    // map the hit test..
+	    this.containsPoint = cachedSprite.containsPoint.bind(cachedSprite);
+	};
+
+	/**
+	 * Renders a cached version of the sprite with canvas
+	 *
+	 * @private
+	 * @function _renderCachedCanvas
+	 * @memberof PIXI.DisplayObject#
+	 * @param {PIXI.Renderer} renderer - the WebGL renderer
+	 */
+	DisplayObject.prototype._renderCachedCanvas = function _renderCachedCanvas(renderer)
+	{
+	    if (!this.visible || this.worldAlpha <= 0 || !this.renderable)
+	    {
+	        return;
+	    }
+
+	    this._initCachedDisplayObjectCanvas(renderer);
+
+	    this._cacheData.sprite.worldAlpha = this.worldAlpha;
+	    this._cacheData.sprite._renderCanvas(renderer);
+	};
+
+	// TODO this can be the same as the WebGL version.. will need to do a little tweaking first though..
+	/**
+	 * Prepares the Canvas renderer to cache the sprite
+	 *
+	 * @private
+	 * @function _initCachedDisplayObjectCanvas
+	 * @memberof PIXI.DisplayObject#
+	 * @param {PIXI.Renderer} renderer - the WebGL renderer
+	 */
+	DisplayObject.prototype._initCachedDisplayObjectCanvas = function _initCachedDisplayObjectCanvas(renderer)
+	{
+	    if (this._cacheData && this._cacheData.sprite)
+	    {
+	        return;
+	    }
+
+	    // get bounds actually transforms the object for us already!
+	    var bounds = this.getLocalBounds();
+
+	    var cacheAlpha = this.alpha;
+
+	    this.alpha = 1;
+
+	    var cachedRenderTarget = renderer.context;
+
+	    bounds.ceil(settings.RESOLUTION);
+
+	    var renderTexture = RenderTexture.create(bounds.width, bounds.height);
+
+	    var textureCacheId = "cacheAsBitmap_" + (uid());
+
+	    this._cacheData.textureCacheId = textureCacheId;
+
+	    BaseTexture.addToCache(renderTexture.baseTexture, textureCacheId);
+	    Texture.addToCache(renderTexture, textureCacheId);
+
+	    // need to set //
+	    var m = _tempMatrix;
+
+	    this.transform.localTransform.copyTo(m);
+	    m.invert();
+
+	    m.tx -= bounds.x;
+	    m.ty -= bounds.y;
+
+	    // m.append(this.transform.worldTransform.)
+	    // set all properties to there original so we can render to a texture
+	    this.renderCanvas = this._cacheData.originalRenderCanvas;
+
+	    // renderTexture.render(this, m, true);
+	    renderer.render(this, renderTexture, true, m, false);
+
+	    // now restore the state be setting the new properties
+	    renderer.context = cachedRenderTarget;
+
+	    this.renderCanvas = this._renderCachedCanvas;
+	    // the rest is the same as for WebGL
+	    this.updateTransform = this.displayObjectUpdateTransform;
+	    this.calculateBounds = this._calculateCachedBounds;
+	    this.getLocalBounds = this._getCachedLocalBounds;
+
+	    this._mask = null;
+	    this.filterArea = null;
+
+	    // create our cached sprite
+	    var cachedSprite = new Sprite(renderTexture);
+
+	    cachedSprite.transform.worldTransform = this.transform.worldTransform;
+	    cachedSprite.anchor.x = -(bounds.x / bounds.width);
+	    cachedSprite.anchor.y = -(bounds.y / bounds.height);
+	    cachedSprite.alpha = cacheAlpha;
+	    cachedSprite._bounds = this._bounds;
+
+	    this._cacheData.sprite = cachedSprite;
+
+	    this.transform._parentID = -1;
+	    // restore the transform of the cached sprite to avoid the nasty flicker..
+	    if (!this.parent)
+	    {
+	        this.parent = renderer._tempDisplayObjectParent;
+	        this.updateTransform();
+	        this.parent = null;
+	    }
+	    else
+	    {
+	        this.updateTransform();
+	    }
+
+	    // map the hit test..
+	    this.containsPoint = cachedSprite.containsPoint.bind(cachedSprite);
+	};
+
+	/**
+	 * Calculates the bounds of the cached sprite
+	 *
+	 * @private
+	 */
+	DisplayObject.prototype._calculateCachedBounds = function _calculateCachedBounds()
+	{
+	    this._bounds.clear();
+	    this._cacheData.sprite.transform._worldID = this.transform._worldID;
+	    this._cacheData.sprite._calculateBounds();
+	    this._lastBoundsID = this._boundsID;
+	};
+
+	/**
+	 * Gets the bounds of the cached sprite.
+	 *
+	 * @private
+	 * @return {Rectangle} The local bounds.
+	 */
+	DisplayObject.prototype._getCachedLocalBounds = function _getCachedLocalBounds()
+	{
+	    return this._cacheData.sprite.getLocalBounds();
+	};
+
+	/**
+	 * Destroys the cached sprite.
+	 *
+	 * @private
+	 */
+	DisplayObject.prototype._destroyCachedDisplayObject = function _destroyCachedDisplayObject()
+	{
+	    this._cacheData.sprite._texture.destroy(true);
+	    this._cacheData.sprite = null;
+
+	    BaseTexture.removeFromCache(this._cacheData.textureCacheId);
+	    Texture.removeFromCache(this._cacheData.textureCacheId);
+
+	    this._cacheData.textureCacheId = null;
+	};
+
+	/**
+	 * Destroys the cached object.
+	 *
+	 * @private
+	 * @param {object|boolean} [options] - Options parameter. A boolean will act as if all options
+	 *  have been set to that value.
+	 *  Used when destroying containers, see the Container.destroy method.
+	 */
+	DisplayObject.prototype._cacheAsBitmapDestroy = function _cacheAsBitmapDestroy(options)
+	{
+	    this.cacheAsBitmap = false;
+	    this.destroy(options);
+	};
+
+	/*!
+	 * @pixi/mixin-get-child-by-name - v5.1.3
+	 * Compiled Fri, 20 Sep 2019 17:22:13 UTC
+	 *
+	 * @pixi/mixin-get-child-by-name is licensed under the MIT License.
+	 * http://www.opensource.org/licenses/mit-license
+	 */
+
+	/**
+	 * The instance name of the object.
+	 *
+	 * @memberof PIXI.DisplayObject#
+	 * @member {string} name
+	 */
+	DisplayObject.prototype.name = null;
+
+	/**
+	 * Returns the display object in the container.
+	 *
+	 * @method getChildByName
+	 * @memberof PIXI.Container#
+	 * @param {string} name - Instance name.
+	 * @return {PIXI.DisplayObject} The child with the specified name.
+	 */
+	Container.prototype.getChildByName = function getChildByName(name)
+	{
+	    for (var i = 0; i < this.children.length; i++)
+	    {
+	        if (this.children[i].name === name)
+	        {
+	            return this.children[i];
+	        }
+	    }
+
+	    return null;
+	};
+
+	/*!
+	 * @pixi/mixin-get-global-position - v5.1.3
+	 * Compiled Fri, 20 Sep 2019 17:22:13 UTC
+	 *
+	 * @pixi/mixin-get-global-position is licensed under the MIT License.
+	 * http://www.opensource.org/licenses/mit-license
+	 */
+
+	/**
+	 * Returns the global position of the displayObject. Does not depend on object scale, rotation and pivot.
+	 *
+	 * @method getGlobalPosition
+	 * @memberof PIXI.DisplayObject#
+	 * @param {PIXI.Point} [point=new PIXI.Point()] - The point to write the global value to.
+	 * @param {boolean} [skipUpdate=false] - Setting to true will stop the transforms of the scene graph from
+	 *  being updated. This means the calculation returned MAY be out of date BUT will give you a
+	 *  nice performance boost.
+	 * @return {PIXI.Point} The updated point.
+	 */
+	DisplayObject.prototype.getGlobalPosition = function getGlobalPosition(point, skipUpdate)
+	{
+	    if ( point === void 0 ) { point = new Point(); }
+	    if ( skipUpdate === void 0 ) { skipUpdate = false; }
+
+	    if (this.parent)
+	    {
+	        this.parent.toGlobal(this.position, point, skipUpdate);
+	    }
+	    else
+	    {
+	        point.x = this.position.x;
+	        point.y = this.position.y;
+	    }
+
+	    return point;
+	};
+
+	var v5 = '5.0.0';
+
+	/**
+	 * Deprecations (backward compatibilities) are automatically applied for browser bundles
+	 * in the UMD module format. If using Webpack or Rollup, you'll need to apply these
+	 * deprecations manually by doing something like this:
+	 * @example
+	 * import * as PIXI from 'pixi.js';
+	 * PIXI.useDeprecated(); // MUST be bound to namespace
+	 * @memberof PIXI
+	 * @function useDeprecated
+	 */
+	function useDeprecated()
+	{
+	    var PIXI = this;
+
+	    Object.defineProperties(PIXI, {
+	        /**
+	         * @constant {RegExp|string} SVG_SIZE
+	         * @memberof PIXI
+	         * @see PIXI.resources.SVGResource.SVG_SIZE
+	         * @deprecated since 5.0.0
+	         */
+	        SVG_SIZE: {
+	            get: function get()
+	            {
+	                deprecation(v5, 'PIXI.utils.SVG_SIZE property has moved to PIXI.resources.SVGResource.SVG_SIZE');
+
+	                return PIXI.SVGResource.SVG_SIZE;
+	            },
+	        },
+
+	        /**
+	         * @class PIXI.TransformStatic
+	         * @deprecated since 5.0.0
+	         * @see PIXI.Transform
+	         */
+	        TransformStatic: {
+	            get: function get()
+	            {
+	                deprecation(v5, 'PIXI.TransformStatic class has been removed, use PIXI.Transform');
+
+	                return PIXI.Transform;
+	            },
+	        },
+
+	        /**
+	         * @class PIXI.TransformBase
+	         * @deprecated since 5.0.0
+	         * @see PIXI.Transform
+	         */
+	        TransformBase: {
+	            get: function get()
+	            {
+	                deprecation(v5, 'PIXI.TransformBase class has been removed, use PIXI.Transform');
+
+	                return PIXI.Transform;
+	            },
+	        },
+
+	        /**
+	         * Constants that specify the transform type.
+	         *
+	         * @static
+	         * @constant
+	         * @name TRANSFORM_MODE
+	         * @memberof PIXI
+	         * @enum {number}
+	         * @deprecated since 5.0.0
+	         * @property {number} STATIC
+	         * @property {number} DYNAMIC
+	         */
+	        TRANSFORM_MODE: {
+	            get: function get()
+	            {
+	                deprecation(v5, 'PIXI.TRANSFORM_MODE property has been removed');
+
+	                return { STATIC: 0, DYNAMIC: 1 };
+	            },
+	        },
+
+	        /**
+	         * @class PIXI.WebGLRenderer
+	         * @see PIXI.Renderer
+	         * @deprecated since 5.0.0
+	         */
+	        WebGLRenderer: {
+	            get: function get()
+	            {
+	                deprecation(v5, 'PIXI.WebGLRenderer class has moved to PIXI.Renderer');
+
+	                return PIXI.Renderer;
+	            },
+	        },
+
+	        /**
+	         * @class PIXI.CanvasRenderTarget
+	         * @see PIXI.utils.CanvasRenderTarget
+	         * @deprecated since 5.0.0
+	         */
+	        CanvasRenderTarget: {
+	            get: function get()
+	            {
+	                deprecation(v5, 'PIXI.CanvasRenderTarget class has moved to PIXI.utils.CanvasRenderTarget');
+
+	                return PIXI.utils.CanvasRenderTarget;
+	            },
+	        },
+
+	        /**
+	         * @memberof PIXI
+	         * @name loader
+	         * @type {PIXI.Loader}
+	         * @see PIXI.Loader.shared
+	         * @deprecated since 5.0.0
+	         */
+	        loader: {
+	            get: function get()
+	            {
+	                deprecation(v5, 'PIXI.loader instance has moved to PIXI.Loader.shared');
+
+	                return PIXI.Loader.shared;
+	            },
+	        },
+
+	        /**
+	         * @class PIXI.FilterManager
+	         * @see PIXI.systems.FilterSystem
+	         * @deprecated since 5.0.0
+	         */
+	        FilterManager: {
+	            get: function get()
+	            {
+	                deprecation(v5, 'PIXI.FilterManager class has moved to PIXI.systems.FilterSystem');
+
+	                return PIXI.systems.FilterSystem;
+	            },
+	        },
+	    });
+
+	    /**
+	     * This namespace has been removed. All classes previous nested
+	     * under this namespace have been moved to the top-level `PIXI` object.
+	     * @namespace PIXI.extras
+	     * @deprecated since 5.0.0
+	     */
+	    PIXI.extras = {};
+
+	    Object.defineProperties(PIXI.extras, {
+	        /**
+	         * @class PIXI.extras.TilingSprite
+	         * @see PIXI.TilingSprite
+	         * @deprecated since 5.0.0
+	         */
+	        TilingSprite: {
+	            get: function get()
+	            {
+	                deprecation(v5, 'PIXI.extras.TilingSprite class has moved to PIXI.TilingSprite');
+
+	                return PIXI.TilingSprite;
+	            },
+	        },
+	        /**
+	         * @class PIXI.extras.TilingSpriteRenderer
+	         * @see PIXI.TilingSpriteRenderer
+	         * @deprecated since 5.0.0
+	         */
+	        TilingSpriteRenderer: {
+	            get: function get()
+	            {
+	                deprecation(v5, 'PIXI.extras.TilingSpriteRenderer class has moved to PIXI.TilingSpriteRenderer');
+
+	                return PIXI.TilingSpriteRenderer;
+	            },
+	        },
+	        /**
+	         * @class PIXI.extras.AnimatedSprite
+	         * @see PIXI.AnimatedSprite
+	         * @deprecated since 5.0.0
+	         */
+	        AnimatedSprite: {
+	            get: function get()
+	            {
+	                deprecation(v5, 'PIXI.extras.AnimatedSprite class has moved to PIXI.AnimatedSprite');
+
+	                return PIXI.AnimatedSprite;
+	            },
+	        },
+	        /**
+	         * @class PIXI.extras.BitmapText
+	         * @see PIXI.BitmapText
+	         * @deprecated since 5.0.0
+	         */
+	        BitmapText: {
+	            get: function get()
+	            {
+	                deprecation(v5, 'PIXI.extras.BitmapText class has moved to PIXI.BitmapText');
+
+	                return PIXI.BitmapText;
+	            },
+	        },
+	    });
+
+	    Object.defineProperties(PIXI.utils, {
+	        /**
+	         * @function PIXI.utils.getSvgSize
+	         * @see PIXI.resources.SVGResource.getSize
+	         * @deprecated since 5.0.0
+	         */
+	        getSvgSize: {
+	            get: function get()
+	            {
+	                deprecation(v5, 'PIXI.utils.getSvgSize function has moved to PIXI.resources.SVGResource.getSize');
+
+	                return PIXI.SVGResource.getSize;
+	            },
+	        },
+	    });
+
+	    /**
+	     * All classes on this namespace have moved to the high-level `PIXI` object.
+	     * @namespace PIXI.mesh
+	     * @deprecated since 5.0.0
+	     */
+	    PIXI.mesh = {};
+
+	    Object.defineProperties(PIXI.mesh, {
+	        /**
+	         * @class PIXI.mesh.Mesh
+	         * @see PIXI.SimpleMesh
+	         * @deprecated since 5.0.0
+	         */
+	        Mesh: {
+	            get: function get()
+	            {
+	                deprecation(v5, 'PIXI.mesh.Mesh class has moved to PIXI.SimpleMesh');
+
+	                return PIXI.SimpleMesh;
+	            },
+	        },
+	        /**
+	         * @class PIXI.mesh.NineSlicePlane
+	         * @see PIXI.NineSlicePlane
+	         * @deprecated since 5.0.0
+	         */
+	        NineSlicePlane: {
+	            get: function get()
+	            {
+	                deprecation(v5, 'PIXI.mesh.NineSlicePlane class has moved to PIXI.NineSlicePlane');
+
+	                return PIXI.NineSlicePlane;
+	            },
+	        },
+	        /**
+	         * @class PIXI.mesh.Plane
+	         * @see PIXI.SimplePlane
+	         * @deprecated since 5.0.0
+	         */
+	        Plane: {
+	            get: function get()
+	            {
+	                deprecation(v5, 'PIXI.mesh.Plane class has moved to PIXI.SimplePlane');
+
+	                return PIXI.SimplePlane;
+	            },
+	        },
+	        /**
+	         * @class PIXI.mesh.Rope
+	         * @see PIXI.SimpleRope
+	         * @deprecated since 5.0.0
+	         */
+	        Rope: {
+	            get: function get()
+	            {
+	                deprecation(v5, 'PIXI.mesh.Rope class has moved to PIXI.SimpleRope');
+
+	                return PIXI.SimpleRope;
+	            },
+	        },
+	        /**
+	         * @class PIXI.mesh.RawMesh
+	         * @see PIXI.Mesh
+	         * @deprecated since 5.0.0
+	         */
+	        RawMesh: {
+	            get: function get()
+	            {
+	                deprecation(v5, 'PIXI.mesh.RawMesh class has moved to PIXI.Mesh');
+
+	                return PIXI.Mesh;
+	            },
+	        },
+	        /**
+	         * @class PIXI.mesh.CanvasMeshRenderer
+	         * @see PIXI.CanvasMeshRenderer
+	         * @deprecated since 5.0.0
+	         */
+	        CanvasMeshRenderer: {
+	            get: function get()
+	            {
+	                deprecation(v5, 'PIXI.mesh.CanvasMeshRenderer class has moved to PIXI.CanvasMeshRenderer');
+
+	                return PIXI.CanvasMeshRenderer;
+	            },
+	        },
+	        /**
+	         * @class PIXI.mesh.MeshRenderer
+	         * @see PIXI.MeshRenderer
+	         * @deprecated since 5.0.0
+	         */
+	        MeshRenderer: {
+	            get: function get()
+	            {
+	                deprecation(v5, 'PIXI.mesh.MeshRenderer class has moved to PIXI.MeshRenderer');
+
+	                return PIXI.MeshRenderer;
+	            },
+	        },
+	    });
+
+	    /**
+	     * This namespace has been removed and items have been moved to
+	     * the top-level `PIXI` object.
+	     * @namespace PIXI.particles
+	     * @deprecated since 5.0.0
+	     */
+	    PIXI.particles = {};
+
+	    Object.defineProperties(PIXI.particles, {
+	        /**
+	         * @class PIXI.particles.ParticleContainer
+	         * @deprecated since 5.0.0
+	         * @see PIXI.ParticleContainer
+	         */
+	        ParticleContainer: {
+	            get: function get()
+	            {
+	                deprecation(v5, 'PIXI.particles.ParticleContainer class has moved to PIXI.ParticleContainer');
+
+	                return PIXI.ParticleContainer;
+	            },
+	        },
+	        /**
+	         * @class PIXI.particles.ParticleRenderer
+	         * @deprecated since 5.0.0
+	         * @see PIXI.ParticleRenderer
+	         */
+	        ParticleRenderer: {
+	            get: function get()
+	            {
+	                deprecation(v5, 'PIXI.particles.ParticleRenderer class has moved to PIXI.ParticleRenderer');
+
+	                return PIXI.ParticleRenderer;
+	            },
+	        },
+	    });
+
+	    /**
+	     * This namespace has been removed and items have been moved to
+	     * the top-level `PIXI` object.
+	     * @namespace PIXI.ticker
+	     * @deprecated since 5.0.0
+	     */
+	    PIXI.ticker = {};
+
+	    Object.defineProperties(PIXI.ticker, {
+	        /**
+	         * @class PIXI.ticker.Ticker
+	         * @deprecated since 5.0.0
+	         * @see PIXI.Ticker
+	         */
+	        Ticker: {
+	            get: function get()
+	            {
+	                deprecation(v5, 'PIXI.ticker.Ticker class has moved to PIXI.Ticker');
+
+	                return PIXI.Ticker;
+	            },
+	        },
+	        /**
+	         * @name PIXI.ticker.shared
+	         * @type {PIXI.Ticker}
+	         * @deprecated since 5.0.0
+	         * @see PIXI.Ticker.shared
+	         */
+	        shared: {
+	            get: function get()
+	            {
+	                deprecation(v5, 'PIXI.ticker.shared instance has moved to PIXI.Ticker.shared');
+
+	                return PIXI.Ticker.shared;
+	            },
+	        },
+	    });
+
+	    /**
+	     * All classes on this namespace have moved to the high-level `PIXI` object.
+	     * @namespace PIXI.loaders
+	     * @deprecated since 5.0.0
+	     */
+	    PIXI.loaders = {};
+
+	    Object.defineProperties(PIXI.loaders, {
+	        /**
+	         * @class PIXI.loaders.Loader
+	         * @see PIXI.Loader
+	         * @deprecated since 5.0.0
+	         */
+	        Loader: {
+	            get: function get()
+	            {
+	                deprecation(v5, 'PIXI.loaders.Loader class has moved to PIXI.Loader');
+
+	                return PIXI.Loader;
+	            },
+	        },
+	        /**
+	         * @class PIXI.loaders.Resource
+	         * @see PIXI.LoaderResource
+	         * @deprecated since 5.0.0
+	         */
+	        Resource: {
+	            get: function get()
+	            {
+	                deprecation(v5, 'PIXI.loaders.Resource class has moved to PIXI.LoaderResource');
+
+	                return PIXI.LoaderResource;
+	            },
+	        },
+	        /**
+	         * @function PIXI.loaders.bitmapFontParser
+	         * @see PIXI.BitmapFontLoader.use
+	         * @deprecated since 5.0.0
+	         */
+	        bitmapFontParser: {
+	            get: function get()
+	            {
+	                deprecation(v5, 'PIXI.loaders.bitmapFontParser function has moved to PIXI.BitmapFontLoader.use');
+
+	                return PIXI.BitmapFontLoader.use;
+	            },
+	        },
+	        /**
+	         * @function PIXI.loaders.parseBitmapFontData
+	         * @see PIXI.BitmapFontLoader.parse
+	         * @deprecated since 5.0.0
+	         */
+	        parseBitmapFontData: {
+	            get: function get()
+	            {
+	                deprecation(v5, 'PIXI.loaders.parseBitmapFontData function has moved to PIXI.BitmapFontLoader.parse');
+
+	                return PIXI.BitmapFontLoader.parse;
+	            },
+	        },
+	        /**
+	         * @function PIXI.loaders.spritesheetParser
+	         * @see PIXI.SpritesheetLoader.use
+	         * @deprecated since 5.0.0
+	         */
+	        spritesheetParser: {
+	            get: function get()
+	            {
+	                deprecation(v5, 'PIXI.loaders.spritesheetParser function has moved to PIXI.SpritesheetLoader.use');
+
+	                return PIXI.SpritesheetLoader.use;
+	            },
+	        },
+	        /**
+	         * @function PIXI.loaders.getResourcePath
+	         * @see PIXI.SpritesheetLoader.getResourcePath
+	         * @deprecated since 5.0.0
+	         */
+	        getResourcePath: {
+	            get: function get()
+	            {
+	                deprecation(v5, 'PIXI.loaders.getResourcePath property has moved to PIXI.SpritesheetLoader.getResourcePath');
+
+	                return PIXI.SpritesheetLoader.getResourcePath;
+	            },
+	        },
+	    });
+
+	    /**
+	     * @function PIXI.loaders.Loader.addPixiMiddleware
+	     * @see PIXI.Loader.registerPlugin
+	     * @deprecated since 5.0.0
+	     * @param {function} middleware
+	     */
+	    PIXI.Loader.addPixiMiddleware = function addPixiMiddleware(middleware)
+	    {
+	        deprecation(v5,
+	            'PIXI.loaders.Loader.addPixiMiddleware function is deprecated, use PIXI.loaders.Loader.registerPlugin'
+	        );
+
+	        return PIXI.loaders.Loader.registerPlugin({ use: middleware() });
+	    };
+
+	    /**
+	     * @class PIXI.extract.WebGLExtract
+	     * @deprecated since 5.0.0
+	     * @see PIXI.extract.Extract
+	     */
+	    Object.defineProperty(PIXI.extract, 'WebGLExtract', {
+	        get: function get()
+	        {
+	            deprecation(v5, 'PIXI.extract.WebGLExtract method has moved to PIXI.extract.Extract');
+
+	            return PIXI.extract.Extract;
+	        },
+	    });
+
+	    /**
+	     * @class PIXI.prepare.WebGLPrepare
+	     * @deprecated since 5.0.0
+	     * @see PIXI.prepare.Prepare
+	     */
+	    Object.defineProperty(PIXI.prepare, 'WebGLPrepare', {
+	        get: function get()
+	        {
+	            deprecation(v5, 'PIXI.prepare.WebGLPrepare class has moved to PIXI.prepare.Prepare');
+
+	            return PIXI.prepare.Prepare;
+	        },
+	    });
+
+	    /**
+	     * @method PIXI.Container#_renderWebGL
+	     * @private
+	     * @deprecated since 5.0.0
+	     * @see PIXI.Container#render
+	     * @param {PIXI.Renderer} renderer Instance of renderer
+	     */
+	    PIXI.Container.prototype._renderWebGL = function _renderWebGL(renderer)
+	    {
+	        deprecation(v5, 'PIXI.Container._renderWebGL method has moved to PIXI.Container._render');
+
+	        this._render(renderer);
+	    };
+
+	    /**
+	     * @method PIXI.Container#renderWebGL
+	     * @deprecated since 5.0.0
+	     * @see PIXI.Container#render
+	     * @param {PIXI.Renderer} renderer Instance of renderer
+	     */
+	    PIXI.Container.prototype.renderWebGL = function renderWebGL(renderer)
+	    {
+	        deprecation(v5, 'PIXI.Container.renderWebGL method has moved to PIXI.Container.render');
+
+	        this.render(renderer);
+	    };
+
+	    /**
+	     * @method PIXI.DisplayObject#renderWebGL
+	     * @deprecated since 5.0.0
+	     * @see PIXI.DisplayObject#render
+	     * @param {PIXI.Renderer} renderer Instance of renderer
+	     */
+	    PIXI.DisplayObject.prototype.renderWebGL = function renderWebGL(renderer)
+	    {
+	        deprecation(v5, 'PIXI.DisplayObject.renderWebGL method has moved to PIXI.DisplayObject.render');
+
+	        this.render(renderer);
+	    };
+
+	    /**
+	     * @method PIXI.Container#renderAdvancedWebGL
+	     * @deprecated since 5.0.0
+	     * @see PIXI.Container#renderAdvanced
+	     * @param {PIXI.Renderer} renderer Instance of renderer
+	     */
+	    PIXI.Container.prototype.renderAdvancedWebGL = function renderAdvancedWebGL(renderer)
+	    {
+	        deprecation(v5, 'PIXI.Container.renderAdvancedWebGL method has moved to PIXI.Container.renderAdvanced');
+
+	        this.renderAdvanced(renderer);
+	    };
+
+	    Object.defineProperties(PIXI.settings, {
+	        /**
+	         * Default transform type.
+	         *
+	         * @static
+	         * @deprecated since 5.0.0
+	         * @memberof PIXI.settings
+	         * @type {PIXI.TRANSFORM_MODE}
+	         * @default PIXI.TRANSFORM_MODE.STATIC
+	         */
+	        TRANSFORM_MODE: {
+	            get: function get()
+	            {
+	                deprecation(v5, 'PIXI.settings.TRANSFORM_MODE property has been removed');
+
+	                return 0;
+	            },
+	            set: function set()
+	            {
+	                deprecation(v5, 'PIXI.settings.TRANSFORM_MODE property has been removed');
+	            },
+	        },
+	    });
+
+	    var BaseTexture = PIXI.BaseTexture;
+
+	    /**
+	     * @method loadSource
+	     * @memberof PIXI.BaseTexture#
+	     * @deprecated since 5.0.0
+	     */
+	    BaseTexture.prototype.loadSource = function loadSource(image)
+	    {
+	        deprecation(v5, 'PIXI.BaseTexture.loadSource method has been deprecated');
+
+	        var resource = PIXI.resources.autoDetectResource(image);
+
+	        resource.internal = true;
+
+	        this.setResource(resource);
+	        this.update();
+	    };
+
+	    Object.defineProperties(BaseTexture.prototype, {
+	        /**
+	         * @name PIXI.BaseTexture#hasLoaded
+	         * @type {boolean}
+	         * @deprecated since 5.0.0
+	         * @readonly
+	         * @see PIXI.BaseTexture#valid
+	         */
+	        hasLoaded: {
+	            get: function get()
+	            {
+	                deprecation(v5, 'PIXI.BaseTexture.hasLoaded property has been removed, use PIXI.BaseTexture.valid');
+
+	                return this.valid;
+	            },
+	        },
+	        /**
+	         * @name PIXI.BaseTexture#imageUrl
+	         * @type {string}
+	         * @deprecated since 5.0.0
+	         * @see PIXI.resource.ImageResource#url
+	         */
+	        imageUrl: {
+	            get: function get()
+	            {
+	                deprecation(v5, 'PIXI.BaseTexture.imageUrl property has been removed, use PIXI.BaseTexture.resource.url');
+
+	                return this.resource && this.resource.url;
+	            },
+
+	            set: function set(imageUrl)
+	            {
+	                deprecation(v5, 'PIXI.BaseTexture.imageUrl property has been removed, use PIXI.BaseTexture.resource.url');
+
+	                if (this.resource)
+	                {
+	                    this.resource.url = imageUrl;
+	                }
+	            },
+	        },
+	        /**
+	         * @name PIXI.BaseTexture#source
+	         * @type {HTMLImageElement|HTMLCanvasElement|HTMLVideoElement|SVGElement}
+	         * @deprecated since 5.0.0
+	         * @readonly
+	         * @see PIXI.resources.BaseImageResource#source
+	         */
+	        source: {
+	            get: function get()
+	            {
+	                deprecation(v5, 'PIXI.BaseTexture.source property has been moved, use `PIXI.BaseTexture.resource.source`');
+
+	                return this.resource && this.resource.source;
+	            },
+	            set: function set(source)
+	            {
+	                deprecation(v5, 'PIXI.BaseTexture.source property has been moved, use `PIXI.BaseTexture.resource.source` '
+	                    + 'if you want to set HTMLCanvasElement. Otherwise, create new BaseTexture.');
+
+	                if (this.resource)
+	                {
+	                    this.resource.source = source;
+	                }
+	            },
+	        },
+	    });
+
+	    /**
+	     * @method fromImage
+	     * @static
+	     * @memberof PIXI.BaseTexture
+	     * @deprecated since 5.0.0
+	     * @see PIXI.BaseTexture.from
+	     */
+	    BaseTexture.fromImage = function fromImage(canvas, crossorigin, scaleMode, scale)
+	    {
+	        deprecation(v5, 'PIXI.BaseTexture.fromImage method has been replaced with PIXI.BaseTexture.from');
+
+	        var resourceOptions = { scale: scale, crossorigin: crossorigin };
+
+	        return BaseTexture.from(canvas, { scaleMode: scaleMode, resourceOptions: resourceOptions });
+	    };
+
+	    /**
+	     * @method fromCanvas
+	     * @static
+	     * @memberof PIXI.BaseTexture
+	     * @deprecated since 5.0.0
+	     * @see PIXI.BaseTexture.from
+	     */
+	    BaseTexture.fromCanvas = function fromCanvas(canvas, scaleMode)
+	    {
+	        deprecation(v5, 'PIXI.BaseTexture.fromCanvas method has been replaced with PIXI.BaseTexture.from');
+
+	        return BaseTexture.from(canvas, { scaleMode: scaleMode });
+	    };
+
+	    /**
+	     * @method fromSVG
+	     * @static
+	     * @memberof PIXI.BaseTexture
+	     * @deprecated since 5.0.0
+	     * @see PIXI.BaseTexture.from
+	     */
+	    BaseTexture.fromSVG = function fromSVG(canvas, crossorigin, scaleMode, scale)
+	    {
+	        deprecation(v5, 'PIXI.BaseTexture.fromSVG method has been replaced with PIXI.BaseTexture.from');
+
+	        var resourceOptions = { scale: scale, crossorigin: crossorigin };
+
+	        return BaseTexture.from(canvas, { scaleMode: scaleMode, resourceOptions: resourceOptions });
+	    };
+
+	    /**
+	     * @method PIXI.Point#copy
+	     * @deprecated since 5.0.0
+	     * @see PIXI.Point#copyFrom
+	     */
+	    PIXI.Point.prototype.copy = function copy(p)
+	    {
+	        deprecation(v5, 'PIXI.Point.copy method has been replaced with PIXI.Point.copyFrom');
+
+	        return this.copyFrom(p);
+	    };
+
+	    /**
+	     * @method PIXI.ObservablePoint#copy
+	     * @deprecated since 5.0.0
+	     * @see PIXI.ObservablePoint#copyFrom
+	     */
+	    PIXI.ObservablePoint.prototype.copy = function copy(p)
+	    {
+	        deprecation(v5, 'PIXI.ObservablePoint.copy method has been replaced with PIXI.ObservablePoint.copyFrom');
+
+	        return this.copyFrom(p);
+	    };
+
+	    /**
+	     * @method PIXI.Rectangle#copy
+	     * @deprecated since 5.0.0
+	     * @see PIXI.Rectangle#copyFrom
+	     */
+	    PIXI.Rectangle.prototype.copy = function copy(p)
+	    {
+	        deprecation(v5, 'PIXI.Rectangle.copy method has been replaced with PIXI.Rectangle.copyFrom');
+
+	        return this.copyFrom(p);
+	    };
+
+	    /**
+	     * @method PIXI.Matrix#copy
+	     * @deprecated since 5.0.0
+	     * @see PIXI.Matrix#copyTo
+	     */
+	    PIXI.Matrix.prototype.copy = function copy(p)
+	    {
+	        deprecation(v5, 'PIXI.Matrix.copy method has been replaced with PIXI.Matrix.copyTo');
+
+	        return this.copyTo(p);
+	    };
+
+	    /**
+	     * @method PIXI.systems.StateSystem#setState
+	     * @deprecated since 5.1.0
+	     * @see PIXI.systems.StateSystem#set
+	     */
+	    PIXI.systems.StateSystem.prototype.setState = function setState(s)
+	    {
+	        deprecation('v5.1.0', 'StateSystem.setState has been renamed to StateSystem.set');
+
+	        return this.set(s);
+	    };
+
+	    Object.assign(PIXI.systems.FilterSystem.prototype, {
+	        /**
+	         * @method PIXI.FilterManager#getRenderTarget
+	         * @deprecated since 5.0.0
+	         * @see PIXI.systems.FilterSystem#getFilterTexture
+	         */
+	        getRenderTarget: function getRenderTarget(clear, resolution)
+	        {
+	            deprecation(v5,
+	                'PIXI.FilterManager.getRenderTarget method has been replaced with PIXI.systems.FilterSystem#getFilterTexture'
+	            );
+
+	            return this.getFilterTexture(resolution);
+	        },
+
+	        /**
+	         * @method PIXI.FilterManager#returnRenderTarget
+	         * @deprecated since 5.0.0
+	         * @see PIXI.systems.FilterSystem#returnFilterTexture
+	         */
+	        returnRenderTarget: function returnRenderTarget(renderTexture)
+	        {
+	            deprecation(v5,
+	                'PIXI.FilterManager.returnRenderTarget method has been replaced with '
+	                + 'PIXI.systems.FilterSystem.returnFilterTexture'
+	            );
+
+	            this.returnFilterTexture(renderTexture);
+	        },
+
+	        /**
+	         * @method PIXI.systems.FilterSystem#calculateScreenSpaceMatrix
+	         * @deprecated since 5.0.0
+	         * @param {PIXI.Matrix} outputMatrix - the matrix to output to.
+	         * @return {PIXI.Matrix} The mapped matrix.
+	         */
+	        calculateScreenSpaceMatrix: function calculateScreenSpaceMatrix(outputMatrix)
+	        {
+	            deprecation(v5, 'PIXI.systems.FilterSystem.calculateScreenSpaceMatrix method is removed, '
+	                + 'use `(vTextureCoord * inputSize.xy) + outputFrame.xy` instead');
+
+	            var mappedMatrix = outputMatrix.identity();
+	            var ref = this.activeState;
+	            var sourceFrame = ref.sourceFrame;
+	            var destinationFrame = ref.destinationFrame;
+
+	            mappedMatrix.translate(sourceFrame.x / destinationFrame.width, sourceFrame.y / destinationFrame.height);
+	            mappedMatrix.scale(destinationFrame.width, destinationFrame.height);
+
+	            return mappedMatrix;
+	        },
+
+	        /**
+	         * @method PIXI.systems.FilterSystem#calculateNormalizedScreenSpaceMatrix
+	         * @deprecated since 5.0.0
+	         * @param {PIXI.Matrix} outputMatrix - The matrix to output to.
+	         * @return {PIXI.Matrix} The mapped matrix.
+	         */
+	        calculateNormalizedScreenSpaceMatrix: function calculateNormalizedScreenSpaceMatrix(outputMatrix)
+	        {
+	            deprecation(v5, 'PIXI.systems.FilterManager.calculateNormalizedScreenSpaceMatrix method is removed, '
+	                + 'use `((vTextureCoord * inputSize.xy) + outputFrame.xy) / outputFrame.zw` instead.');
+
+	            var ref = this.activeState;
+	            var sourceFrame = ref.sourceFrame;
+	            var destinationFrame = ref.destinationFrame;
+	            var mappedMatrix = outputMatrix.identity();
+
+	            mappedMatrix.translate(sourceFrame.x / destinationFrame.width, sourceFrame.y / destinationFrame.height);
+
+	            var translateScaleX = (destinationFrame.width / sourceFrame.width);
+	            var translateScaleY = (destinationFrame.height / sourceFrame.height);
+
+	            mappedMatrix.scale(translateScaleX, translateScaleY);
+
+	            return mappedMatrix;
+	        },
+	    });
+
+	    Object.defineProperties(PIXI.RenderTexture.prototype, {
+	        /**
+	         * @name PIXI.RenderTexture#sourceFrame
+	         * @type {PIXI.Rectangle}
+	         * @deprecated since 5.0.0
+	         * @readonly
+	         */
+	        sourceFrame: {
+	            get: function get()
+	            {
+	                deprecation(v5, 'PIXI.RenderTexture.sourceFrame property has been removed');
+
+	                return this.filterFrame;
+	            },
+	        },
+	        /**
+	         * @name PIXI.RenderTexture#size
+	         * @type {PIXI.Rectangle}
+	         * @deprecated since 5.0.0
+	         * @readonly
+	         */
+	        size: {
+	            get: function get()
+	            {
+	                deprecation(v5, 'PIXI.RenderTexture.size property has been removed');
+
+	                return this._frame;
+	            },
+	        },
+	    });
+
+	    /**
+	     * @class BlurXFilter
+	     * @memberof PIXI.filters
+	     * @deprecated since 5.0.0
+	     * @see PIXI.filters.BlurFilterPass
+	     */
+	    var BlurXFilter = /*@__PURE__*/(function (superclass) {
+	        function BlurXFilter(strength, quality, resolution, kernelSize)
+	        {
+	            deprecation(v5, 'PIXI.filters.BlurXFilter class is deprecated, use PIXI.filters.BlurFilterPass');
+
+	            superclass.call(this, true, strength, quality, resolution, kernelSize);
+	        }
+
+	        if ( superclass ) BlurXFilter.__proto__ = superclass;
+	        BlurXFilter.prototype = Object.create( superclass && superclass.prototype );
+	        BlurXFilter.prototype.constructor = BlurXFilter;
+
+	        return BlurXFilter;
+	    }(PIXI.filters.BlurFilterPass));
+
+	    /**
+	     * @class BlurYFilter
+	     * @memberof PIXI.filters
+	     * @deprecated since 5.0.0
+	     * @see PIXI.filters.BlurFilterPass
+	     */
+	    var BlurYFilter = /*@__PURE__*/(function (superclass) {
+	        function BlurYFilter(strength, quality, resolution, kernelSize)
+	        {
+	            deprecation(v5, 'PIXI.filters.BlurYFilter class is deprecated, use PIXI.filters.BlurFilterPass');
+
+	            superclass.call(this, false, strength, quality, resolution, kernelSize);
+	        }
+
+	        if ( superclass ) BlurYFilter.__proto__ = superclass;
+	        BlurYFilter.prototype = Object.create( superclass && superclass.prototype );
+	        BlurYFilter.prototype.constructor = BlurYFilter;
+
+	        return BlurYFilter;
+	    }(PIXI.filters.BlurFilterPass));
+
+	    Object.assign(PIXI.filters, {
+	        BlurXFilter: BlurXFilter,
+	        BlurYFilter: BlurYFilter,
+	    });
+
+	    var Sprite = PIXI.Sprite;
+	    var Texture = PIXI.Texture;
+	    var Graphics = PIXI.Graphics;
+
+	    // Support for pixi.js-legacy bifurcation
+	    // give users a friendly assist to use legacy
+	    if (!Graphics.prototype.generateCanvasTexture)
+	    {
+	        Graphics.prototype.generateCanvasTexture = function generateCanvasTexture()
+	        {
+	            deprecation(v5, 'PIXI.Graphics.generateCanvasTexture method is only available in "pixi.js-legacy"');
+	        };
+	    }
+
+	    /**
+	     * @deprecated since 5.0.0
+	     * @member {PIXI.Graphics} PIXI.Graphics#graphicsData
+	     * @see PIXI.Graphics#geometry
+	     * @readonly
+	     */
+	    Object.defineProperty(PIXI.Graphics.prototype, 'graphicsData', {
+	        get: function get()
+	        {
+	            deprecation(v5, 'PIXI.Graphics.graphicsData property is deprecated, use PIXI.Graphics.geometry.graphicsData');
+
+	            return this.geometry.graphicsData;
+	        },
+	    });
+
+	    // Use these to deprecate all the Sprite from* methods
+	    function spriteFrom(name, source, crossorigin, scaleMode)
+	    {
+	        deprecation(v5, ("PIXI.Sprite." + name + " method is deprecated, use PIXI.Sprite.from"));
+
+	        return Sprite.from(source, {
+	            resourceOptions: {
+	                scale: scaleMode,
+	                crossorigin: crossorigin,
+	            },
+	        });
+	    }
+
+	    /**
+	     * @deprecated since 5.0.0
+	     * @see PIXI.Sprite.from
+	     * @method PIXI.Sprite.fromImage
+	     * @return {PIXI.Sprite}
+	     */
+	    Sprite.fromImage = spriteFrom.bind(null, 'fromImage');
+
+	    /**
+	     * @deprecated since 5.0.0
+	     * @method PIXI.Sprite.fromSVG
+	     * @see PIXI.Sprite.from
+	     * @return {PIXI.Sprite}
+	     */
+	    Sprite.fromSVG = spriteFrom.bind(null, 'fromSVG');
+
+	    /**
+	     * @deprecated since 5.0.0
+	     * @method PIXI.Sprite.fromCanvas
+	     * @see PIXI.Sprite.from
+	     * @return {PIXI.Sprite}
+	     */
+	    Sprite.fromCanvas = spriteFrom.bind(null, 'fromCanvas');
+
+	    /**
+	     * @deprecated since 5.0.0
+	     * @method PIXI.Sprite.fromVideo
+	     * @see PIXI.Sprite.from
+	     * @return {PIXI.Sprite}
+	     */
+	    Sprite.fromVideo = spriteFrom.bind(null, 'fromVideo');
+
+	    /**
+	     * @deprecated since 5.0.0
+	     * @method PIXI.Sprite.fromFrame
+	     * @see PIXI.Sprite.from
+	     * @return {PIXI.Sprite}
+	     */
+	    Sprite.fromFrame = spriteFrom.bind(null, 'fromFrame');
+
+	    // Use these to deprecate all the Texture from* methods
+	    function textureFrom(name, source, crossorigin, scaleMode)
+	    {
+	        deprecation(v5, ("PIXI.Texture." + name + " method is deprecated, use PIXI.Texture.from"));
+
+	        return Texture.from(source, {
+	            resourceOptions: {
+	                scale: scaleMode,
+	                crossorigin: crossorigin,
+	            },
+	        });
+	    }
+
+	    /**
+	     * @deprecated since 5.0.0
+	     * @method PIXI.Texture.fromImage
+	     * @see PIXI.Texture.from
+	     * @return {PIXI.Texture}
+	     */
+	    Texture.fromImage = textureFrom.bind(null, 'fromImage');
+
+	    /**
+	     * @deprecated since 5.0.0
+	     * @method PIXI.Texture.fromSVG
+	     * @see PIXI.Texture.from
+	     * @return {PIXI.Texture}
+	     */
+	    Texture.fromSVG = textureFrom.bind(null, 'fromSVG');
+
+	    /**
+	     * @deprecated since 5.0.0
+	     * @method PIXI.Texture.fromCanvas
+	     * @see PIXI.Texture.from
+	     * @return {PIXI.Texture}
+	     */
+	    Texture.fromCanvas = textureFrom.bind(null, 'fromCanvas');
+
+	    /**
+	     * @deprecated since 5.0.0
+	     * @method PIXI.Texture.fromVideo
+	     * @see PIXI.Texture.from
+	     * @return {PIXI.Texture}
+	     */
+	    Texture.fromVideo = textureFrom.bind(null, 'fromVideo');
+
+	    /**
+	     * @deprecated since 5.0.0
+	     * @method PIXI.Texture.fromFrame
+	     * @see PIXI.Texture.from
+	     * @return {PIXI.Texture}
+	     */
+	    Texture.fromFrame = textureFrom.bind(null, 'fromFrame');
+
+	    /**
+	     * @deprecated since 5.0.0
+	     * @member {boolean} PIXI.AbstractRenderer#autoResize
+	     * @see PIXI.AbstractRenderer#autoDensity
+	     */
+	    Object.defineProperty(PIXI.AbstractRenderer.prototype, 'autoResize', {
+	        get: function get()
+	        {
+	            deprecation(v5, 'PIXI.AbstractRenderer.autoResize property is deprecated, '
+	                + 'use PIXI.AbstractRenderer.autoDensity');
+
+	            return this.autoDensity;
+	        },
+	        set: function set(value)
+	        {
+	            deprecation(v5, 'PIXI.AbstractRenderer.autoResize property is deprecated, '
+	                + 'use PIXI.AbstractRenderer.autoDensity');
+
+	            this.autoDensity = value;
+	        },
+	    });
+
+	    /**
+	     * @deprecated since 5.0.0
+	     * @member {PIXI.systems.TextureSystem} PIXI.Renderer#textureManager
+	     * @see PIXI.Renderer#texture
+	     */
+	    Object.defineProperty(PIXI.Renderer.prototype, 'textureManager', {
+	        get: function get()
+	        {
+	            deprecation(v5, 'PIXI.Renderer.textureManager property is deprecated, use PIXI.Renderer.texture');
+
+	            return this.texture;
+	        },
+	    });
+
+	    /**
+	     * @namespace PIXI.utils.mixins
+	     * @deprecated since 5.0.0
+	     */
+	    PIXI.utils.mixins = {
+	        /**
+	         * @memberof PIXI.utils.mixins
+	         * @function mixin
+	         * @deprecated since 5.0.0
+	         */
+	        mixin: function mixin()
+	        {
+	            deprecation(v5, 'PIXI.utils.mixins.mixin function is no longer available');
+	        },
+	        /**
+	         * @memberof PIXI.utils.mixins
+	         * @function delayMixin
+	         * @deprecated since 5.0.0
+	         */
+	        delayMixin: function delayMixin()
+	        {
+	            deprecation(v5, 'PIXI.utils.mixins.delayMixin function is no longer available');
+	        },
+	        /**
+	         * @memberof PIXI.utils.mixins
+	         * @function performMixins
+	         * @deprecated since 5.0.0
+	         */
+	        performMixins: function performMixins()
+	        {
+	            deprecation(v5, 'PIXI.utils.mixins.performMixins function is no longer available');
+	        },
+	    };
+	}
+
+	/*!
+	 * @pixi/mesh - v5.1.4
+	 * Compiled Fri, 20 Sep 2019 17:22:13 UTC
+	 *
+	 * @pixi/mesh is licensed under the MIT License.
+	 * http://www.opensource.org/licenses/mit-license
+	 */
+
+	/**
+	 * Class controls cache for UV mapping from Texture normal space to BaseTexture normal space.
+	 *
+	 * @class
+	 * @memberof PIXI
+	 */
+	var MeshBatchUvs = function MeshBatchUvs(uvBuffer, uvMatrix)
+	{
+	    /**
+	     * Buffer with normalized UV's
+	     * @member {PIXI.Buffer}
+	     */
+	    this.uvBuffer = uvBuffer;
+
+	    /**
+	     * Material UV matrix
+	     * @member {PIXI.TextureMatrix}
+	     */
+	    this.uvMatrix = uvMatrix;
+
+	    /**
+	     * UV Buffer data
+	     * @member {Float32Array}
+	     * @readonly
+	     */
+	    this.data = null;
+
+	    this._bufferUpdateId = -1;
+
+	    this._textureUpdateId = -1;
+
+	    this._updateID = 0;
+	};
+
+	/**
+	 * updates
+	 *
+	 * @param {boolean} forceUpdate - force the update
+	 */
+	MeshBatchUvs.prototype.update = function update (forceUpdate)
+	{
+	    if (!forceUpdate
+	        && this._bufferUpdateId === this.uvBuffer._updateID
+	        && this._textureUpdateId === this.uvMatrix._updateID)
+	    {
+	        return;
+	    }
+
+	    this._bufferUpdateId = this.uvBuffer._updateID;
+	    this._textureUpdateId = this.uvMatrix._updateID;
+
+	    var data = this.uvBuffer.data;
+
+	    if (!this.data || this.data.length !== data.length)
+	    {
+	        this.data = new Float32Array(data.length);
+	    }
+
+	    this.uvMatrix.multiplyUvs(data, this.data);
+
+	    this._updateID++;
+	};
+
+	var tempPoint$2 = new Point();
+	var tempPolygon = new Polygon();
+
+	/**
+	 * Base mesh class.
+	 *
+	 * This class empowers you to have maximum flexibility to render any kind of WebGL visuals you can think of.
+	 * This class assumes a certain level of WebGL knowledge.
+	 * If you know a bit this should abstract enough away to make you life easier!
+	 *
+	 * Pretty much ALL WebGL can be broken down into the following:
+	 * - Geometry - The structure and data for the mesh. This can include anything from positions, uvs, normals, colors etc..
+	 * - Shader - This is the shader that PixiJS will render the geometry with (attributes in the shader must match the geometry)
+	 * - State - This is the state of WebGL required to render the mesh.
+	 *
+	 * Through a combination of the above elements you can render anything you want, 2D or 3D!
+	 *
+	 * @class
+	 * @extends PIXI.Container
+	 * @memberof PIXI
+	 */
+	var Mesh = /*@__PURE__*/(function (Container) {
+	    function Mesh(geometry, shader, state, drawMode)// vertices, uvs, indices, drawMode)
+	    {
+	        if ( drawMode === void 0 ) { drawMode = DRAW_MODES.TRIANGLES; }
+
+	        Container.call(this);
+
+	        /**
+	         * Includes vertex positions, face indices, normals, colors, UVs, and
+	         * custom attributes within buffers, reducing the cost of passing all
+	         * this data to the GPU. Can be shared between multiple Mesh objects.
+	         * @member {PIXI.Geometry}
+	         * @readonly
+	         */
+	        this.geometry = geometry;
+
+	        geometry.refCount++;
+
+	        /**
+	         * Represents the vertex and fragment shaders that processes the geometry and runs on the GPU.
+	         * Can be shared between multiple Mesh objects.
+	         * @member {PIXI.Shader|PIXI.MeshMaterial}
+	         */
+	        this.shader = shader;
+
+	        /**
+	         * Represents the WebGL state the Mesh required to render, excludes shader and geometry. E.g.,
+	         * blend mode, culling, depth testing, direction of rendering triangles, backface, etc.
+	         * @member {PIXI.State}
+	         */
+	        this.state = state || State.for2d();
+
+	        /**
+	         * The way the Mesh should be drawn, can be any of the {@link PIXI.DRAW_MODES} constants.
+	         *
+	         * @member {number}
+	         * @see PIXI.DRAW_MODES
+	         */
+	        this.drawMode = drawMode;
+
+	        /**
+	         * Typically the index of the IndexBuffer where to start drawing.
+	         * @member {number}
+	         * @default 0
+	         */
+	        this.start = 0;
+
+	        /**
+	         * How much of the geometry to draw, by default `0` renders everything.
+	         * @member {number}
+	         * @default 0
+	         */
+	        this.size = 0;
+
+	        /**
+	         * thease are used as easy access for batching
+	         * @member {Float32Array}
+	         * @private
+	         */
+	        this.uvs = null;
+
+	        /**
+	         * thease are used as easy access for batching
+	         * @member {Uint16Array}
+	         * @private
+	         */
+	        this.indices = null;
+
+	        /**
+	         * this is the caching layer used by the batcher
+	         * @member {Float32Array}
+	         * @private
+	         */
+	        this.vertexData = new Float32Array(1);
+
+	        /**
+	         * If geometry is changed used to decide to re-transform
+	         * the vertexData.
+	         * @member {number}
+	         * @private
+	         */
+	        this.vertexDirty = 0;
+
+	        this._transformID = -1;
+
+	        // Inherited from DisplayMode, set defaults
+	        this.tint = 0xFFFFFF;
+	        this.blendMode = BLEND_MODES.NORMAL;
+
+	        /**
+	         * Internal roundPixels field
+	         *
+	         * @member {boolean}
+	         * @private
+	         */
+	        this._roundPixels = settings.ROUND_PIXELS;
+
+	        /**
+	         * Batched UV's are cached for atlas textures
+	         * @member {PIXI.MeshBatchUvs}
+	         * @private
+	         */
+	        this.batchUvs = null;
+	    }
+
+	    if ( Container ) { Mesh.__proto__ = Container; }
+	    Mesh.prototype = Object.create( Container && Container.prototype );
+	    Mesh.prototype.constructor = Mesh;
+
+	    var prototypeAccessors = { uvBuffer: { configurable: true },verticesBuffer: { configurable: true },material: { configurable: true },blendMode: { configurable: true },roundPixels: { configurable: true },tint: { configurable: true },texture: { configurable: true } };
+
+	    /**
+	     * To change mesh uv's, change its uvBuffer data and increment its _updateID.
+	     * @member {PIXI.Buffer}
+	     * @readonly
+	     */
+	    prototypeAccessors.uvBuffer.get = function ()
+	    {
+	        return this.geometry.buffers[1];
+	    };
+
+	    /**
+	     * To change mesh vertices, change its uvBuffer data and increment its _updateID.
+	     * Incrementing _updateID is optional because most of Mesh objects do it anyway.
+	     * @member {PIXI.Buffer}
+	     * @readonly
+	     */
+	    prototypeAccessors.verticesBuffer.get = function ()
+	    {
+	        return this.geometry.buffers[0];
+	    };
+
+	    /**
+	     * Alias for {@link PIXI.Mesh#shader}.
+	     * @member {PIXI.Shader|PIXI.MeshMaterial}
+	     */
+	    prototypeAccessors.material.set = function (value)
+	    {
+	        this.shader = value;
+	    };
+
+	    prototypeAccessors.material.get = function ()
+	    {
+	        return this.shader;
+	    };
+
+	    /**
+	     * The blend mode to be applied to the Mesh. Apply a value of
+	     * `PIXI.BLEND_MODES.NORMAL` to reset the blend mode.
+	     *
+	     * @member {number}
+	     * @default PIXI.BLEND_MODES.NORMAL;
+	     * @see PIXI.BLEND_MODES
+	     */
+	    prototypeAccessors.blendMode.set = function (value)
+	    {
+	        this.state.blendMode = value;
+	    };
+
+	    prototypeAccessors.blendMode.get = function ()
+	    {
+	        return this.state.blendMode;
+	    };
+
+	    /**
+	     * If true PixiJS will Math.floor() x/y values when rendering, stopping pixel interpolation.
+	     * Advantages can include sharper image quality (like text) and faster rendering on canvas.
+	     * The main disadvantage is movement of objects may appear less smooth.
+	     * To set the global default, change {@link PIXI.settings.ROUND_PIXELS}
+	     *
+	     * @member {boolean}
+	     * @default false
+	     */
+	    prototypeAccessors.roundPixels.set = function (value)
+	    {
+	        if (this._roundPixels !== value)
+	        {
+	            this._transformID = -1;
+	        }
+	        this._roundPixels = value;
+	    };
+
+	    prototypeAccessors.roundPixels.get = function ()
+	    {
+	        return this._roundPixels;
+	    };
+
+	    /**
+	     * The multiply tint applied to the Mesh. This is a hex value. A value of
+	     * `0xFFFFFF` will remove any tint effect.
+	     *
+	     * @member {number}
+	     * @default 0xFFFFFF
+	     */
+	    prototypeAccessors.tint.get = function ()
+	    {
+	        return this.shader.tint;
+	    };
+
+	    prototypeAccessors.tint.set = function (value)
+	    {
+	        this.shader.tint = value;
+	    };
+
+	    /**
+	     * The texture that the Mesh uses.
+	     *
+	     * @member {PIXI.Texture}
+	     */
+	    prototypeAccessors.texture.get = function ()
+	    {
+	        return this.shader.texture;
+	    };
+
+	    prototypeAccessors.texture.set = function (value)
+	    {
+	        this.shader.texture = value;
+	    };
+
+	    /**
+	     * Standard renderer draw.
+	     * @protected
+	     * @param {PIXI.Renderer} renderer - Instance to renderer.
+	     */
+	    Mesh.prototype._render = function _render (renderer)
+	    {
+	        // set properties for batching..
+	        // TODO could use a different way to grab verts?
+	        var vertices = this.geometry.buffers[0].data;
+
+	        // TODO benchmark check for attribute size..
+	        if (this.shader.batchable && this.drawMode === DRAW_MODES.TRIANGLES && vertices.length < Mesh.BATCHABLE_SIZE * 2)
+	        {
+	            this._renderToBatch(renderer);
+	        }
+	        else
+	        {
+	            this._renderDefault(renderer);
+	        }
+	    };
+
+	    /**
+	     * Standard non-batching way of rendering.
+	     * @protected
+	     * @param {PIXI.Renderer} renderer - Instance to renderer.
+	     */
+	    Mesh.prototype._renderDefault = function _renderDefault (renderer)
+	    {
+	        var shader = this.shader;
+
+	        shader.alpha = this.worldAlpha;
+	        if (shader.update)
+	        {
+	            shader.update();
+	        }
+
+	        renderer.batch.flush();
+
+	        if (shader.program.uniformData.translationMatrix)
+	        {
+	            shader.uniforms.translationMatrix = this.transform.worldTransform.toArray(true);
+	        }
+
+	        // bind and sync uniforms..
+	        renderer.shader.bind(shader);
+
+	        // set state..
+	        renderer.state.set(this.state);
+
+	        // bind the geometry...
+	        renderer.geometry.bind(this.geometry, shader);
+
+	        // then render it
+	        renderer.geometry.draw(this.drawMode, this.size, this.start, this.geometry.instanceCount);
+	    };
+
+	    /**
+	     * Rendering by using the Batch system.
+	     * @protected
+	     * @param {PIXI.Renderer} renderer - Instance to renderer.
+	     */
+	    Mesh.prototype._renderToBatch = function _renderToBatch (renderer)
+	    {
+	        var geometry = this.geometry;
+
+	        if (this.shader.uvMatrix)
+	        {
+	            this.shader.uvMatrix.update();
+	            this.calculateUvs();
+	        }
+
+	        // set properties for batching..
+	        this.calculateVertices();
+	        this.indices = geometry.indexBuffer.data;
+	        this._tintRGB = this.shader._tintRGB;
+	        this._texture = this.shader.texture;
+
+	        var pluginName = this.material.pluginName;
+
+	        renderer.batch.setObjectRenderer(renderer.plugins[pluginName]);
+	        renderer.plugins[pluginName].render(this);
+	    };
+
+	    /**
+	     * Updates vertexData field based on transform and vertices
+	     */
+	    Mesh.prototype.calculateVertices = function calculateVertices ()
+	    {
+	        var geometry = this.geometry;
+	        var vertices = geometry.buffers[0].data;
+
+	        if (geometry.vertexDirtyId === this.vertexDirty && this._transformID === this.transform._worldID)
+	        {
+	            return;
+	        }
+
+	        this._transformID = this.transform._worldID;
+
+	        if (this.vertexData.length !== vertices.length)
+	        {
+	            this.vertexData = new Float32Array(vertices.length);
+	        }
+
+	        var wt = this.transform.worldTransform;
+	        var a = wt.a;
+	        var b = wt.b;
+	        var c = wt.c;
+	        var d = wt.d;
+	        var tx = wt.tx;
+	        var ty = wt.ty;
+
+	        var vertexData = this.vertexData;
+
+	        for (var i = 0; i < vertexData.length / 2; i++)
+	        {
+	            var x = vertices[(i * 2)];
+	            var y = vertices[(i * 2) + 1];
+
+	            vertexData[(i * 2)] = (a * x) + (c * y) + tx;
+	            vertexData[(i * 2) + 1] = (b * x) + (d * y) + ty;
+	        }
+
+	        if (this._roundPixels)
+	        {
+	            for (var i$1 = 0; i$1 < vertexData.length; i$1++)
+	            {
+	                vertexData[i$1] = Math.round(vertexData[i$1]);
+	            }
+	        }
+
+	        this.vertexDirty = geometry.vertexDirtyId;
+	    };
+
+	    /**
+	     * Updates uv field based on from geometry uv's or batchUvs
+	     */
+	    Mesh.prototype.calculateUvs = function calculateUvs ()
+	    {
+	        var geomUvs = this.geometry.buffers[1];
+
+	        if (!this.shader.uvMatrix.isSimple)
+	        {
+	            if (!this.batchUvs)
+	            {
+	                this.batchUvs = new MeshBatchUvs(geomUvs, this.shader.uvMatrix);
+	            }
+	            this.batchUvs.update();
+	            this.uvs = this.batchUvs.data;
+	        }
+	        else
+	        {
+	            this.uvs = geomUvs.data;
+	        }
+	    };
+
+	    /**
+	     * Updates the bounds of the mesh as a rectangle. The bounds calculation takes the worldTransform into account.
+	     * there must be a aVertexPosition attribute present in the geometry for bounds to be calculated correctly.
+	     *
+	     * @protected
+	     */
+	    Mesh.prototype._calculateBounds = function _calculateBounds ()
+	    {
+	        this.calculateVertices();
+
+	        this._bounds.addVertexData(this.vertexData, 0, this.vertexData.length);
+	    };
+
+	    /**
+	     * Tests if a point is inside this mesh. Works only for PIXI.DRAW_MODES.TRIANGLES.
+	     *
+	     * @param {PIXI.Point} point the point to test
+	     * @return {boolean} the result of the test
+	     */
+	    Mesh.prototype.containsPoint = function containsPoint (point)
+	    {
+	        if (!this.getBounds().contains(point.x, point.y))
+	        {
+	            return false;
+	        }
+
+	        this.worldTransform.applyInverse(point, tempPoint$2);
+
+	        var vertices = this.geometry.getBuffer('aVertexPosition').data;
+
+	        var points = tempPolygon.points;
+	        var indices =  this.geometry.getIndex().data;
+	        var len = indices.length;
+	        var step = this.drawMode === 4 ? 3 : 1;
+
+	        for (var i = 0; i + 2 < len; i += step)
+	        {
+	            var ind0 = indices[i] * 2;
+	            var ind1 = indices[i + 1] * 2;
+	            var ind2 = indices[i + 2] * 2;
+
+	            points[0] = vertices[ind0];
+	            points[1] = vertices[ind0 + 1];
+	            points[2] = vertices[ind1];
+	            points[3] = vertices[ind1 + 1];
+	            points[4] = vertices[ind2];
+	            points[5] = vertices[ind2 + 1];
+
+	            if (tempPolygon.contains(tempPoint$2.x, tempPoint$2.y))
+	            {
+	                return true;
+	            }
+	        }
+
+	        return false;
+	    };
+	    /**
+	     * Destroys the Mesh object.
+	     *
+	     * @param {object|boolean} [options] - Options parameter. A boolean will act as if all
+	     *  options have been set to that value
+	     * @param {boolean} [options.children=false] - if set to true, all the children will have
+	     *  their destroy method called as well. 'options' will be passed on to those calls.
+	     */
+	    Mesh.prototype.destroy = function destroy (options)
+	    {
+	        Container.prototype.destroy.call(this, options);
+
+	        this.geometry.refCount--;
+	        if (this.geometry.refCount === 0)
+	        {
+	            this.geometry.dispose();
+	        }
+
+	        this.geometry = null;
+	        this.shader = null;
+	        this.state = null;
+	        this.uvs = null;
+	        this.indices = null;
+	        this.vertexData = null;
+	    };
+
+	    Object.defineProperties( Mesh.prototype, prototypeAccessors );
+
+	    return Mesh;
+	}(Container));
+
+	/**
+	 * The maximum number of vertices to consider batchable. Generally, the complexity
+	 * of the geometry.
+	 * @memberof PIXI.Mesh
+	 * @static
+	 * @member {number} BATCHABLE_SIZE
+	 */
+	Mesh.BATCHABLE_SIZE = 100;
+
+	var vertex$5 = "attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTextureMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n    gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n    vTextureCoord = (uTextureMatrix * vec3(aTextureCoord, 1.0)).xy;\n}\n";
+
+	var fragment$8 = "varying vec2 vTextureCoord;\nuniform vec4 uColor;\n\nuniform sampler2D uSampler;\n\nvoid main(void)\n{\n    gl_FragColor = texture2D(uSampler, vTextureCoord) * uColor;\n}\n";
+
+	/**
+	 * Slightly opinionated default shader for PixiJS 2D objects.
+	 * @class
+	 * @memberof PIXI
+	 * @extends PIXI.Shader
+	 */
+	var MeshMaterial = /*@__PURE__*/(function (Shader) {
+	    function MeshMaterial(uSampler, options)
+	    {
+	        var uniforms = {
+	            uSampler: uSampler,
+	            alpha: 1,
+	            uTextureMatrix: Matrix.IDENTITY,
+	            uColor: new Float32Array([1, 1, 1, 1]),
+	        };
+
+	        // Set defaults
+	        options = Object.assign({
+	            tint: 0xFFFFFF,
+	            alpha: 1,
+	            pluginName: 'batch',
+	        }, options);
+
+	        if (options.uniforms)
+	        {
+	            Object.assign(uniforms, options.uniforms);
+	        }
+
+	        Shader.call(this, options.program || Program.from(vertex$5, fragment$8), uniforms);
+
+	        /**
+	         * Only do update if tint or alpha changes.
+	         * @member {boolean}
+	         * @private
+	         * @default false
+	         */
+	        this._colorDirty = false;
+
+	        /**
+	         * TextureMatrix instance for this Mesh, used to track Texture changes
+	         *
+	         * @member {PIXI.TextureMatrix}
+	         * @readonly
+	         */
+	        this.uvMatrix = new TextureMatrix(uSampler);
+
+	        /**
+	         * `true` if shader can be batch with the renderer's batch system.
+	         * @member {boolean}
+	         * @default true
+	         */
+	        this.batchable = options.program === undefined;
+
+	        /**
+	         * Renderer plugin for batching
+	         *
+	         * @member {string}
+	         * @default 'batch'
+	         */
+	        this.pluginName = options.pluginName;
+
+	        this.tint = options.tint;
+	        this.alpha = options.alpha;
+	    }
+
+	    if ( Shader ) { MeshMaterial.__proto__ = Shader; }
+	    MeshMaterial.prototype = Object.create( Shader && Shader.prototype );
+	    MeshMaterial.prototype.constructor = MeshMaterial;
+
+	    var prototypeAccessors = { texture: { configurable: true },alpha: { configurable: true },tint: { configurable: true } };
+
+	    /**
+	     * Reference to the texture being rendered.
+	     * @member {PIXI.Texture}
+	     */
+	    prototypeAccessors.texture.get = function ()
+	    {
+	        return this.uniforms.uSampler;
+	    };
+	    prototypeAccessors.texture.set = function (value)
+	    {
+	        if (this.uniforms.uSampler !== value)
+	        {
+	            this.uniforms.uSampler = value;
+	            this.uvMatrix.texture = value;
+	        }
+	    };
+
+	    /**
+	     * This gets automatically set by the object using this.
+	     *
+	     * @default 1
+	     * @member {number}
+	     */
+	    prototypeAccessors.alpha.set = function (value)
+	    {
+	        if (value === this._alpha) { return; }
+
+	        this._alpha = value;
+	        this._colorDirty = true;
+	    };
+	    prototypeAccessors.alpha.get = function ()
+	    {
+	        return this._alpha;
+	    };
+
+	    /**
+	     * Multiply tint for the material.
+	     * @member {number}
+	     * @default 0xFFFFFF
+	     */
+	    prototypeAccessors.tint.set = function (value)
+	    {
+	        if (value === this._tint) { return; }
+
+	        this._tint = value;
+	        this._tintRGB = (value >> 16) + (value & 0xff00) + ((value & 0xff) << 16);
+	        this._colorDirty = true;
+	    };
+	    prototypeAccessors.tint.get = function ()
+	    {
+	        return this._tint;
+	    };
+
+	    /**
+	     * Gets called automatically by the Mesh. Intended to be overridden for custom
+	     * MeshMaterial objects.
+	     */
+	    MeshMaterial.prototype.update = function update ()
+	    {
+	        if (this._colorDirty)
+	        {
+	            this._colorDirty = false;
+	            var baseTexture = this.texture.baseTexture;
+
+	            premultiplyTintToRgba(this._tint, this._alpha, this.uniforms.uColor, baseTexture.premultiplyAlpha);
+	        }
+	        if (this.uvMatrix.update())
+	        {
+	            this.uniforms.uTextureMatrix = this.uvMatrix.mapCoord;
+	        }
+	    };
+
+	    Object.defineProperties( MeshMaterial.prototype, prototypeAccessors );
+
+	    return MeshMaterial;
+	}(Shader));
+
+	/**
+	 * Standard 2D geometry used in PixiJS.
+	 *
+	 * Geometry can be defined without passing in a style or data if required.
+	 *
+	 * ```js
+	 * const geometry = new PIXI.Geometry();
+	 *
+	 * geometry.addAttribute('positions', [0, 0, 100, 0, 100, 100, 0, 100], 2);
+	 * geometry.addAttribute('uvs', [0,0,1,0,1,1,0,1], 2);
+	 * geometry.addIndex([0,1,2,1,3,2]);
+	 *
+	 * ```
+	 * @class
+	 * @memberof PIXI
+	 * @extends PIXI.Geometry
+	 */
+	var MeshGeometry = /*@__PURE__*/(function (Geometry) {
+	    function MeshGeometry(vertices, uvs, index)
+	    {
+	        Geometry.call(this);
+
+	        var verticesBuffer = new Buffer(vertices);
+	        var uvsBuffer = new Buffer(uvs, true);
+	        var indexBuffer = new Buffer(index, true, true);
+
+	        this.addAttribute('aVertexPosition', verticesBuffer, 2, false, TYPES.FLOAT)
+	            .addAttribute('aTextureCoord', uvsBuffer, 2, false, TYPES.FLOAT)
+	            .addIndex(indexBuffer);
+
+	        /**
+	         * Dirty flag to limit update calls on Mesh. For example,
+	         * limiting updates on a single Mesh instance with a shared Geometry
+	         * within the render loop.
+	         * @private
+	         * @member {number}
+	         * @default -1
+	         */
+	        this._updateId = -1;
+	    }
+
+	    if ( Geometry ) { MeshGeometry.__proto__ = Geometry; }
+	    MeshGeometry.prototype = Object.create( Geometry && Geometry.prototype );
+	    MeshGeometry.prototype.constructor = MeshGeometry;
+
+	    var prototypeAccessors = { vertexDirtyId: { configurable: true } };
+
+	    /**
+	     * If the vertex position is updated.
+	     * @member {number}
+	     * @readonly
+	     * @private
+	     */
+	    prototypeAccessors.vertexDirtyId.get = function ()
+	    {
+	        return this.buffers[0]._updateID;
+	    };
+
+	    Object.defineProperties( MeshGeometry.prototype, prototypeAccessors );
+
+	    return MeshGeometry;
+	}(Geometry));
+
+	/*!
+	 * @pixi/mesh-extras - v5.1.4
+	 * Compiled Fri, 20 Sep 2019 17:22:13 UTC
+	 *
+	 * @pixi/mesh-extras is licensed under the MIT License.
+	 * http://www.opensource.org/licenses/mit-license
+	 */
+
+	var PlaneGeometry = /*@__PURE__*/(function (MeshGeometry) {
+	    function PlaneGeometry(width, height, segWidth, segHeight)
+	    {
+	        if ( width === void 0 ) { width = 100; }
+	        if ( height === void 0 ) { height = 100; }
+	        if ( segWidth === void 0 ) { segWidth = 10; }
+	        if ( segHeight === void 0 ) { segHeight = 10; }
+
+	        MeshGeometry.call(this);
+
+	        this.segWidth = segWidth;
+	        this.segHeight = segHeight;
+
+	        this.width = width;
+	        this.height = height;
+
+	        this.build();
+	    }
+
+	    if ( MeshGeometry ) { PlaneGeometry.__proto__ = MeshGeometry; }
+	    PlaneGeometry.prototype = Object.create( MeshGeometry && MeshGeometry.prototype );
+	    PlaneGeometry.prototype.constructor = PlaneGeometry;
+
+	    /**
+	     * Refreshes plane coordinates
+	     * @private
+	     */
+	    PlaneGeometry.prototype.build = function build ()
+	    {
+	        var total = this.segWidth * this.segHeight;
+	        var verts = [];
+	        var uvs = [];
+	        var indices = [];
+
+	        var segmentsX = this.segWidth - 1;
+	        var segmentsY = this.segHeight - 1;
+
+	        var sizeX = (this.width) / segmentsX;
+	        var sizeY = (this.height) / segmentsY;
+
+	        for (var i = 0; i < total; i++)
+	        {
+	            var x = (i % this.segWidth);
+	            var y = ((i / this.segWidth) | 0);
+
+	            verts.push(x * sizeX, y * sizeY);
+	            uvs.push(x / segmentsX, y / segmentsY);
+	        }
+
+	        var totalSub = segmentsX * segmentsY;
+
+	        for (var i$1 = 0; i$1 < totalSub; i$1++)
+	        {
+	            var xpos = i$1 % segmentsX;
+	            var ypos = (i$1 / segmentsX) | 0;
+
+	            var value = (ypos * this.segWidth) + xpos;
+	            var value2 = (ypos * this.segWidth) + xpos + 1;
+	            var value3 = ((ypos + 1) * this.segWidth) + xpos;
+	            var value4 = ((ypos + 1) * this.segWidth) + xpos + 1;
+
+	            indices.push(value, value2, value3,
+	                value2, value4, value3);
+	        }
+
+	        this.buffers[0].data = new Float32Array(verts);
+	        this.buffers[1].data = new Float32Array(uvs);
+	        this.indexBuffer.data = new Uint16Array(indices);
+
+	        // ensure that the changes are uploaded
+	        this.buffers[0].update();
+	        this.buffers[1].update();
+	        this.indexBuffer.update();
+	    };
+
+	    return PlaneGeometry;
+	}(MeshGeometry));
+
+	/**
+	 * RopeGeometry allows you to draw a geometry across several points and then manipulate these points.
+	 *
+	 * ```js
+	 * for (let i = 0; i < 20; i++) {
+	 *     points.push(new PIXI.Point(i * 50, 0));
+	 * };
+	 * const rope = new PIXI.RopeGeometry(100, points);
+	 * ```
+	 *
+	 * @class
+	 * @extends PIXI.MeshGeometry
+	 * @memberof PIXI
+	 *
+	 */
+	var RopeGeometry = /*@__PURE__*/(function (MeshGeometry) {
+	    function RopeGeometry(width, points)
+	    {
+	        if ( width === void 0 ) { width = 200; }
+
+	        MeshGeometry.call(this, new Float32Array(points.length * 4),
+	            new Float32Array(points.length * 4),
+	            new Uint16Array((points.length - 1) * 6));
+
+	        /**
+	         * An array of points that determine the rope
+	         * @member {PIXI.Point[]}
+	         */
+	        this.points = points;
+
+	        /**
+	         * The width (i.e., thickness) of the rope.
+	         * @member {number}
+	         * @readOnly
+	         */
+	        this.width = width;
+
+	        this.build();
+	    }
+
+	    if ( MeshGeometry ) { RopeGeometry.__proto__ = MeshGeometry; }
+	    RopeGeometry.prototype = Object.create( MeshGeometry && MeshGeometry.prototype );
+	    RopeGeometry.prototype.constructor = RopeGeometry;
+	    /**
+	     * Refreshes Rope indices and uvs
+	     * @private
+	     */
+	    RopeGeometry.prototype.build = function build ()
+	    {
+	        var points = this.points;
+
+	        if (!points) { return; }
+
+	        var vertexBuffer = this.getBuffer('aVertexPosition');
+	        var uvBuffer = this.getBuffer('aTextureCoord');
+	        var indexBuffer = this.getIndex();
+
+	        // if too little points, or texture hasn't got UVs set yet just move on.
+	        if (points.length < 1)
+	        {
+	            return;
+	        }
+
+	        // if the number of points has changed we will need to recreate the arraybuffers
+	        if (vertexBuffer.data.length / 4 !== points.length)
+	        {
+	            vertexBuffer.data = new Float32Array(points.length * 4);
+	            uvBuffer.data = new Float32Array(points.length * 4);
+	            indexBuffer.data = new Uint16Array((points.length - 1) * 6);
+	        }
+
+	        var uvs = uvBuffer.data;
+	        var indices = indexBuffer.data;
+
+	        uvs[0] = 0;
+	        uvs[1] = 0;
+	        uvs[2] = 0;
+	        uvs[3] = 1;
+
+	        // indices[0] = 0;
+	        // indices[1] = 1;
+
+	        var total = points.length; // - 1;
+
+	        for (var i = 0; i < total; i++)
+	        {
+	            // time to do some smart drawing!
+	            var index = i * 4;
+	            var amount = i / (total - 1);
+
+	            uvs[index] = amount;
+	            uvs[index + 1] = 0;
+
+	            uvs[index + 2] = amount;
+	            uvs[index + 3] = 1;
+	        }
+
+	        var indexCount = 0;
+
+	        for (var i$1 = 0; i$1 < total - 1; i$1++)
+	        {
+	            var index$1 = i$1 * 2;
+
+	            indices[indexCount++] = index$1;
+	            indices[indexCount++] = index$1 + 1;
+	            indices[indexCount++] = index$1 + 2;
+
+	            indices[indexCount++] = index$1 + 2;
+	            indices[indexCount++] = index$1 + 1;
+	            indices[indexCount++] = index$1 + 3;
+	        }
+
+	        // ensure that the changes are uploaded
+	        uvBuffer.update();
+	        indexBuffer.update();
+
+	        this.updateVertices();
+	    };
+
+	    /**
+	     * refreshes vertices of Rope mesh
+	     */
+	    RopeGeometry.prototype.updateVertices = function updateVertices ()
+	    {
+	        var points = this.points;
+
+	        if (points.length < 1)
+	        {
+	            return;
+	        }
+
+	        var lastPoint = points[0];
+	        var nextPoint;
+	        var perpX = 0;
+	        var perpY = 0;
+
+	        // this.count -= 0.2;
+
+	        var vertices = this.buffers[0].data;
+	        var total = points.length;
+
+	        for (var i = 0; i < total; i++)
+	        {
+	            var point = points[i];
+	            var index = i * 4;
+
+	            if (i < points.length - 1)
+	            {
+	                nextPoint = points[i + 1];
+	            }
+	            else
+	            {
+	                nextPoint = point;
+	            }
+
+	            perpY = -(nextPoint.x - lastPoint.x);
+	            perpX = nextPoint.y - lastPoint.y;
+
+	            var perpLength = Math.sqrt((perpX * perpX) + (perpY * perpY));
+	            var num = this.width / 2; // (20 + Math.abs(Math.sin((i + this.count) * 0.3) * 50) )* ratio;
+
+	            perpX /= perpLength;
+	            perpY /= perpLength;
+
+	            perpX *= num;
+	            perpY *= num;
+
+	            vertices[index] = point.x + perpX;
+	            vertices[index + 1] = point.y + perpY;
+	            vertices[index + 2] = point.x - perpX;
+	            vertices[index + 3] = point.y - perpY;
+
+	            lastPoint = point;
+	        }
+
+	        this.buffers[0].update();
+	    };
+
+	    RopeGeometry.prototype.update = function update ()
+	    {
+	        this.updateVertices();
+	    };
+
+	    return RopeGeometry;
+	}(MeshGeometry));
+
+	/**
+	 * The rope allows you to draw a texture across several points and then manipulate these points
+	 *
+	 *```js
+	 * for (let i = 0; i < 20; i++) {
+	 *     points.push(new PIXI.Point(i * 50, 0));
+	 * };
+	 * let rope = new PIXI.SimpleRope(PIXI.Texture.from("snake.png"), points);
+	 *  ```
+	 *
+	 * @class
+	 * @extends PIXI.Mesh
+	 * @memberof PIXI
+	 *
+	 */
+	var SimpleRope = /*@__PURE__*/(function (Mesh) {
+	    function SimpleRope(texture, points)
+	    {
+	        var ropeGeometry = new RopeGeometry(texture.height, points);
+	        var meshMaterial = new MeshMaterial(texture);
+
+	        Mesh.call(this, ropeGeometry, meshMaterial);
+
+	        /**
+	         * re-calculate vertices by rope points each frame
+	         *
+	         * @member {boolean}
+	         */
+	        this.autoUpdate = true;
+	    }
+
+	    if ( Mesh ) { SimpleRope.__proto__ = Mesh; }
+	    SimpleRope.prototype = Object.create( Mesh && Mesh.prototype );
+	    SimpleRope.prototype.constructor = SimpleRope;
+
+	    SimpleRope.prototype._render = function _render (renderer)
+	    {
+	        if (this.autoUpdate
+	            || this.geometry.width !== this.shader.texture.height)
+	        {
+	            this.geometry.width = this.shader.texture.height;
+	            this.geometry.update();
+	        }
+
+	        Mesh.prototype._render.call(this, renderer);
+	    };
+
+	    return SimpleRope;
+	}(Mesh));
+
+	/**
+	 * The SimplePlane allows you to draw a texture across several points and then manipulate these points
+	 *
+	 *```js
+	 * for (let i = 0; i < 20; i++) {
+	 *     points.push(new PIXI.Point(i * 50, 0));
+	 * };
+	 * let SimplePlane = new PIXI.SimplePlane(PIXI.Texture.from("snake.png"), points);
+	 *  ```
+	 *
+	 * @class
+	 * @extends PIXI.Mesh
+	 * @memberof PIXI
+	 *
+	 */
+	var SimplePlane = /*@__PURE__*/(function (Mesh) {
+	    function SimplePlane(texture, verticesX, verticesY)
+	    {
+	        var planeGeometry = new PlaneGeometry(texture.width, texture.height, verticesX, verticesY);
+	        var meshMaterial = new MeshMaterial(Texture.WHITE);
+
+	        Mesh.call(this, planeGeometry, meshMaterial);
+
+	        // lets call the setter to ensure all necessary updates are performed
+	        this.texture = texture;
+	    }
+
+	    if ( Mesh ) { SimplePlane.__proto__ = Mesh; }
+	    SimplePlane.prototype = Object.create( Mesh && Mesh.prototype );
+	    SimplePlane.prototype.constructor = SimplePlane;
+
+	    var prototypeAccessors = { texture: { configurable: true } };
+
+	    /**
+	     * Method used for overrides, to do something in case texture frame was changed.
+	     * Meshes based on plane can override it and change more details based on texture.
+	     */
+	    SimplePlane.prototype.textureUpdated = function textureUpdated ()
+	    {
+	        this._textureID = this.shader.texture._updateID;
+
+	        this.geometry.width = this.shader.texture.width;
+	        this.geometry.height = this.shader.texture.height;
+
+	        this.geometry.build();
+	    };
+
+	    prototypeAccessors.texture.set = function (value)
+	    {
+	        // Track texture same way sprite does.
+	        // For generated meshes like NineSlicePlane it can change the geometry.
+	        // Unfortunately, this method might not work if you directly change texture in material.
+
+	        if (this.shader.texture === value)
+	        {
+	            return;
+	        }
+
+	        this.shader.texture = value;
+	        this._textureID = -1;
+
+	        if (value.baseTexture.valid)
+	        {
+	            this.textureUpdated();
+	        }
+	        else
+	        {
+	            value.once('update', this.textureUpdated, this);
+	        }
+	    };
+
+	    prototypeAccessors.texture.get = function ()
+	    {
+	        return this.shader.texture;
+	    };
+
+	    SimplePlane.prototype._render = function _render (renderer)
+	    {
+	        if (this._textureID !== this.shader.texture._updateID)
+	        {
+	            this.textureUpdated();
+	        }
+
+	        Mesh.prototype._render.call(this, renderer);
+	    };
+
+	    Object.defineProperties( SimplePlane.prototype, prototypeAccessors );
+
+	    return SimplePlane;
+	}(Mesh));
+
+	/**
+	 * The Simple Mesh class mimics Mesh in PixiJS v4, providing easy-to-use constructor arguments.
+	 * For more robust customization, use {@link PIXI.Mesh}.
+	 *
+	 * @class
+	 * @extends PIXI.Mesh
+	 * @memberof PIXI
+	 */
+	var SimpleMesh = /*@__PURE__*/(function (Mesh) {
+	    function SimpleMesh(texture, vertices, uvs, indices, drawMode)
+	    {
+	        if ( texture === void 0 ) { texture = Texture.EMPTY; }
+
+	        var geometry = new MeshGeometry(vertices, uvs, indices);
+
+	        geometry.getBuffer('aVertexPosition').static = false;
+
+	        var meshMaterial = new MeshMaterial(texture);
+
+	        Mesh.call(this, geometry, meshMaterial, null, drawMode);
+
+	        /**
+	         * upload vertices buffer each frame
+	         * @member {boolean}
+	         */
+	        this.autoUpdate = true;
+	    }
+
+	    if ( Mesh ) { SimpleMesh.__proto__ = Mesh; }
+	    SimpleMesh.prototype = Object.create( Mesh && Mesh.prototype );
+	    SimpleMesh.prototype.constructor = SimpleMesh;
+
+	    var prototypeAccessors = { vertices: { configurable: true } };
+
+	    /**
+	     * Collection of vertices data.
+	     * @member {Float32Array}
+	     */
+	    prototypeAccessors.vertices.get = function ()
+	    {
+	        return this.geometry.getBuffer('aVertexPosition').data;
+	    };
+	    prototypeAccessors.vertices.set = function (value)
+	    {
+	        this.geometry.getBuffer('aVertexPosition').data = value;
+	    };
+
+	    SimpleMesh.prototype._render = function _render (renderer)
+	    {
+	        if (this.autoUpdate)
+	        {
+	            this.geometry.getBuffer('aVertexPosition').update();
+	        }
+
+	        Mesh.prototype._render.call(this, renderer);
+	    };
+
+	    Object.defineProperties( SimpleMesh.prototype, prototypeAccessors );
+
+	    return SimpleMesh;
+	}(Mesh));
+
+	var DEFAULT_BORDER_SIZE = 10;
+
+	/**
+	 * The NineSlicePlane allows you to stretch a texture using 9-slice scaling. The corners will remain unscaled (useful
+	 * for buttons with rounded corners for example) and the other areas will be scaled horizontally and or vertically
+	 *
+	 *```js
+	 * let Plane9 = new PIXI.NineSlicePlane(PIXI.Texture.from('BoxWithRoundedCorners.png'), 15, 15, 15, 15);
+	 *  ```
+	 * <pre>
+	 *      A                          B
+	 *    +---+----------------------+---+
+	 *  C | 1 |          2           | 3 |
+	 *    +---+----------------------+---+
+	 *    |   |                      |   |
+	 *    | 4 |          5           | 6 |
+	 *    |   |                      |   |
+	 *    +---+----------------------+---+
+	 *  D | 7 |          8           | 9 |
+	 *    +---+----------------------+---+
+
+	 *  When changing this objects width and/or height:
+	 *     areas 1 3 7 and 9 will remain unscaled.
+	 *     areas 2 and 8 will be stretched horizontally
+	 *     areas 4 and 6 will be stretched vertically
+	 *     area 5 will be stretched both horizontally and vertically
+	 * </pre>
+	 *
+	 * @class
+	 * @extends PIXI.SimplePlane
+	 * @memberof PIXI
+	 *
+	 */
+	var NineSlicePlane = /*@__PURE__*/(function (SimplePlane) {
+	    function NineSlicePlane(texture, leftWidth, topHeight, rightWidth, bottomHeight)
+	    {
+	        SimplePlane.call(this, Texture.WHITE, 4, 4);
+
+	        this._origWidth = texture.orig.width;
+	        this._origHeight = texture.orig.height;
+
+	        /**
+	         * The width of the NineSlicePlane, setting this will actually modify the vertices and UV's of this plane
+	         *
+	         * @member {number}
+	         * @override
+	         */
+	        this._width = this._origWidth;
+
+	        /**
+	         * The height of the NineSlicePlane, setting this will actually modify the vertices and UV's of this plane
+	         *
+	         * @member {number}
+	         * @override
+	         */
+	        this._height = this._origHeight;
+
+	        /**
+	         * The width of the left column (a)
+	         *
+	         * @member {number}
+	         * @private
+	         */
+	        this._leftWidth = typeof leftWidth !== 'undefined' ? leftWidth : DEFAULT_BORDER_SIZE;
+
+	        /**
+	         * The width of the right column (b)
+	         *
+	         * @member {number}
+	         * @private
+	         */
+	        this._rightWidth = typeof rightWidth !== 'undefined' ? rightWidth : DEFAULT_BORDER_SIZE;
+
+	        /**
+	         * The height of the top row (c)
+	         *
+	         * @member {number}
+	         * @private
+	         */
+	        this._topHeight = typeof topHeight !== 'undefined' ? topHeight : DEFAULT_BORDER_SIZE;
+
+	        /**
+	         * The height of the bottom row (d)
+	         *
+	         * @member {number}
+	         * @private
+	         */
+	        this._bottomHeight = typeof bottomHeight !== 'undefined' ? bottomHeight : DEFAULT_BORDER_SIZE;
+
+	        // lets call the setter to ensure all necessary updates are performed
+	        this.texture = texture;
+	    }
+
+	    if ( SimplePlane ) { NineSlicePlane.__proto__ = SimplePlane; }
+	    NineSlicePlane.prototype = Object.create( SimplePlane && SimplePlane.prototype );
+	    NineSlicePlane.prototype.constructor = NineSlicePlane;
+
+	    var prototypeAccessors = { vertices: { configurable: true },width: { configurable: true },height: { configurable: true },leftWidth: { configurable: true },rightWidth: { configurable: true },topHeight: { configurable: true },bottomHeight: { configurable: true } };
+
+	    NineSlicePlane.prototype.textureUpdated = function textureUpdated ()
+	    {
+	        this._textureID = this.shader.texture._updateID;
+	        this._refresh();
+	    };
+
+	    prototypeAccessors.vertices.get = function ()
+	    {
+	        return this.geometry.getBuffer('aVertexPosition').data;
+	    };
+
+	    prototypeAccessors.vertices.set = function (value)
+	    {
+	        this.geometry.getBuffer('aVertexPosition').data = value;
+	    };
+
+	    /**
+	     * Updates the horizontal vertices.
+	     *
+	     */
+	    NineSlicePlane.prototype.updateHorizontalVertices = function updateHorizontalVertices ()
+	    {
+	        var vertices = this.vertices;
+
+	        var h = this._topHeight + this._bottomHeight;
+	        var scale = this._height > h ? 1.0 : this._height / h;
+
+	        vertices[9] = vertices[11] = vertices[13] = vertices[15] = this._topHeight * scale;
+	        vertices[17] = vertices[19] = vertices[21] = vertices[23] = this._height - (this._bottomHeight * scale);
+	        vertices[25] = vertices[27] = vertices[29] = vertices[31] = this._height;
+	    };
+
+	    /**
+	     * Updates the vertical vertices.
+	     *
+	     */
+	    NineSlicePlane.prototype.updateVerticalVertices = function updateVerticalVertices ()
+	    {
+	        var vertices = this.vertices;
+
+	        var w = this._leftWidth + this._rightWidth;
+	        var scale = this._width > w ? 1.0 : this._width / w;
+
+	        vertices[2] = vertices[10] = vertices[18] = vertices[26] = this._leftWidth * scale;
+	        vertices[4] = vertices[12] = vertices[20] = vertices[28] = this._width - (this._rightWidth * scale);
+	        vertices[6] = vertices[14] = vertices[22] = vertices[30] = this._width;
+	    };
+
+	    /**
+	     * The width of the NineSlicePlane, setting this will actually modify the vertices and UV's of this plane
+	     *
+	     * @member {number}
+	     */
+	    prototypeAccessors.width.get = function ()
+	    {
+	        return this._width;
+	    };
+
+	    prototypeAccessors.width.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        this._width = value;
+	        this._refresh();
+	    };
+
+	    /**
+	     * The height of the NineSlicePlane, setting this will actually modify the vertices and UV's of this plane
+	     *
+	     * @member {number}
+	     */
+	    prototypeAccessors.height.get = function ()
+	    {
+	        return this._height;
+	    };
+
+	    prototypeAccessors.height.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        this._height = value;
+	        this._refresh();
+	    };
+
+	    /**
+	     * The width of the left column
+	     *
+	     * @member {number}
+	     */
+	    prototypeAccessors.leftWidth.get = function ()
+	    {
+	        return this._leftWidth;
+	    };
+
+	    prototypeAccessors.leftWidth.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        this._leftWidth = value;
+	        this._refresh();
+	    };
+
+	    /**
+	     * The width of the right column
+	     *
+	     * @member {number}
+	     */
+	    prototypeAccessors.rightWidth.get = function ()
+	    {
+	        return this._rightWidth;
+	    };
+
+	    prototypeAccessors.rightWidth.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        this._rightWidth = value;
+	        this._refresh();
+	    };
+
+	    /**
+	     * The height of the top row
+	     *
+	     * @member {number}
+	     */
+	    prototypeAccessors.topHeight.get = function ()
+	    {
+	        return this._topHeight;
+	    };
+
+	    prototypeAccessors.topHeight.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        this._topHeight = value;
+	        this._refresh();
+	    };
+
+	    /**
+	     * The height of the bottom row
+	     *
+	     * @member {number}
+	     */
+	    prototypeAccessors.bottomHeight.get = function ()
+	    {
+	        return this._bottomHeight;
+	    };
+
+	    prototypeAccessors.bottomHeight.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        this._bottomHeight = value;
+	        this._refresh();
+	    };
+
+	    /**
+	     * Refreshes NineSlicePlane coords. All of them.
+	     */
+	    NineSlicePlane.prototype._refresh = function _refresh ()
+	    {
+	        var texture = this.texture;
+
+	        var uvs = this.geometry.buffers[1].data;
+
+	        this._origWidth = texture.orig.width;
+	        this._origHeight = texture.orig.height;
+
+	        var _uvw = 1.0 / this._origWidth;
+	        var _uvh = 1.0 / this._origHeight;
+
+	        uvs[0] = uvs[8] = uvs[16] = uvs[24] = 0;
+	        uvs[1] = uvs[3] = uvs[5] = uvs[7] = 0;
+	        uvs[6] = uvs[14] = uvs[22] = uvs[30] = 1;
+	        uvs[25] = uvs[27] = uvs[29] = uvs[31] = 1;
+
+	        uvs[2] = uvs[10] = uvs[18] = uvs[26] = _uvw * this._leftWidth;
+	        uvs[4] = uvs[12] = uvs[20] = uvs[28] = 1 - (_uvw * this._rightWidth);
+	        uvs[9] = uvs[11] = uvs[13] = uvs[15] = _uvh * this._topHeight;
+	        uvs[17] = uvs[19] = uvs[21] = uvs[23] = 1 - (_uvh * this._bottomHeight);
+
+	        this.updateHorizontalVertices();
+	        this.updateVerticalVertices();
+
+	        this.geometry.buffers[0].update();
+	        this.geometry.buffers[1].update();
+	    };
+
+	    Object.defineProperties( NineSlicePlane.prototype, prototypeAccessors );
+
+	    return NineSlicePlane;
+	}(SimplePlane));
+
+	/*!
+	 * @pixi/sprite-animated - v5.1.4
+	 * Compiled Fri, 20 Sep 2019 17:22:13 UTC
+	 *
+	 * @pixi/sprite-animated is licensed under the MIT License.
+	 * http://www.opensource.org/licenses/mit-license
+	 */
+
+	/**
+	 * An AnimatedSprite is a simple way to display an animation depicted by a list of textures.
+	 *
+	 * ```js
+	 * let alienImages = ["image_sequence_01.png","image_sequence_02.png","image_sequence_03.png","image_sequence_04.png"];
+	 * let textureArray = [];
+	 *
+	 * for (let i=0; i < 4; i++)
+	 * {
+	 *      let texture = PIXI.Texture.from(alienImages[i]);
+	 *      textureArray.push(texture);
+	 * };
+	 *
+	 * let animatedSprite = new PIXI.AnimatedSprite(textureArray);
+	 * ```
+	 *
+	 * The more efficient and simpler way to create an animated sprite is using a {@link PIXI.Spritesheet}
+	 * containing the animation definitions:
+	 *
+	 * ```js
+	 * PIXI.Loader.shared.add("assets/spritesheet.json").load(setup);
+	 *
+	 * function setup() {
+	 *   let sheet = PIXI.Loader.shared.resources["assets/spritesheet.json"].spritesheet;
+	 *   animatedSprite = new PIXI.AnimatedSprite(sheet.animations["image_sequence"]);
+	 *   ...
+	 * }
+	 * ```
+	 *
+	 * @class
+	 * @extends PIXI.Sprite
+	 * @memberof PIXI
+	 */
+	var AnimatedSprite = /*@__PURE__*/(function (Sprite) {
+	    function AnimatedSprite(textures, autoUpdate)
+	    {
+	        Sprite.call(this, textures[0] instanceof Texture ? textures[0] : textures[0].texture);
+
+	        /**
+	         * @type {PIXI.Texture[]}
+	         * @private
+	         */
+	        this._textures = null;
+
+	        /**
+	         * @type {number[]}
+	         * @private
+	         */
+	        this._durations = null;
+
+	        this.textures = textures;
+
+	        /**
+	         * `true` uses PIXI.Ticker.shared to auto update animation time.
+	         * @type {boolean}
+	         * @default true
+	         * @private
+	         */
+	        this._autoUpdate = autoUpdate !== false;
+
+	        /**
+	         * The speed that the AnimatedSprite will play at. Higher is faster, lower is slower.
+	         *
+	         * @member {number}
+	         * @default 1
+	         */
+	        this.animationSpeed = 1;
+
+	        /**
+	         * Whether or not the animate sprite repeats after playing.
+	         *
+	         * @member {boolean}
+	         * @default true
+	         */
+	        this.loop = true;
+
+	        /**
+	         * Update anchor to [Texture's defaultAnchor]{@link PIXI.Texture#defaultAnchor} when frame changes.
+	         *
+	         * Useful with [sprite sheet animations]{@link PIXI.Spritesheet#animations} created with tools.
+	         * Changing anchor for each frame allows to pin sprite origin to certain moving feature
+	         * of the frame (e.g. left foot).
+	         *
+	         * Note: Enabling this will override any previously set `anchor` on each frame change.
+	         *
+	         * @member {boolean}
+	         * @default false
+	         */
+	        this.updateAnchor = false;
+
+	        /**
+	         * Function to call when an AnimatedSprite finishes playing.
+	         *
+	         * @member {Function}
+	         */
+	        this.onComplete = null;
+
+	        /**
+	         * Function to call when an AnimatedSprite changes which texture is being rendered.
+	         *
+	         * @member {Function}
+	         */
+	        this.onFrameChange = null;
+
+	        /**
+	         * Function to call when `loop` is true, and an AnimatedSprite is played and loops around to start again.
+	         *
+	         * @member {Function}
+	         */
+	        this.onLoop = null;
+
+	        /**
+	         * Elapsed time since animation has been started, used internally to display current texture.
+	         *
+	         * @member {number}
+	         * @private
+	         */
+	        this._currentTime = 0;
+
+	        /**
+	         * Indicates if the AnimatedSprite is currently playing.
+	         *
+	         * @member {boolean}
+	         * @readonly
+	         */
+	        this.playing = false;
+	    }
+
+	    if ( Sprite ) { AnimatedSprite.__proto__ = Sprite; }
+	    AnimatedSprite.prototype = Object.create( Sprite && Sprite.prototype );
+	    AnimatedSprite.prototype.constructor = AnimatedSprite;
+
+	    var prototypeAccessors = { totalFrames: { configurable: true },textures: { configurable: true },currentFrame: { configurable: true } };
+
+	    /**
+	     * Stops the AnimatedSprite.
+	     *
+	     */
+	    AnimatedSprite.prototype.stop = function stop ()
+	    {
+	        if (!this.playing)
+	        {
+	            return;
+	        }
+
+	        this.playing = false;
+	        if (this._autoUpdate)
+	        {
+	            Ticker.shared.remove(this.update, this);
+	        }
+	    };
+
+	    /**
+	     * Plays the AnimatedSprite.
+	     *
+	     */
+	    AnimatedSprite.prototype.play = function play ()
+	    {
+	        if (this.playing)
+	        {
+	            return;
+	        }
+
+	        this.playing = true;
+	        if (this._autoUpdate)
+	        {
+	            Ticker.shared.add(this.update, this, UPDATE_PRIORITY.HIGH);
+	        }
+	    };
+
+	    /**
+	     * Stops the AnimatedSprite and goes to a specific frame.
+	     *
+	     * @param {number} frameNumber - Frame index to stop at.
+	     */
+	    AnimatedSprite.prototype.gotoAndStop = function gotoAndStop (frameNumber)
+	    {
+	        this.stop();
+
+	        var previousFrame = this.currentFrame;
+
+	        this._currentTime = frameNumber;
+
+	        if (previousFrame !== this.currentFrame)
+	        {
+	            this.updateTexture();
+	        }
+	    };
+
+	    /**
+	     * Goes to a specific frame and begins playing the AnimatedSprite.
+	     *
+	     * @param {number} frameNumber - Frame index to start at.
+	     */
+	    AnimatedSprite.prototype.gotoAndPlay = function gotoAndPlay (frameNumber)
+	    {
+	        var previousFrame = this.currentFrame;
+
+	        this._currentTime = frameNumber;
+
+	        if (previousFrame !== this.currentFrame)
+	        {
+	            this.updateTexture();
+	        }
+
+	        this.play();
+	    };
+
+	    /**
+	     * Updates the object transform for rendering.
+	     *
+	     * @private
+	     * @param {number} deltaTime - Time since last tick.
+	     */
+	    AnimatedSprite.prototype.update = function update (deltaTime)
+	    {
+	        var elapsed = this.animationSpeed * deltaTime;
+	        var previousFrame = this.currentFrame;
+
+	        if (this._durations !== null)
+	        {
+	            var lag = this._currentTime % 1 * this._durations[this.currentFrame];
+
+	            lag += elapsed / 60 * 1000;
+
+	            while (lag < 0)
+	            {
+	                this._currentTime--;
+	                lag += this._durations[this.currentFrame];
+	            }
+
+	            var sign = Math.sign(this.animationSpeed * deltaTime);
+
+	            this._currentTime = Math.floor(this._currentTime);
+
+	            while (lag >= this._durations[this.currentFrame])
+	            {
+	                lag -= this._durations[this.currentFrame] * sign;
+	                this._currentTime += sign;
+	            }
+
+	            this._currentTime += lag / this._durations[this.currentFrame];
+	        }
+	        else
+	        {
+	            this._currentTime += elapsed;
+	        }
+
+	        if (this._currentTime < 0 && !this.loop)
+	        {
+	            this.gotoAndStop(0);
+
+	            if (this.onComplete)
+	            {
+	                this.onComplete();
+	            }
+	        }
+	        else if (this._currentTime >= this._textures.length && !this.loop)
+	        {
+	            this.gotoAndStop(this._textures.length - 1);
+
+	            if (this.onComplete)
+	            {
+	                this.onComplete();
+	            }
+	        }
+	        else if (previousFrame !== this.currentFrame)
+	        {
+	            if (this.loop && this.onLoop)
+	            {
+	                if (this.animationSpeed > 0 && this.currentFrame < previousFrame)
+	                {
+	                    this.onLoop();
+	                }
+	                else if (this.animationSpeed < 0 && this.currentFrame > previousFrame)
+	                {
+	                    this.onLoop();
+	                }
+	            }
+
+	            this.updateTexture();
+	        }
+	    };
+
+	    /**
+	     * Updates the displayed texture to match the current frame index.
+	     *
+	     * @private
+	     */
+	    AnimatedSprite.prototype.updateTexture = function updateTexture ()
+	    {
+	        this._texture = this._textures[this.currentFrame];
+	        this._textureID = -1;
+	        this._textureTrimmedID = -1;
+	        this._cachedTint = 0xFFFFFF;
+	        this.uvs = this._texture._uvs.uvsFloat32;
+
+	        if (this.updateAnchor)
+	        {
+	            this._anchor.copyFrom(this._texture.defaultAnchor);
+	        }
+
+	        if (this.onFrameChange)
+	        {
+	            this.onFrameChange(this.currentFrame);
+	        }
+	    };
+
+	    /**
+	     * Stops the AnimatedSprite and destroys it.
+	     *
+	     * @param {object|boolean} [options] - Options parameter. A boolean will act as if all options
+	     *  have been set to that value.
+	     * @param {boolean} [options.children=false] - If set to true, all the children will have their destroy
+	     *      method called as well. 'options' will be passed on to those calls.
+	     * @param {boolean} [options.texture=false] - Should it destroy the current texture of the sprite as well.
+	     * @param {boolean} [options.baseTexture=false] - Should it destroy the base texture of the sprite as well.
+	     */
+	    AnimatedSprite.prototype.destroy = function destroy (options)
+	    {
+	        this.stop();
+	        Sprite.prototype.destroy.call(this, options);
+
+	        this.onComplete = null;
+	        this.onFrameChange = null;
+	        this.onLoop = null;
+	    };
+
+	    /**
+	     * A short hand way of creating an AnimatedSprite from an array of frame ids.
+	     *
+	     * @static
+	     * @param {string[]} frames - The array of frames ids the AnimatedSprite will use as its texture frames.
+	     * @return {AnimatedSprite} The new animated sprite with the specified frames.
+	     */
+	    AnimatedSprite.fromFrames = function fromFrames (frames)
+	    {
+	        var textures = [];
+
+	        for (var i = 0; i < frames.length; ++i)
+	        {
+	            textures.push(Texture.from(frames[i]));
+	        }
+
+	        return new AnimatedSprite(textures);
+	    };
+
+	    /**
+	     * A short hand way of creating an AnimatedSprite from an array of image ids.
+	     *
+	     * @static
+	     * @param {string[]} images - The array of image urls the AnimatedSprite will use as its texture frames.
+	     * @return {AnimatedSprite} The new animate sprite with the specified images as frames.
+	     */
+	    AnimatedSprite.fromImages = function fromImages (images)
+	    {
+	        var textures = [];
+
+	        for (var i = 0; i < images.length; ++i)
+	        {
+	            textures.push(Texture.from(images[i]));
+	        }
+
+	        return new AnimatedSprite(textures);
+	    };
+
+	    /**
+	     * The total number of frames in the AnimatedSprite. This is the same as number of textures
+	     * assigned to the AnimatedSprite.
+	     *
+	     * @readonly
+	     * @member {number}
+	     * @default 0
+	     */
+	    prototypeAccessors.totalFrames.get = function ()
+	    {
+	        return this._textures.length;
+	    };
+
+	    /**
+	     * The array of textures used for this AnimatedSprite.
+	     *
+	     * @member {PIXI.Texture[]}
+	     */
+	    prototypeAccessors.textures.get = function ()
+	    {
+	        return this._textures;
+	    };
+
+	    prototypeAccessors.textures.set = function (value) // eslint-disable-line require-jsdoc
+	    {
+	        if (value[0] instanceof Texture)
+	        {
+	            this._textures = value;
+	            this._durations = null;
+	        }
+	        else
+	        {
+	            this._textures = [];
+	            this._durations = [];
+
+	            for (var i = 0; i < value.length; i++)
+	            {
+	                this._textures.push(value[i].texture);
+	                this._durations.push(value[i].time);
+	            }
+	        }
+	        this.gotoAndStop(0);
+	        this.updateTexture();
+	    };
+
+	    /**
+	    * The AnimatedSprites current frame index.
+	    *
+	    * @member {number}
+	    * @readonly
+	    */
+	    prototypeAccessors.currentFrame.get = function ()
+	    {
+	        var currentFrame = Math.floor(this._currentTime) % this._textures.length;
+
+	        if (currentFrame < 0)
+	        {
+	            currentFrame += this._textures.length;
+	        }
+
+	        return currentFrame;
+	    };
+
+	    Object.defineProperties( AnimatedSprite.prototype, prototypeAccessors );
+
+	    return AnimatedSprite;
+	}(Sprite));
+
+	// Install renderer plugins
+	Renderer.registerPlugin('accessibility', AccessibilityManager);
+	Renderer.registerPlugin('extract', Extract);
+	Renderer.registerPlugin('interaction', InteractionManager);
+	Renderer.registerPlugin('particle', ParticleRenderer);
+	Renderer.registerPlugin('prepare', Prepare);
+	Renderer.registerPlugin('batch', BatchRenderer);
+	Renderer.registerPlugin('tilingSprite', TilingSpriteRenderer);
+
+	Loader$1.registerPlugin(BitmapFontLoader);
+	Loader$1.registerPlugin(SpritesheetLoader);
+
+	Application.registerPlugin(TickerPlugin);
+	Application.registerPlugin(AppLoaderPlugin);
+
+	/**
+	 * String of the current PIXI version.
+	 *
+	 * @static
+	 * @constant
+	 * @memberof PIXI
+	 * @name VERSION
+	 * @type {string}
+	 */
+	var VERSION$1 = '5.1.4';
+
+	/**
+	 * @namespace PIXI
+	 */
+
+	/**
+	 * This namespace contains WebGL-only display filters that can be applied
+	 * to DisplayObjects using the {@link PIXI.DisplayObject#filters filters} property.
+	 *
+	 * Since PixiJS only had a handful of built-in filters, additional filters
+	 * can be downloaded {@link https://github.com/pixijs/pixi-filters here} from the
+	 * PixiJS Filters repository.
+	 *
+	 * All filters must extend {@link PIXI.Filter}.
+	 *
+	 * @example
+	 * // Create a new application
+	 * const app = new PIXI.Application();
+	 *
+	 * // Draw a green rectangle
+	 * const rect = new PIXI.Graphics()
+	 *     .beginFill(0x00ff00)
+	 *     .drawRect(40, 40, 200, 200);
+	 *
+	 * // Add a blur filter
+	 * rect.filters = [new PIXI.filters.BlurFilter()];
+	 *
+	 * // Display rectangle
+	 * app.stage.addChild(rect);
+	 * document.body.appendChild(app.view);
+	 * @namespace PIXI.filters
+	 */
+	var filters = {
+	    AlphaFilter: AlphaFilter,
+	    BlurFilter: BlurFilter,
+	    BlurFilterPass: BlurFilterPass,
+	    ColorMatrixFilter: ColorMatrixFilter,
+	    DisplacementFilter: DisplacementFilter,
+	    FXAAFilter: FXAAFilter,
+	    NoiseFilter: NoiseFilter,
+	};
+
+	exports.AbstractBatchRenderer = AbstractBatchRenderer;
+	exports.AbstractRenderer = AbstractRenderer;
+	exports.AnimatedSprite = AnimatedSprite;
+	exports.AppLoaderPlugin = AppLoaderPlugin;
+	exports.Application = Application;
+	exports.Attribute = Attribute;
+	exports.BLEND_MODES = BLEND_MODES;
+	exports.BaseRenderTexture = BaseRenderTexture;
+	exports.BaseTexture = BaseTexture;
+	exports.BatchDrawCall = BatchDrawCall;
+	exports.BatchGeometry = BatchGeometry;
+	exports.BatchPluginFactory = BatchPluginFactory;
+	exports.BatchRenderer = BatchRenderer;
+	exports.BatchShaderGenerator = BatchShaderGenerator;
+	exports.BitmapFontLoader = BitmapFontLoader;
+	exports.BitmapText = BitmapText;
+	exports.Bounds = Bounds;
+	exports.Buffer = Buffer;
+	exports.Circle = Circle;
+	exports.Container = Container;
+	exports.CubeTexture = CubeTexture;
+	exports.DEG_TO_RAD = DEG_TO_RAD;
+	exports.DRAW_MODES = DRAW_MODES;
+	exports.DisplayObject = DisplayObject;
+	exports.ENV = ENV;
+	exports.Ellipse = Ellipse;
+	exports.FORMATS = FORMATS;
+	exports.FillStyle = FillStyle;
+	exports.Filter = Filter;
+	exports.Framebuffer = Framebuffer;
+	exports.GC_MODES = GC_MODES;
+	exports.GLProgram = GLProgram;
+	exports.GLTexture = BaseTexture;
+	exports.GRAPHICS_CURVES = GRAPHICS_CURVES;
+	exports.Geometry = Geometry;
+	exports.Graphics = Graphics;
+	exports.GraphicsData = GraphicsData;
+	exports.GraphicsGeometry = GraphicsGeometry;
+	exports.GroupD8 = GroupD8;
+	exports.LineStyle = LineStyle;
+	exports.Loader = Loader$1;
+	exports.LoaderResource = LoaderResource;
+	exports.MIPMAP_MODES = MIPMAP_MODES;
+	exports.Matrix = Matrix;
+	exports.Mesh = Mesh;
+	exports.MeshBatchUvs = MeshBatchUvs;
+	exports.MeshGeometry = MeshGeometry;
+	exports.MeshMaterial = MeshMaterial;
+	exports.NineSlicePlane = NineSlicePlane;
+	exports.ObjectRenderer = ObjectRenderer;
+	exports.ObservablePoint = ObservablePoint;
+	exports.PI_2 = PI_2;
+	exports.PRECISION = PRECISION;
+	exports.ParticleContainer = ParticleContainer;
+	exports.ParticleRenderer = ParticleRenderer;
+	exports.PlaneGeometry = PlaneGeometry;
+	exports.Point = Point;
+	exports.Polygon = Polygon;
+	exports.Program = Program;
+	exports.Quad = Quad;
+	exports.QuadUv = QuadUv;
+	exports.RAD_TO_DEG = RAD_TO_DEG;
+	exports.RENDERER_TYPE = RENDERER_TYPE;
+	exports.Rectangle = Rectangle;
+	exports.RenderTexture = RenderTexture;
+	exports.RenderTexturePool = RenderTexturePool;
+	exports.Renderer = Renderer;
+	exports.RopeGeometry = RopeGeometry;
+	exports.RoundedRectangle = RoundedRectangle;
+	exports.Runner = Runner;
+	exports.SCALE_MODES = SCALE_MODES;
+	exports.SHAPES = SHAPES;
+	exports.Shader = Shader;
+	exports.SimpleMesh = SimpleMesh;
+	exports.SimplePlane = SimplePlane;
+	exports.SimpleRope = SimpleRope;
+	exports.Sprite = Sprite;
+	exports.SpriteMaskFilter = SpriteMaskFilter;
+	exports.Spritesheet = Spritesheet;
+	exports.SpritesheetLoader = SpritesheetLoader;
+	exports.State = State;
+	exports.System = System;
+	exports.TARGETS = TARGETS;
+	exports.TEXT_GRADIENT = TEXT_GRADIENT;
+	exports.TYPES = TYPES;
+	exports.Text = Text;
+	exports.TextMetrics = TextMetrics;
+	exports.TextStyle = TextStyle;
+	exports.Texture = Texture;
+	exports.TextureLoader = TextureLoader;
+	exports.TextureMatrix = TextureMatrix;
+	exports.TextureUvs = TextureUvs;
+	exports.Ticker = Ticker;
+	exports.TickerPlugin = TickerPlugin;
+	exports.TilingSprite = TilingSprite;
+	exports.TilingSpriteRenderer = TilingSpriteRenderer;
+	exports.Transform = Transform;
+	exports.UPDATE_PRIORITY = UPDATE_PRIORITY;
+	exports.UniformGroup = UniformGroup;
+	exports.VERSION = VERSION$1;
+	exports.ViewableBuffer = ViewableBuffer;
+	exports.WRAP_MODES = WRAP_MODES;
+	exports.accessibility = accessibility_es;
+	exports.autoDetectRenderer = autoDetectRenderer;
+	exports.checkMaxIfStatementsInShader = checkMaxIfStatementsInShader;
+	exports.defaultFilterVertex = defaultFilter;
+	exports.defaultVertex = _default;
+	exports.extract = extract_es;
+	exports.filters = filters;
+	exports.interaction = interaction_es;
+	exports.isMobile = isMobile_min;
+	exports.prepare = prepare_es;
+	exports.resources = index;
+	exports.settings = settings;
+	exports.systems = systems;
+	exports.useDeprecated = useDeprecated;
+	exports.utils = utils_es;
+
+	return exports;
+
+}({}));
+PIXI.useDeprecated();
+//# sourceMappingURL=pixi.js.map
diff --git a/js/pixi.js.map b/js/pixi.js.map
new file mode 100644
index 0000000..d55700f
--- /dev/null
+++ b/js/pixi.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"pixi.js","sources":["../../../node_modules/es6-promise-polyfill/promise.js","../../../node_modules/object-assign/index.js","../../../packages/polyfill/src/Promise.js","../../../packages/polyfill/src/Object.assign.js","../../../packages/polyfill/src/requestAnimationFrame.js","../../../packages/polyfill/src/Math.sign.js","../../../packages/polyfill/src/Number.isInteger.js","../../../packages/polyfill/src/index.js","../../../node_modules/ismobilejs/dist/isMobile.min.js","../../../packages/settings/src/utils/maxRecommendedTextures.js","../../../packages/settings/src/utils/canUploadSameBuffer.js","../../../packages/settings/src/settings.js","../../../node_modules/eventemitter3/index.js","../../../node_modules/earcut/src/earcut.js","../../../node_modules/url/node_modules/punycode/punycode.js","../../../node_modules/url/util.js","../../../node_modules/querystring/decode.js","../../../node_modules/querystring/encode.js","../../../node_modules/querystring/index.js","../../../node_modules/url/url.js","../../../packages/constants/src/index.js","../../../packages/utils/src/settings.js","../../../packages/utils/src/browser/hello.js","../../../packages/utils/src/browser/isWebGLSupported.js","../../../packages/utils/src/color/hex.js","../../../packages/utils/src/color/premultiply.js","../../../packages/utils/src/data/createIndicesForQuads.js","../../../packages/utils/src/data/removeItems.js","../../../packages/utils/src/data/uid.js","../../../packages/utils/src/data/sign.js","../../../packages/utils/src/data/pow2.js","../../../packages/utils/src/media/caches.js","../../../packages/utils/src/media/trimCanvas.js","../../../packages/utils/src/media/CanvasRenderTarget.js","../../../packages/utils/src/const.js","../../../packages/utils/src/network/decomposeDataUri.js","../../../packages/utils/src/network/determineCrossOrigin.js","../../../packages/utils/src/network/getResolutionOfUrl.js","../../../packages/utils/src/logging/deprecation.js","../../../packages/math/src/Point.js","../../../packages/math/src/ObservablePoint.js","../../../packages/math/src/const.js","../../../packages/math/src/Matrix.js","../../../packages/math/src/GroupD8.js","../../../packages/math/src/Transform.js","../../../packages/math/src/shapes/Rectangle.js","../../../packages/math/src/shapes/Circle.js","../../../packages/math/src/shapes/Ellipse.js","../../../packages/math/src/shapes/Polygon.js","../../../packages/math/src/shapes/RoundedRectangle.js","../../../packages/display/src/settings.js","../../../packages/display/src/Bounds.js","../../../packages/display/src/DisplayObject.js","../../../packages/display/src/Container.js","../../../packages/accessibility/src/accessibleTarget.js","../../../packages/accessibility/src/AccessibilityManager.js","../../../packages/runner/src/Runner.js","../../../packages/ticker/src/settings.js","../../../packages/ticker/src/const.js","../../../packages/ticker/src/TickerListener.js","../../../packages/ticker/src/Ticker.js","../../../packages/ticker/src/TickerPlugin.js","../../../packages/core/src/textures/resources/Resource.js","../../../packages/core/src/textures/resources/BaseImageResource.js","../../../packages/core/src/textures/resources/ImageResource.js","../../../packages/core/src/textures/resources/autoDetectResource.js","../../../packages/core/src/textures/resources/BufferResource.js","../../../packages/core/src/textures/BaseTexture.js","../../../packages/core/src/textures/resources/ArrayResource.js","../../../packages/core/src/textures/resources/CanvasResource.js","../../../packages/core/src/textures/resources/CubeResource.js","../../../packages/core/src/textures/resources/SVGResource.js","../../../packages/core/src/textures/resources/VideoResource.js","../../../packages/core/src/textures/resources/ImageBitmapResource.js","../../../packages/core/src/textures/resources/index.js","../../../packages/core/src/System.js","../../../packages/core/src/textures/resources/DepthResource.js","../../../packages/core/src/framebuffer/Framebuffer.js","../../../packages/core/src/renderTexture/BaseRenderTexture.js","../../../packages/core/src/textures/TextureUvs.js","../../../packages/core/src/textures/Texture.js","../../../packages/core/src/renderTexture/RenderTexture.js","../../../packages/core/src/renderTexture/RenderTexturePool.js","../../../packages/core/src/geometry/Attribute.js","../../../packages/core/src/geometry/Buffer.js","../../../packages/core/src/geometry/utils/getBufferType.js","../../../packages/core/src/geometry/utils/interleaveTypedArrays.js","../../../packages/core/src/geometry/Geometry.js","../../../packages/core/src/utils/Quad.js","../../../packages/core/src/utils/QuadUv.js","../../../packages/core/src/shader/UniformGroup.js","../../../packages/core/src/filters/FilterSystem.js","../../../packages/core/src/batch/ObjectRenderer.js","../../../packages/core/src/batch/BatchSystem.js","../../../packages/core/src/settings.js","../../../packages/core/src/context/ContextSystem.js","../../../packages/core/src/framebuffer/FramebufferSystem.js","../../../packages/core/src/geometry/GLBuffer.js","../../../packages/core/src/geometry/GeometrySystem.js","../../../packages/core/src/shader/utils/compileProgram.js","../../../packages/core/src/shader/utils/defaultValue.js","../../../packages/core/src/shader/utils/getTestContext.js","../../../packages/core/src/shader/utils/getMaxFragmentPrecision.js","../../../packages/core/src/shader/utils/setPrecision.js","../../../packages/core/src/shader/utils/mapSize.js","../../../packages/core/src/shader/utils/mapType.js","../../../packages/core/src/shader/utils/generateUniformsSync.js","../../../packages/core/src/shader/utils/checkMaxIfStatementsInShader.js","../../../packages/core/src/shader/utils/unsafeEvalSupported.js","../../../packages/core/src/shader/Program.js","../../../packages/core/src/shader/Shader.js","../../../packages/core/src/state/State.js","../../../packages/core/src/filters/Filter.js","../../../packages/core/src/textures/TextureMatrix.js","../../../packages/core/src/filters/spriteMask/SpriteMaskFilter.js","../../../packages/core/src/mask/MaskSystem.js","../../../packages/core/src/mask/StencilSystem.js","../../../packages/core/src/projection/ProjectionSystem.js","../../../packages/core/src/renderTexture/RenderTextureSystem.js","../../../packages/core/src/shader/GLProgram.js","../../../packages/core/src/shader/ShaderSystem.js","../../../packages/core/src/state/utils/mapWebGLBlendModesToPixi.js","../../../packages/core/src/state/StateSystem.js","../../../packages/core/src/textures/TextureGCSystem.js","../../../packages/core/src/textures/GLTexture.js","../../../packages/core/src/textures/TextureSystem.js","../../../packages/core/src/AbstractRenderer.js","../../../packages/core/src/Renderer.js","../../../packages/core/src/autoDetectRenderer.js","../../../packages/core/src/textures/CubeTexture.js","../../../packages/core/src/batch/BatchDrawCall.js","../../../packages/core/src/geometry/ViewableBuffer.js","../../../packages/core/src/batch/AbstractBatchRenderer.js","../../../packages/core/src/batch/BatchShaderGenerator.js","../../../packages/core/src/batch/BatchGeometry.js","../../../packages/core/src/batch/BatchPluginFactory.js","../../../packages/extract/src/Extract.js","../../../packages/interaction/src/InteractionData.js","../../../packages/interaction/src/InteractionEvent.js","../../../packages/interaction/src/InteractionTrackingData.js","../../../packages/interaction/src/interactiveTarget.js","../../../packages/interaction/src/InteractionManager.js","../../../packages/graphics/src/const.js","../../../packages/graphics/src/styles/FillStyle.js","../../../packages/graphics/src/GraphicsData.js","../../../packages/graphics/src/utils/buildCircle.js","../../../packages/graphics/src/utils/buildLine.js","../../../packages/graphics/src/utils/buildPoly.js","../../../packages/graphics/src/utils/buildRectangle.js","../../../packages/graphics/src/utils/buildRoundedRectangle.js","../../../packages/graphics/src/GraphicsGeometry.js","../../../packages/graphics/src/styles/LineStyle.js","../../../packages/graphics/src/utils/BezierUtils.js","../../../packages/graphics/src/utils/QuadraticUtils.js","../../../packages/graphics/src/utils/ArcUtils.js","../../../packages/graphics/src/utils/Star.js","../../../packages/graphics/src/Graphics.js","../../../packages/sprite/src/Sprite.js","../../../packages/text/src/const.js","../../../packages/text/src/TextStyle.js","../../../packages/text/src/TextMetrics.js","../../../packages/text/src/Text.js","../../../packages/prepare/src/settings.js","../../../packages/prepare/src/CountLimiter.js","../../../packages/prepare/src/BasePrepare.js","../../../packages/prepare/src/Prepare.js","../../../packages/prepare/src/TimeLimiter.js","../../../packages/app/src/Application.js","../../../packages/app/src/ResizePlugin.js","../../../packages/app/src/index.js","../../../node_modules/parse-uri/index.js","../../../node_modules/mini-signals/lib/mini-signals.js","../../../node_modules/resource-loader/src/async.js","../../../node_modules/resource-loader/src/middleware/caching.js","../../../node_modules/resource-loader/src/Resource.js","../../../node_modules/resource-loader/src/encodeBinary.js","../../../node_modules/resource-loader/src/middleware/parsing.js","../../../node_modules/resource-loader/src/Loader.js","../../../packages/loaders/src/TextureLoader.js","../../../packages/loaders/src/Loader.js","../../../packages/loaders/src/AppLoaderPlugin.js","../../../packages/loaders/src/index.js","../../../packages/particles/src/ParticleContainer.js","../../../packages/particles/src/ParticleBuffer.js","../../../packages/particles/src/ParticleRenderer.js","../../../packages/spritesheet/src/Spritesheet.js","../../../packages/spritesheet/src/SpritesheetLoader.js","../../../packages/sprite-tiling/src/TilingSprite.js","../../../packages/sprite-tiling/src/TilingSpriteRenderer.js","../../../packages/text-bitmap/src/BitmapText.js","../../../packages/text-bitmap/src/BitmapFontLoader.js","../../../packages/filters/filter-alpha/src/AlphaFilter.js","../../../packages/filters/filter-blur/src/generateBlurVertSource.js","../../../packages/filters/filter-blur/src/generateBlurFragSource.js","../../../packages/filters/filter-blur/src/BlurFilterPass.js","../../../packages/filters/filter-blur/src/BlurFilter.js","../../../packages/filters/filter-color-matrix/src/ColorMatrixFilter.js","../../../packages/filters/filter-displacement/src/DisplacementFilter.js","../../../packages/filters/filter-fxaa/src/FXAAFilter.js","../../../packages/filters/filter-noise/src/NoiseFilter.js","../../../packages/mixin-cache-as-bitmap/src/index.js","../../../packages/mixin-get-child-by-name/src/index.js","../../../packages/mixin-get-global-position/src/index.js","../src/useDeprecated.js","../../../packages/mesh/src/MeshBatchUvs.js","../../../packages/mesh/src/Mesh.js","../../../packages/mesh/src/MeshMaterial.js","../../../packages/mesh/src/MeshGeometry.js","../../../packages/mesh-extras/src/geometry/PlaneGeometry.js","../../../packages/mesh-extras/src/geometry/RopeGeometry.js","../../../packages/mesh-extras/src/SimpleRope.js","../../../packages/mesh-extras/src/SimplePlane.js","../../../packages/mesh-extras/src/SimpleMesh.js","../../../packages/mesh-extras/src/NineSlicePlane.js","../../../packages/sprite-animated/src/AnimatedSprite.js","../src/index.js"],"sourcesContent":["(function(global){\n\n//\n// Check for native Promise and it has correct interface\n//\n\nvar NativePromise = global['Promise'];\nvar nativePromiseSupported =\n  NativePromise &&\n  // Some of these methods are missing from\n  // Firefox/Chrome experimental implementations\n  'resolve' in NativePromise &&\n  'reject' in NativePromise &&\n  'all' in NativePromise &&\n  'race' in NativePromise &&\n  // Older version of the spec had a resolver object\n  // as the arg rather than a function\n  (function(){\n    var resolve;\n    new NativePromise(function(r){ resolve = r; });\n    return typeof resolve === 'function';\n  })();\n\n\n//\n// export if necessary\n//\n\nif (typeof exports !== 'undefined' && exports)\n{\n  // node.js\n  exports.Promise = nativePromiseSupported ? NativePromise : Promise;\n  exports.Polyfill = Promise;\n}\nelse\n{\n  // AMD\n  if (typeof define == 'function' && define.amd)\n  {\n    define(function(){\n      return nativePromiseSupported ? NativePromise : Promise;\n    });\n  }\n  else\n  {\n    // in browser add to global\n    if (!nativePromiseSupported)\n      global['Promise'] = Promise;\n  }\n}\n\n\n//\n// Polyfill\n//\n\nvar PENDING = 'pending';\nvar SEALED = 'sealed';\nvar FULFILLED = 'fulfilled';\nvar REJECTED = 'rejected';\nvar NOOP = function(){};\n\nfunction isArray(value) {\n  return Object.prototype.toString.call(value) === '[object Array]';\n}\n\n// async calls\nvar asyncSetTimer = typeof setImmediate !== 'undefined' ? setImmediate : setTimeout;\nvar asyncQueue = [];\nvar asyncTimer;\n\nfunction asyncFlush(){\n  // run promise callbacks\n  for (var i = 0; i < asyncQueue.length; i++)\n    asyncQueue[i][0](asyncQueue[i][1]);\n\n  // reset async asyncQueue\n  asyncQueue = [];\n  asyncTimer = false;\n}\n\nfunction asyncCall(callback, arg){\n  asyncQueue.push([callback, arg]);\n\n  if (!asyncTimer)\n  {\n    asyncTimer = true;\n    asyncSetTimer(asyncFlush, 0);\n  }\n}\n\n\nfunction invokeResolver(resolver, promise) {\n  function resolvePromise(value) {\n    resolve(promise, value);\n  }\n\n  function rejectPromise(reason) {\n    reject(promise, reason);\n  }\n\n  try {\n    resolver(resolvePromise, rejectPromise);\n  } catch(e) {\n    rejectPromise(e);\n  }\n}\n\nfunction invokeCallback(subscriber){\n  var owner = subscriber.owner;\n  var settled = owner.state_;\n  var value = owner.data_;  \n  var callback = subscriber[settled];\n  var promise = subscriber.then;\n\n  if (typeof callback === 'function')\n  {\n    settled = FULFILLED;\n    try {\n      value = callback(value);\n    } catch(e) {\n      reject(promise, e);\n    }\n  }\n\n  if (!handleThenable(promise, value))\n  {\n    if (settled === FULFILLED)\n      resolve(promise, value);\n\n    if (settled === REJECTED)\n      reject(promise, value);\n  }\n}\n\nfunction handleThenable(promise, value) {\n  var resolved;\n\n  try {\n    if (promise === value)\n      throw new TypeError('A promises callback cannot return that same promise.');\n\n    if (value && (typeof value === 'function' || typeof value === 'object'))\n    {\n      var then = value.then;  // then should be retrived only once\n\n      if (typeof then === 'function')\n      {\n        then.call(value, function(val){\n          if (!resolved)\n          {\n            resolved = true;\n\n            if (value !== val)\n              resolve(promise, val);\n            else\n              fulfill(promise, val);\n          }\n        }, function(reason){\n          if (!resolved)\n          {\n            resolved = true;\n\n            reject(promise, reason);\n          }\n        });\n\n        return true;\n      }\n    }\n  } catch (e) {\n    if (!resolved)\n      reject(promise, e);\n\n    return true;\n  }\n\n  return false;\n}\n\nfunction resolve(promise, value){\n  if (promise === value || !handleThenable(promise, value))\n    fulfill(promise, value);\n}\n\nfunction fulfill(promise, value){\n  if (promise.state_ === PENDING)\n  {\n    promise.state_ = SEALED;\n    promise.data_ = value;\n\n    asyncCall(publishFulfillment, promise);\n  }\n}\n\nfunction reject(promise, reason){\n  if (promise.state_ === PENDING)\n  {\n    promise.state_ = SEALED;\n    promise.data_ = reason;\n\n    asyncCall(publishRejection, promise);\n  }\n}\n\nfunction publish(promise) {\n  var callbacks = promise.then_;\n  promise.then_ = undefined;\n\n  for (var i = 0; i < callbacks.length; i++) {\n    invokeCallback(callbacks[i]);\n  }\n}\n\nfunction publishFulfillment(promise){\n  promise.state_ = FULFILLED;\n  publish(promise);\n}\n\nfunction publishRejection(promise){\n  promise.state_ = REJECTED;\n  publish(promise);\n}\n\n/**\n* @class\n*/\nfunction Promise(resolver){\n  if (typeof resolver !== 'function')\n    throw new TypeError('Promise constructor takes a function argument');\n\n  if (this instanceof Promise === false)\n    throw new TypeError('Failed to construct \\'Promise\\': Please use the \\'new\\' operator, this object constructor cannot be called as a function.');\n\n  this.then_ = [];\n\n  invokeResolver(resolver, this);\n}\n\nPromise.prototype = {\n  constructor: Promise,\n\n  state_: PENDING,\n  then_: null,\n  data_: undefined,\n\n  then: function(onFulfillment, onRejection){\n    var subscriber = {\n      owner: this,\n      then: new this.constructor(NOOP),\n      fulfilled: onFulfillment,\n      rejected: onRejection\n    };\n\n    if (this.state_ === FULFILLED || this.state_ === REJECTED)\n    {\n      // already resolved, call callback async\n      asyncCall(invokeCallback, subscriber);\n    }\n    else\n    {\n      // subscribe\n      this.then_.push(subscriber);\n    }\n\n    return subscriber.then;\n  },\n\n  'catch': function(onRejection) {\n    return this.then(null, onRejection);\n  }\n};\n\nPromise.all = function(promises){\n  var Class = this;\n\n  if (!isArray(promises))\n    throw new TypeError('You must pass an array to Promise.all().');\n\n  return new Class(function(resolve, reject){\n    var results = [];\n    var remaining = 0;\n\n    function resolver(index){\n      remaining++;\n      return function(value){\n        results[index] = value;\n        if (!--remaining)\n          resolve(results);\n      };\n    }\n\n    for (var i = 0, promise; i < promises.length; i++)\n    {\n      promise = promises[i];\n\n      if (promise && typeof promise.then === 'function')\n        promise.then(resolver(i), reject);\n      else\n        results[i] = promise;\n    }\n\n    if (!remaining)\n      resolve(results);\n  });\n};\n\nPromise.race = function(promises){\n  var Class = this;\n\n  if (!isArray(promises))\n    throw new TypeError('You must pass an array to Promise.race().');\n\n  return new Class(function(resolve, reject) {\n    for (var i = 0, promise; i < promises.length; i++)\n    {\n      promise = promises[i];\n\n      if (promise && typeof promise.then === 'function')\n        promise.then(resolve, reject);\n      else\n        resolve(promise);\n    }\n  });\n};\n\nPromise.resolve = function(value){\n  var Class = this;\n\n  if (value && typeof value === 'object' && value.constructor === Class)\n    return value;\n\n  return new Class(function(resolve){\n    resolve(value);\n  });\n};\n\nPromise.reject = function(reason){\n  var Class = this;\n\n  return new Class(function(resolve, reject){\n    reject(reason);\n  });\n};\n\n})(typeof window != 'undefined' ? window : typeof global != 'undefined' ? global : typeof self != 'undefined' ? self : this);\n","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc');  // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","import { Polyfill } from 'es6-promise-polyfill';\n\n// Support for IE 9 - 11 which does not include Promises\nif (!window.Promise)\n{\n    window.Promise = Polyfill;\n}\n","// References:\n// https://github.com/sindresorhus/object-assign\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign\n\nimport objectAssign from 'object-assign';\n\nif (!Object.assign)\n{\n    Object.assign = objectAssign;\n}\n","// References:\n// http://paulirish.com/2011/requestanimationframe-for-smart-animating/\n// https://gist.github.com/1579671\n// http://updates.html5rocks.com/2012/05/requestAnimationFrame-API-now-with-sub-millisecond-precision\n// https://gist.github.com/timhall/4078614\n// https://github.com/Financial-Times/polyfill-service/tree/master/polyfills/requestAnimationFrame\n\n// Expected to be used with Browserfiy\n// Browserify automatically detects the use of `global` and passes the\n// correct reference of `global`, `self`, and finally `window`\n\nconst ONE_FRAME_TIME = 16;\n\n// Date.now\nif (!(Date.now && Date.prototype.getTime))\n{\n    Date.now = function now()\n    {\n        return new Date().getTime();\n    };\n}\n\n// performance.now\nif (!(global.performance && global.performance.now))\n{\n    const startTime = Date.now();\n\n    if (!global.performance)\n    {\n        global.performance = {};\n    }\n\n    global.performance.now = () => Date.now() - startTime;\n}\n\n// requestAnimationFrame\nlet lastTime = Date.now();\nconst vendors = ['ms', 'moz', 'webkit', 'o'];\n\nfor (let x = 0; x < vendors.length && !global.requestAnimationFrame; ++x)\n{\n    const p = vendors[x];\n\n    global.requestAnimationFrame = global[`${p}RequestAnimationFrame`];\n    global.cancelAnimationFrame = global[`${p}CancelAnimationFrame`] || global[`${p}CancelRequestAnimationFrame`];\n}\n\nif (!global.requestAnimationFrame)\n{\n    global.requestAnimationFrame = (callback) =>\n    {\n        if (typeof callback !== 'function')\n        {\n            throw new TypeError(`${callback}is not a function`);\n        }\n\n        const currentTime = Date.now();\n        let delay = ONE_FRAME_TIME + lastTime - currentTime;\n\n        if (delay < 0)\n        {\n            delay = 0;\n        }\n\n        lastTime = currentTime;\n\n        return setTimeout(() =>\n        {\n            lastTime = Date.now();\n            callback(performance.now());\n        }, delay);\n    };\n}\n\nif (!global.cancelAnimationFrame)\n{\n    global.cancelAnimationFrame = (id) => clearTimeout(id);\n}\n","// References:\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/sign\n\nif (!Math.sign)\n{\n    Math.sign = function mathSign(x)\n    {\n        x = Number(x);\n\n        if (x === 0 || isNaN(x))\n        {\n            return x;\n        }\n\n        return x > 0 ? 1 : -1;\n    };\n}\n","// References:\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isInteger\n\nif (!Number.isInteger)\n{\n    Number.isInteger = function numberIsInteger(value)\n    {\n        return typeof value === 'number' && isFinite(value) && Math.floor(value) === value;\n    };\n}\n","import './Promise';\nimport './Object.assign';\nimport './requestAnimationFrame';\nimport './Math.sign';\nimport './Number.isInteger';\n\nif (!window.ArrayBuffer)\n{\n    window.ArrayBuffer = Array;\n}\n\nif (!window.Float32Array)\n{\n    window.Float32Array = Array;\n}\n\nif (!window.Uint32Array)\n{\n    window.Uint32Array = Array;\n}\n\nif (!window.Uint16Array)\n{\n    window.Uint16Array = Array;\n}\n\nif (!window.Uint8Array)\n{\n    window.Uint8Array = Array;\n}\n\nif (!window.Int32Array)\n{\n    window.Int32Array = Array;\n}\n","!function(e){var n=/iPhone/i,t=/iPod/i,r=/iPad/i,a=/\\bAndroid(?:.+)Mobile\\b/i,p=/Android/i,b=/\\bAndroid(?:.+)SD4930UR\\b/i,l=/\\bAndroid(?:.+)(?:KF[A-Z]{2,4})\\b/i,f=/Windows Phone/i,s=/\\bWindows(?:.+)ARM\\b/i,u=/BlackBerry/i,c=/BB10/i,h=/Opera Mini/i,v=/\\b(CriOS|Chrome)(?:.+)Mobile/i,w=/Mobile(?:.+)Firefox\\b/i;function m(e,i){return e.test(i)}function i(e){var i=e||(\"undefined\"!=typeof navigator?navigator.userAgent:\"\"),o=i.split(\"[FBAN\");void 0!==o[1]&&(i=o[0]),void 0!==(o=i.split(\"Twitter\"))[1]&&(i=o[0]);var d={apple:{phone:m(n,i)&&!m(f,i),ipod:m(t,i),tablet:!m(n,i)&&m(r,i)&&!m(f,i),device:(m(n,i)||m(t,i)||m(r,i))&&!m(f,i)},amazon:{phone:m(b,i),tablet:!m(b,i)&&m(l,i),device:m(b,i)||m(l,i)},android:{phone:!m(f,i)&&m(b,i)||!m(f,i)&&m(a,i),tablet:!m(f,i)&&!m(b,i)&&!m(a,i)&&(m(l,i)||m(p,i)),device:!m(f,i)&&(m(b,i)||m(l,i)||m(a,i)||m(p,i))||m(/\\bokhttp\\b/i,i)},windows:{phone:m(f,i),tablet:m(s,i),device:m(f,i)||m(s,i)},other:{blackberry:m(u,i),blackberry10:m(c,i),opera:m(h,i),firefox:m(w,i),chrome:m(v,i),device:m(u,i)||m(c,i)||m(h,i)||m(w,i)||m(v,i)}};return d.any=d.apple.device||d.android.device||d.windows.device||d.other.device,d.phone=d.apple.phone||d.android.phone||d.windows.phone,d.tablet=d.apple.tablet||d.android.tablet||d.windows.tablet,d}\"undefined\"!=typeof module&&module.exports&&\"undefined\"==typeof window?module.exports=i:\"undefined\"!=typeof module&&module.exports&&\"undefined\"!=typeof window?(module.exports=i(),module.exports.isMobile=i):\"function\"==typeof define&&define.amd?define([],e.isMobile=i()):e.isMobile=i()}(this);","import isMobile from 'ismobilejs';\n\n/**\n * The maximum recommended texture units to use.\n * In theory the bigger the better, and for desktop we'll use as many as we can.\n * But some mobile devices slow down if there is to many branches in the shader.\n * So in practice there seems to be a sweet spot size that varies depending on the device.\n *\n * In v4, all mobile devices were limited to 4 texture units because for this.\n * In v5, we allow all texture units to be used on modern Apple or Android devices.\n *\n * @private\n * @param {number} max\n * @returns {number}\n */\nexport default function maxRecommendedTextures(max)\n{\n    let allowMax = true;\n\n    if (isMobile.tablet || isMobile.phone)\n    {\n        allowMax = false;\n\n        if (isMobile.apple.device)\n        {\n            const match = (navigator.userAgent).match(/OS (\\d+)_(\\d+)?/);\n\n            if (match)\n            {\n                const majorVersion = parseInt(match[1], 10);\n\n                // All texture units can be used on devices that support ios 11 or above\n                if (majorVersion >= 11)\n                {\n                    allowMax = true;\n                }\n            }\n        }\n        if (isMobile.android.device)\n        {\n            const match = (navigator.userAgent).match(/Android\\s([0-9.]*)/);\n\n            if (match)\n            {\n                const majorVersion = parseInt(match[1], 10);\n\n                // All texture units can be used on devices that support Android 7 (Nougat) or above\n                if (majorVersion >= 7)\n                {\n                    allowMax = true;\n                }\n            }\n        }\n    }\n\n    return allowMax ? max : 4;\n}\n","import isMobile from 'ismobilejs';\n\n/**\n * Uploading the same buffer multiple times in a single frame can cause performance issues.\n * Apparent on iOS so only check for that at the moment\n * This check may become more complex if this issue pops up elsewhere.\n *\n * @private\n * @returns {boolean}\n */\nexport default function canUploadSameBuffer()\n{\n    return !isMobile.apple.device;\n}\n","import isMobile from 'ismobilejs';\nimport maxRecommendedTextures from './utils/maxRecommendedTextures';\nimport canUploadSameBuffer from './utils/canUploadSameBuffer';\n\n/**\n * User's customizable globals for overriding the default PIXI settings, such\n * as a renderer's default resolution, framerate, float precision, etc.\n * @example\n * // Use the native window resolution as the default resolution\n * // will support high-density displays when rendering\n * PIXI.settings.RESOLUTION = window.devicePixelRatio;\n *\n * // Disable interpolation when scaling, will make texture be pixelated\n * PIXI.settings.SCALE_MODE = PIXI.SCALE_MODES.NEAREST;\n * @namespace PIXI.settings\n */\nexport default {\n\n    /**\n     * If set to true WebGL will attempt make textures mimpaped by default.\n     * Mipmapping will only succeed if the base texture uploaded has power of two dimensions.\n     *\n     * @static\n     * @name MIPMAP_TEXTURES\n     * @memberof PIXI.settings\n     * @type {PIXI.MIPMAP_MODES}\n     * @default PIXI.MIPMAP_MODES.POW2\n     */\n    MIPMAP_TEXTURES: 1,\n\n    /**\n     * Default anisotropic filtering level of textures.\n     * Usually from 0 to 16\n     *\n     * @static\n     * @name ANISOTROPIC_LEVEL\n     * @memberof PIXI.settings\n     * @type {number}\n     * @default 0\n     */\n    ANISOTROPIC_LEVEL: 0,\n\n    /**\n     * Default resolution / device pixel ratio of the renderer.\n     *\n     * @static\n     * @name RESOLUTION\n     * @memberof PIXI.settings\n     * @type {number}\n     * @default 1\n     */\n    RESOLUTION: 1,\n\n    /**\n     * Default filter resolution.\n     *\n     * @static\n     * @name FILTER_RESOLUTION\n     * @memberof PIXI.settings\n     * @type {number}\n     * @default 1\n     */\n    FILTER_RESOLUTION: 1,\n\n    /**\n     * The maximum textures that this device supports.\n     *\n     * @static\n     * @name SPRITE_MAX_TEXTURES\n     * @memberof PIXI.settings\n     * @type {number}\n     * @default 32\n     */\n    SPRITE_MAX_TEXTURES: maxRecommendedTextures(32),\n\n    // TODO: maybe change to SPRITE.BATCH_SIZE: 2000\n    // TODO: maybe add PARTICLE.BATCH_SIZE: 15000\n\n    /**\n     * The default sprite batch size.\n     *\n     * The default aims to balance desktop and mobile devices.\n     *\n     * @static\n     * @name SPRITE_BATCH_SIZE\n     * @memberof PIXI.settings\n     * @type {number}\n     * @default 4096\n     */\n    SPRITE_BATCH_SIZE: 4096,\n\n    /**\n     * The default render options if none are supplied to {@link PIXI.Renderer}\n     * or {@link PIXI.CanvasRenderer}.\n     *\n     * @static\n     * @name RENDER_OPTIONS\n     * @memberof PIXI.settings\n     * @type {object}\n     * @property {HTMLCanvasElement} view=null\n     * @property {number} resolution=1\n     * @property {boolean} antialias=false\n     * @property {boolean} forceFXAA=false\n     * @property {boolean} autoDensity=false\n     * @property {boolean} transparent=false\n     * @property {number} backgroundColor=0x000000\n     * @property {boolean} clearBeforeRender=true\n     * @property {boolean} preserveDrawingBuffer=false\n     * @property {number} width=800\n     * @property {number} height=600\n     * @property {boolean} legacy=false\n     */\n    RENDER_OPTIONS: {\n        view: null,\n        antialias: false,\n        forceFXAA: false,\n        autoDensity: false,\n        transparent: false,\n        backgroundColor: 0x000000,\n        clearBeforeRender: true,\n        preserveDrawingBuffer: false,\n        width: 800,\n        height: 600,\n        legacy: false,\n    },\n\n    /**\n     * Default Garbage Collection mode.\n     *\n     * @static\n     * @name GC_MODE\n     * @memberof PIXI.settings\n     * @type {PIXI.GC_MODES}\n     * @default PIXI.GC_MODES.AUTO\n     */\n    GC_MODE: 0,\n\n    /**\n     * Default Garbage Collection max idle.\n     *\n     * @static\n     * @name GC_MAX_IDLE\n     * @memberof PIXI.settings\n     * @type {number}\n     * @default 3600\n     */\n    GC_MAX_IDLE: 60 * 60,\n\n    /**\n     * Default Garbage Collection maximum check count.\n     *\n     * @static\n     * @name GC_MAX_CHECK_COUNT\n     * @memberof PIXI.settings\n     * @type {number}\n     * @default 600\n     */\n    GC_MAX_CHECK_COUNT: 60 * 10,\n\n    /**\n     * Default wrap modes that are supported by pixi.\n     *\n     * @static\n     * @name WRAP_MODE\n     * @memberof PIXI.settings\n     * @type {PIXI.WRAP_MODES}\n     * @default PIXI.WRAP_MODES.CLAMP\n     */\n    WRAP_MODE: 33071,\n\n    /**\n     * Default scale mode for textures.\n     *\n     * @static\n     * @name SCALE_MODE\n     * @memberof PIXI.settings\n     * @type {PIXI.SCALE_MODES}\n     * @default PIXI.SCALE_MODES.LINEAR\n     */\n    SCALE_MODE: 1,\n\n    /**\n     * Default specify float precision in vertex shader.\n     *\n     * @static\n     * @name PRECISION_VERTEX\n     * @memberof PIXI.settings\n     * @type {PIXI.PRECISION}\n     * @default PIXI.PRECISION.HIGH\n     */\n    PRECISION_VERTEX: 'highp',\n\n    /**\n     * Default specify float precision in fragment shader.\n     * iOS is best set at highp due to https://github.com/pixijs/pixi.js/issues/3742\n     *\n     * @static\n     * @name PRECISION_FRAGMENT\n     * @memberof PIXI.settings\n     * @type {PIXI.PRECISION}\n     * @default PIXI.PRECISION.MEDIUM\n     */\n    PRECISION_FRAGMENT: isMobile.apple.device ? 'highp' : 'mediump',\n\n    /**\n     * Can we upload the same buffer in a single frame?\n     *\n     * @static\n     * @name CAN_UPLOAD_SAME_BUFFER\n     * @memberof PIXI.settings\n     * @type {boolean}\n     */\n    CAN_UPLOAD_SAME_BUFFER: canUploadSameBuffer(),\n\n    /**\n     * Enables bitmap creation before image load. This feature is experimental.\n     *\n     * @static\n     * @name CREATE_IMAGE_BITMAP\n     * @memberof PIXI.settings\n     * @type {boolean}\n     * @default false\n     */\n    CREATE_IMAGE_BITMAP: false,\n\n    /**\n     * If true PixiJS will Math.floor() x/y values when rendering, stopping pixel interpolation.\n     * Advantages can include sharper image quality (like text) and faster rendering on canvas.\n     * The main disadvantage is movement of objects may appear less smooth.\n     *\n     * @static\n     * @constant\n     * @memberof PIXI.settings\n     * @type {boolean}\n     * @default false\n     */\n    ROUND_PIXELS: false,\n};\n","'use strict';\n\nvar has = Object.prototype.hasOwnProperty\n  , prefix = '~';\n\n/**\n * Constructor to create a storage for our `EE` objects.\n * An `Events` instance is a plain object whose properties are event names.\n *\n * @constructor\n * @private\n */\nfunction Events() {}\n\n//\n// We try to not inherit from `Object.prototype`. In some engines creating an\n// instance in this way is faster than calling `Object.create(null)` directly.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// character to make sure that the built-in object properties are not\n// overridden or used as an attack vector.\n//\nif (Object.create) {\n  Events.prototype = Object.create(null);\n\n  //\n  // This hack is needed because the `__proto__` property is still inherited in\n  // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.\n  //\n  if (!new Events().__proto__) prefix = false;\n}\n\n/**\n * Representation of a single event listener.\n *\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n * @constructor\n * @private\n */\nfunction EE(fn, context, once) {\n  this.fn = fn;\n  this.context = context;\n  this.once = once || false;\n}\n\n/**\n * Add a listener for a given event.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} once Specify if the listener is a one-time listener.\n * @returns {EventEmitter}\n * @private\n */\nfunction addListener(emitter, event, fn, context, once) {\n  if (typeof fn !== 'function') {\n    throw new TypeError('The listener must be a function');\n  }\n\n  var listener = new EE(fn, context || emitter, once)\n    , evt = prefix ? prefix + event : event;\n\n  if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;\n  else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);\n  else emitter._events[evt] = [emitter._events[evt], listener];\n\n  return emitter;\n}\n\n/**\n * Clear event by name.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} evt The Event name.\n * @private\n */\nfunction clearEvent(emitter, evt) {\n  if (--emitter._eventsCount === 0) emitter._events = new Events();\n  else delete emitter._events[evt];\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @public\n */\nfunction EventEmitter() {\n  this._events = new Events();\n  this._eventsCount = 0;\n}\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n  var names = []\n    , events\n    , name;\n\n  if (this._eventsCount === 0) return names;\n\n  for (name in (events = this._events)) {\n    if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n  }\n\n  if (Object.getOwnPropertySymbols) {\n    return names.concat(Object.getOwnPropertySymbols(events));\n  }\n\n  return names;\n};\n\n/**\n * Return the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Array} The registered listeners.\n * @public\n */\nEventEmitter.prototype.listeners = function listeners(event) {\n  var evt = prefix ? prefix + event : event\n    , handlers = this._events[evt];\n\n  if (!handlers) return [];\n  if (handlers.fn) return [handlers.fn];\n\n  for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\n    ee[i] = handlers[i].fn;\n  }\n\n  return ee;\n};\n\n/**\n * Return the number of listeners listening to a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Number} The number of listeners.\n * @public\n */\nEventEmitter.prototype.listenerCount = function listenerCount(event) {\n  var evt = prefix ? prefix + event : event\n    , listeners = this._events[evt];\n\n  if (!listeners) return 0;\n  if (listeners.fn) return 1;\n  return listeners.length;\n};\n\n/**\n * Calls each of the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Boolean} `true` if the event had listeners, else `false`.\n * @public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n  var evt = prefix ? prefix + event : event;\n\n  if (!this._events[evt]) return false;\n\n  var listeners = this._events[evt]\n    , len = arguments.length\n    , args\n    , i;\n\n  if (listeners.fn) {\n    if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n\n    switch (len) {\n      case 1: return listeners.fn.call(listeners.context), true;\n      case 2: return listeners.fn.call(listeners.context, a1), true;\n      case 3: return listeners.fn.call(listeners.context, a1, a2), true;\n      case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n      case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n      case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n    }\n\n    for (i = 1, args = new Array(len -1); i < len; i++) {\n      args[i - 1] = arguments[i];\n    }\n\n    listeners.fn.apply(listeners.context, args);\n  } else {\n    var length = listeners.length\n      , j;\n\n    for (i = 0; i < length; i++) {\n      if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n\n      switch (len) {\n        case 1: listeners[i].fn.call(listeners[i].context); break;\n        case 2: listeners[i].fn.call(listeners[i].context, a1); break;\n        case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;\n        case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;\n        default:\n          if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {\n            args[j - 1] = arguments[j];\n          }\n\n          listeners[i].fn.apply(listeners[i].context, args);\n      }\n    }\n  }\n\n  return true;\n};\n\n/**\n * Add a listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n  return addListener(this, event, fn, context, false);\n};\n\n/**\n * Add a one-time listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n  return addListener(this, event, fn, context, true);\n};\n\n/**\n * Remove the listeners of a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn Only remove the listeners that match this function.\n * @param {*} context Only remove the listeners that have this context.\n * @param {Boolean} once Only remove one-time listeners.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n  var evt = prefix ? prefix + event : event;\n\n  if (!this._events[evt]) return this;\n  if (!fn) {\n    clearEvent(this, evt);\n    return this;\n  }\n\n  var listeners = this._events[evt];\n\n  if (listeners.fn) {\n    if (\n      listeners.fn === fn &&\n      (!once || listeners.once) &&\n      (!context || listeners.context === context)\n    ) {\n      clearEvent(this, evt);\n    }\n  } else {\n    for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n      if (\n        listeners[i].fn !== fn ||\n        (once && !listeners[i].once) ||\n        (context && listeners[i].context !== context)\n      ) {\n        events.push(listeners[i]);\n      }\n    }\n\n    //\n    // Reset the array, or remove it completely if we have no more listeners.\n    //\n    if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;\n    else clearEvent(this, evt);\n  }\n\n  return this;\n};\n\n/**\n * Remove all listeners, or those of the specified event.\n *\n * @param {(String|Symbol)} [event] The event name.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n  var evt;\n\n  if (event) {\n    evt = prefix ? prefix + event : event;\n    if (this._events[evt]) clearEvent(this, evt);\n  } else {\n    this._events = new Events();\n    this._eventsCount = 0;\n  }\n\n  return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Allow `EventEmitter` to be imported as module namespace.\n//\nEventEmitter.EventEmitter = EventEmitter;\n\n//\n// Expose the module.\n//\nif ('undefined' !== typeof module) {\n  module.exports = EventEmitter;\n}\n","'use strict';\n\nmodule.exports = earcut;\nmodule.exports.default = earcut;\n\nfunction earcut(data, holeIndices, dim) {\n\n    dim = dim || 2;\n\n    var hasHoles = holeIndices && holeIndices.length,\n        outerLen = hasHoles ? holeIndices[0] * dim : data.length,\n        outerNode = linkedList(data, 0, outerLen, dim, true),\n        triangles = [];\n\n    if (!outerNode || outerNode.next === outerNode.prev) return triangles;\n\n    var minX, minY, maxX, maxY, x, y, invSize;\n\n    if (hasHoles) outerNode = eliminateHoles(data, holeIndices, outerNode, dim);\n\n    // if the shape is not too simple, we'll use z-order curve hash later; calculate polygon bbox\n    if (data.length > 80 * dim) {\n        minX = maxX = data[0];\n        minY = maxY = data[1];\n\n        for (var i = dim; i < outerLen; i += dim) {\n            x = data[i];\n            y = data[i + 1];\n            if (x < minX) minX = x;\n            if (y < minY) minY = y;\n            if (x > maxX) maxX = x;\n            if (y > maxY) maxY = y;\n        }\n\n        // minX, minY and invSize are later used to transform coords into integers for z-order calculation\n        invSize = Math.max(maxX - minX, maxY - minY);\n        invSize = invSize !== 0 ? 1 / invSize : 0;\n    }\n\n    earcutLinked(outerNode, triangles, dim, minX, minY, invSize);\n\n    return triangles;\n}\n\n// create a circular doubly linked list from polygon points in the specified winding order\nfunction linkedList(data, start, end, dim, clockwise) {\n    var i, last;\n\n    if (clockwise === (signedArea(data, start, end, dim) > 0)) {\n        for (i = start; i < end; i += dim) last = insertNode(i, data[i], data[i + 1], last);\n    } else {\n        for (i = end - dim; i >= start; i -= dim) last = insertNode(i, data[i], data[i + 1], last);\n    }\n\n    if (last && equals(last, last.next)) {\n        removeNode(last);\n        last = last.next;\n    }\n\n    return last;\n}\n\n// eliminate colinear or duplicate points\nfunction filterPoints(start, end) {\n    if (!start) return start;\n    if (!end) end = start;\n\n    var p = start,\n        again;\n    do {\n        again = false;\n\n        if (!p.steiner && (equals(p, p.next) || area(p.prev, p, p.next) === 0)) {\n            removeNode(p);\n            p = end = p.prev;\n            if (p === p.next) break;\n            again = true;\n\n        } else {\n            p = p.next;\n        }\n    } while (again || p !== end);\n\n    return end;\n}\n\n// main ear slicing loop which triangulates a polygon (given as a linked list)\nfunction earcutLinked(ear, triangles, dim, minX, minY, invSize, pass) {\n    if (!ear) return;\n\n    // interlink polygon nodes in z-order\n    if (!pass && invSize) indexCurve(ear, minX, minY, invSize);\n\n    var stop = ear,\n        prev, next;\n\n    // iterate through ears, slicing them one by one\n    while (ear.prev !== ear.next) {\n        prev = ear.prev;\n        next = ear.next;\n\n        if (invSize ? isEarHashed(ear, minX, minY, invSize) : isEar(ear)) {\n            // cut off the triangle\n            triangles.push(prev.i / dim);\n            triangles.push(ear.i / dim);\n            triangles.push(next.i / dim);\n\n            removeNode(ear);\n\n            // skipping the next vertex leads to less sliver triangles\n            ear = next.next;\n            stop = next.next;\n\n            continue;\n        }\n\n        ear = next;\n\n        // if we looped through the whole remaining polygon and can't find any more ears\n        if (ear === stop) {\n            // try filtering points and slicing again\n            if (!pass) {\n                earcutLinked(filterPoints(ear), triangles, dim, minX, minY, invSize, 1);\n\n            // if this didn't work, try curing all small self-intersections locally\n            } else if (pass === 1) {\n                ear = cureLocalIntersections(filterPoints(ear), triangles, dim);\n                earcutLinked(ear, triangles, dim, minX, minY, invSize, 2);\n\n            // as a last resort, try splitting the remaining polygon into two\n            } else if (pass === 2) {\n                splitEarcut(ear, triangles, dim, minX, minY, invSize);\n            }\n\n            break;\n        }\n    }\n}\n\n// check whether a polygon node forms a valid ear with adjacent nodes\nfunction isEar(ear) {\n    var a = ear.prev,\n        b = ear,\n        c = ear.next;\n\n    if (area(a, b, c) >= 0) return false; // reflex, can't be an ear\n\n    // now make sure we don't have other points inside the potential ear\n    var p = ear.next.next;\n\n    while (p !== ear.prev) {\n        if (pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) &&\n            area(p.prev, p, p.next) >= 0) return false;\n        p = p.next;\n    }\n\n    return true;\n}\n\nfunction isEarHashed(ear, minX, minY, invSize) {\n    var a = ear.prev,\n        b = ear,\n        c = ear.next;\n\n    if (area(a, b, c) >= 0) return false; // reflex, can't be an ear\n\n    // triangle bbox; min & max are calculated like this for speed\n    var minTX = a.x < b.x ? (a.x < c.x ? a.x : c.x) : (b.x < c.x ? b.x : c.x),\n        minTY = a.y < b.y ? (a.y < c.y ? a.y : c.y) : (b.y < c.y ? b.y : c.y),\n        maxTX = a.x > b.x ? (a.x > c.x ? a.x : c.x) : (b.x > c.x ? b.x : c.x),\n        maxTY = a.y > b.y ? (a.y > c.y ? a.y : c.y) : (b.y > c.y ? b.y : c.y);\n\n    // z-order range for the current triangle bbox;\n    var minZ = zOrder(minTX, minTY, minX, minY, invSize),\n        maxZ = zOrder(maxTX, maxTY, minX, minY, invSize);\n\n    var p = ear.prevZ,\n        n = ear.nextZ;\n\n    // look for points inside the triangle in both directions\n    while (p && p.z >= minZ && n && n.z <= maxZ) {\n        if (p !== ear.prev && p !== ear.next &&\n            pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) &&\n            area(p.prev, p, p.next) >= 0) return false;\n        p = p.prevZ;\n\n        if (n !== ear.prev && n !== ear.next &&\n            pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y) &&\n            area(n.prev, n, n.next) >= 0) return false;\n        n = n.nextZ;\n    }\n\n    // look for remaining points in decreasing z-order\n    while (p && p.z >= minZ) {\n        if (p !== ear.prev && p !== ear.next &&\n            pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) &&\n            area(p.prev, p, p.next) >= 0) return false;\n        p = p.prevZ;\n    }\n\n    // look for remaining points in increasing z-order\n    while (n && n.z <= maxZ) {\n        if (n !== ear.prev && n !== ear.next &&\n            pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y) &&\n            area(n.prev, n, n.next) >= 0) return false;\n        n = n.nextZ;\n    }\n\n    return true;\n}\n\n// go through all polygon nodes and cure small local self-intersections\nfunction cureLocalIntersections(start, triangles, dim) {\n    var p = start;\n    do {\n        var a = p.prev,\n            b = p.next.next;\n\n        if (!equals(a, b) && intersects(a, p, p.next, b) && locallyInside(a, b) && locallyInside(b, a)) {\n\n            triangles.push(a.i / dim);\n            triangles.push(p.i / dim);\n            triangles.push(b.i / dim);\n\n            // remove two nodes involved\n            removeNode(p);\n            removeNode(p.next);\n\n            p = start = b;\n        }\n        p = p.next;\n    } while (p !== start);\n\n    return filterPoints(p);\n}\n\n// try splitting polygon into two and triangulate them independently\nfunction splitEarcut(start, triangles, dim, minX, minY, invSize) {\n    // look for a valid diagonal that divides the polygon into two\n    var a = start;\n    do {\n        var b = a.next.next;\n        while (b !== a.prev) {\n            if (a.i !== b.i && isValidDiagonal(a, b)) {\n                // split the polygon in two by the diagonal\n                var c = splitPolygon(a, b);\n\n                // filter colinear points around the cuts\n                a = filterPoints(a, a.next);\n                c = filterPoints(c, c.next);\n\n                // run earcut on each half\n                earcutLinked(a, triangles, dim, minX, minY, invSize);\n                earcutLinked(c, triangles, dim, minX, minY, invSize);\n                return;\n            }\n            b = b.next;\n        }\n        a = a.next;\n    } while (a !== start);\n}\n\n// link every hole into the outer loop, producing a single-ring polygon without holes\nfunction eliminateHoles(data, holeIndices, outerNode, dim) {\n    var queue = [],\n        i, len, start, end, list;\n\n    for (i = 0, len = holeIndices.length; i < len; i++) {\n        start = holeIndices[i] * dim;\n        end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;\n        list = linkedList(data, start, end, dim, false);\n        if (list === list.next) list.steiner = true;\n        queue.push(getLeftmost(list));\n    }\n\n    queue.sort(compareX);\n\n    // process holes from left to right\n    for (i = 0; i < queue.length; i++) {\n        eliminateHole(queue[i], outerNode);\n        outerNode = filterPoints(outerNode, outerNode.next);\n    }\n\n    return outerNode;\n}\n\nfunction compareX(a, b) {\n    return a.x - b.x;\n}\n\n// find a bridge between vertices that connects hole with an outer ring and and link it\nfunction eliminateHole(hole, outerNode) {\n    outerNode = findHoleBridge(hole, outerNode);\n    if (outerNode) {\n        var b = splitPolygon(outerNode, hole);\n        filterPoints(b, b.next);\n    }\n}\n\n// David Eberly's algorithm for finding a bridge between hole and outer polygon\nfunction findHoleBridge(hole, outerNode) {\n    var p = outerNode,\n        hx = hole.x,\n        hy = hole.y,\n        qx = -Infinity,\n        m;\n\n    // find a segment intersected by a ray from the hole's leftmost point to the left;\n    // segment's endpoint with lesser x will be potential connection point\n    do {\n        if (hy <= p.y && hy >= p.next.y && p.next.y !== p.y) {\n            var x = p.x + (hy - p.y) * (p.next.x - p.x) / (p.next.y - p.y);\n            if (x <= hx && x > qx) {\n                qx = x;\n                if (x === hx) {\n                    if (hy === p.y) return p;\n                    if (hy === p.next.y) return p.next;\n                }\n                m = p.x < p.next.x ? p : p.next;\n            }\n        }\n        p = p.next;\n    } while (p !== outerNode);\n\n    if (!m) return null;\n\n    if (hx === qx) return m; // hole touches outer segment; pick leftmost endpoint\n\n    // look for points inside the triangle of hole point, segment intersection and endpoint;\n    // if there are no points found, we have a valid connection;\n    // otherwise choose the point of the minimum angle with the ray as connection point\n\n    var stop = m,\n        mx = m.x,\n        my = m.y,\n        tanMin = Infinity,\n        tan;\n\n    p = m;\n\n    do {\n        if (hx >= p.x && p.x >= mx && hx !== p.x &&\n                pointInTriangle(hy < my ? hx : qx, hy, mx, my, hy < my ? qx : hx, hy, p.x, p.y)) {\n\n            tan = Math.abs(hy - p.y) / (hx - p.x); // tangential\n\n            if (locallyInside(p, hole) &&\n                (tan < tanMin || (tan === tanMin && (p.x > m.x || (p.x === m.x && sectorContainsSector(m, p)))))) {\n                m = p;\n                tanMin = tan;\n            }\n        }\n\n        p = p.next;\n    } while (p !== stop);\n\n    return m;\n}\n\n// whether sector in vertex m contains sector in vertex p in the same coordinates\nfunction sectorContainsSector(m, p) {\n    return area(m.prev, m, p.prev) < 0 && area(p.next, m, m.next) < 0;\n}\n\n// interlink polygon nodes in z-order\nfunction indexCurve(start, minX, minY, invSize) {\n    var p = start;\n    do {\n        if (p.z === null) p.z = zOrder(p.x, p.y, minX, minY, invSize);\n        p.prevZ = p.prev;\n        p.nextZ = p.next;\n        p = p.next;\n    } while (p !== start);\n\n    p.prevZ.nextZ = null;\n    p.prevZ = null;\n\n    sortLinked(p);\n}\n\n// Simon Tatham's linked list merge sort algorithm\n// http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html\nfunction sortLinked(list) {\n    var i, p, q, e, tail, numMerges, pSize, qSize,\n        inSize = 1;\n\n    do {\n        p = list;\n        list = null;\n        tail = null;\n        numMerges = 0;\n\n        while (p) {\n            numMerges++;\n            q = p;\n            pSize = 0;\n            for (i = 0; i < inSize; i++) {\n                pSize++;\n                q = q.nextZ;\n                if (!q) break;\n            }\n            qSize = inSize;\n\n            while (pSize > 0 || (qSize > 0 && q)) {\n\n                if (pSize !== 0 && (qSize === 0 || !q || p.z <= q.z)) {\n                    e = p;\n                    p = p.nextZ;\n                    pSize--;\n                } else {\n                    e = q;\n                    q = q.nextZ;\n                    qSize--;\n                }\n\n                if (tail) tail.nextZ = e;\n                else list = e;\n\n                e.prevZ = tail;\n                tail = e;\n            }\n\n            p = q;\n        }\n\n        tail.nextZ = null;\n        inSize *= 2;\n\n    } while (numMerges > 1);\n\n    return list;\n}\n\n// z-order of a point given coords and inverse of the longer side of data bbox\nfunction zOrder(x, y, minX, minY, invSize) {\n    // coords are transformed into non-negative 15-bit integer range\n    x = 32767 * (x - minX) * invSize;\n    y = 32767 * (y - minY) * invSize;\n\n    x = (x | (x << 8)) & 0x00FF00FF;\n    x = (x | (x << 4)) & 0x0F0F0F0F;\n    x = (x | (x << 2)) & 0x33333333;\n    x = (x | (x << 1)) & 0x55555555;\n\n    y = (y | (y << 8)) & 0x00FF00FF;\n    y = (y | (y << 4)) & 0x0F0F0F0F;\n    y = (y | (y << 2)) & 0x33333333;\n    y = (y | (y << 1)) & 0x55555555;\n\n    return x | (y << 1);\n}\n\n// find the leftmost node of a polygon ring\nfunction getLeftmost(start) {\n    var p = start,\n        leftmost = start;\n    do {\n        if (p.x < leftmost.x || (p.x === leftmost.x && p.y < leftmost.y)) leftmost = p;\n        p = p.next;\n    } while (p !== start);\n\n    return leftmost;\n}\n\n// check if a point lies within a convex triangle\nfunction pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n    return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 &&\n           (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 &&\n           (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;\n}\n\n// check if a diagonal between two polygon nodes is valid (lies in polygon interior)\nfunction isValidDiagonal(a, b) {\n    return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) && // dones't intersect other edges\n           (locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b) && // locally visible\n            (area(a.prev, a, b.prev) || area(a, b.prev, b)) || // does not create opposite-facing sectors\n            equals(a, b) && area(a.prev, a, a.next) > 0 && area(b.prev, b, b.next) > 0); // special zero-length case\n}\n\n// signed area of a triangle\nfunction area(p, q, r) {\n    return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}\n\n// check if two points are equal\nfunction equals(p1, p2) {\n    return p1.x === p2.x && p1.y === p2.y;\n}\n\n// check if two segments intersect\nfunction intersects(p1, q1, p2, q2) {\n    var o1 = sign(area(p1, q1, p2));\n    var o2 = sign(area(p1, q1, q2));\n    var o3 = sign(area(p2, q2, p1));\n    var o4 = sign(area(p2, q2, q1));\n\n    if (o1 !== o2 && o3 !== o4) return true; // general case\n\n    if (o1 === 0 && onSegment(p1, p2, q1)) return true; // p1, q1 and p2 are collinear and p2 lies on p1q1\n    if (o2 === 0 && onSegment(p1, q2, q1)) return true; // p1, q1 and q2 are collinear and q2 lies on p1q1\n    if (o3 === 0 && onSegment(p2, p1, q2)) return true; // p2, q2 and p1 are collinear and p1 lies on p2q2\n    if (o4 === 0 && onSegment(p2, q1, q2)) return true; // p2, q2 and q1 are collinear and q1 lies on p2q2\n\n    return false;\n}\n\n// for collinear points p, q, r, check if point q lies on segment pr\nfunction onSegment(p, q, r) {\n    return q.x <= Math.max(p.x, r.x) && q.x >= Math.min(p.x, r.x) && q.y <= Math.max(p.y, r.y) && q.y >= Math.min(p.y, r.y);\n}\n\nfunction sign(num) {\n    return num > 0 ? 1 : num < 0 ? -1 : 0;\n}\n\n// check if a polygon diagonal intersects any polygon segments\nfunction intersectsPolygon(a, b) {\n    var p = a;\n    do {\n        if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n                intersects(p, p.next, a, b)) return true;\n        p = p.next;\n    } while (p !== a);\n\n    return false;\n}\n\n// check if a polygon diagonal is locally inside the polygon\nfunction locallyInside(a, b) {\n    return area(a.prev, a, a.next) < 0 ?\n        area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 :\n        area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;\n}\n\n// check if the middle point of a polygon diagonal is inside the polygon\nfunction middleInside(a, b) {\n    var p = a,\n        inside = false,\n        px = (a.x + b.x) / 2,\n        py = (a.y + b.y) / 2;\n    do {\n        if (((p.y > py) !== (p.next.y > py)) && p.next.y !== p.y &&\n                (px < (p.next.x - p.x) * (py - p.y) / (p.next.y - p.y) + p.x))\n            inside = !inside;\n        p = p.next;\n    } while (p !== a);\n\n    return inside;\n}\n\n// link two polygon vertices with a bridge; if the vertices belong to the same ring, it splits polygon into two;\n// if one belongs to the outer ring and another to a hole, it merges it into a single ring\nfunction splitPolygon(a, b) {\n    var a2 = new Node(a.i, a.x, a.y),\n        b2 = new Node(b.i, b.x, b.y),\n        an = a.next,\n        bp = b.prev;\n\n    a.next = b;\n    b.prev = a;\n\n    a2.next = an;\n    an.prev = a2;\n\n    b2.next = a2;\n    a2.prev = b2;\n\n    bp.next = b2;\n    b2.prev = bp;\n\n    return b2;\n}\n\n// create a node and optionally link it with previous one (in a circular doubly linked list)\nfunction insertNode(i, x, y, last) {\n    var p = new Node(i, x, y);\n\n    if (!last) {\n        p.prev = p;\n        p.next = p;\n\n    } else {\n        p.next = last.next;\n        p.prev = last;\n        last.next.prev = p;\n        last.next = p;\n    }\n    return p;\n}\n\nfunction removeNode(p) {\n    p.next.prev = p.prev;\n    p.prev.next = p.next;\n\n    if (p.prevZ) p.prevZ.nextZ = p.nextZ;\n    if (p.nextZ) p.nextZ.prevZ = p.prevZ;\n}\n\nfunction Node(i, x, y) {\n    // vertex index in coordinates array\n    this.i = i;\n\n    // vertex coordinates\n    this.x = x;\n    this.y = y;\n\n    // previous and next vertex nodes in a polygon ring\n    this.prev = null;\n    this.next = null;\n\n    // z-order curve value\n    this.z = null;\n\n    // previous and next nodes in z-order\n    this.prevZ = null;\n    this.nextZ = null;\n\n    // indicates whether this is a steiner point\n    this.steiner = false;\n}\n\n// return a percentage difference between the polygon area and its triangulation area;\n// used to verify correctness of triangulation\nearcut.deviation = function (data, holeIndices, dim, triangles) {\n    var hasHoles = holeIndices && holeIndices.length;\n    var outerLen = hasHoles ? holeIndices[0] * dim : data.length;\n\n    var polygonArea = Math.abs(signedArea(data, 0, outerLen, dim));\n    if (hasHoles) {\n        for (var i = 0, len = holeIndices.length; i < len; i++) {\n            var start = holeIndices[i] * dim;\n            var end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;\n            polygonArea -= Math.abs(signedArea(data, start, end, dim));\n        }\n    }\n\n    var trianglesArea = 0;\n    for (i = 0; i < triangles.length; i += 3) {\n        var a = triangles[i] * dim;\n        var b = triangles[i + 1] * dim;\n        var c = triangles[i + 2] * dim;\n        trianglesArea += Math.abs(\n            (data[a] - data[c]) * (data[b + 1] - data[a + 1]) -\n            (data[a] - data[b]) * (data[c + 1] - data[a + 1]));\n    }\n\n    return polygonArea === 0 && trianglesArea === 0 ? 0 :\n        Math.abs((trianglesArea - polygonArea) / polygonArea);\n};\n\nfunction signedArea(data, start, end, dim) {\n    var sum = 0;\n    for (var i = start, j = end - dim; i < end; i += dim) {\n        sum += (data[j] - data[i]) * (data[i + 1] + data[j + 1]);\n        j = i;\n    }\n    return sum;\n}\n\n// turn a polygon in a multi-dimensional array form (e.g. as in GeoJSON) into a form Earcut accepts\nearcut.flatten = function (data) {\n    var dim = data[0][0].length,\n        result = {vertices: [], holes: [], dimensions: dim},\n        holeIndex = 0;\n\n    for (var i = 0; i < data.length; i++) {\n        for (var j = 0; j < data[i].length; j++) {\n            for (var d = 0; d < dim; d++) result.vertices.push(data[i][j][d]);\n        }\n        if (i > 0) {\n            holeIndex += data[i - 1].length;\n            result.holes.push(holeIndex);\n        }\n    }\n    return result;\n};\n","/*! https://mths.be/punycode v1.3.2 by @mathias */\n;(function(root) {\n\n\t/** Detect free variables */\n\tvar freeExports = typeof exports == 'object' && exports &&\n\t\t!exports.nodeType && exports;\n\tvar freeModule = typeof module == 'object' && module &&\n\t\t!module.nodeType && module;\n\tvar freeGlobal = typeof global == 'object' && global;\n\tif (\n\t\tfreeGlobal.global === freeGlobal ||\n\t\tfreeGlobal.window === freeGlobal ||\n\t\tfreeGlobal.self === freeGlobal\n\t) {\n\t\troot = freeGlobal;\n\t}\n\n\t/**\n\t * The `punycode` object.\n\t * @name punycode\n\t * @type Object\n\t */\n\tvar punycode,\n\n\t/** Highest positive signed 32-bit float value */\n\tmaxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1\n\n\t/** Bootstring parameters */\n\tbase = 36,\n\ttMin = 1,\n\ttMax = 26,\n\tskew = 38,\n\tdamp = 700,\n\tinitialBias = 72,\n\tinitialN = 128, // 0x80\n\tdelimiter = '-', // '\\x2D'\n\n\t/** Regular expressions */\n\tregexPunycode = /^xn--/,\n\tregexNonASCII = /[^\\x20-\\x7E]/, // unprintable ASCII chars + non-ASCII chars\n\tregexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g, // RFC 3490 separators\n\n\t/** Error messages */\n\terrors = {\n\t\t'overflow': 'Overflow: input needs wider integers to process',\n\t\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t\t'invalid-input': 'Invalid input'\n\t},\n\n\t/** Convenience shortcuts */\n\tbaseMinusTMin = base - tMin,\n\tfloor = Math.floor,\n\tstringFromCharCode = String.fromCharCode,\n\n\t/** Temporary variable */\n\tkey;\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/**\n\t * A generic error utility function.\n\t * @private\n\t * @param {String} type The error type.\n\t * @returns {Error} Throws a `RangeError` with the applicable error message.\n\t */\n\tfunction error(type) {\n\t\tthrow RangeError(errors[type]);\n\t}\n\n\t/**\n\t * A generic `Array#map` utility function.\n\t * @private\n\t * @param {Array} array The array to iterate over.\n\t * @param {Function} callback The function that gets called for every array\n\t * item.\n\t * @returns {Array} A new array of values returned by the callback function.\n\t */\n\tfunction map(array, fn) {\n\t\tvar length = array.length;\n\t\tvar result = [];\n\t\twhile (length--) {\n\t\t\tresult[length] = fn(array[length]);\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * A simple `Array#map`-like wrapper to work with domain name strings or email\n\t * addresses.\n\t * @private\n\t * @param {String} domain The domain name or email address.\n\t * @param {Function} callback The function that gets called for every\n\t * character.\n\t * @returns {Array} A new string of characters returned by the callback\n\t * function.\n\t */\n\tfunction mapDomain(string, fn) {\n\t\tvar parts = string.split('@');\n\t\tvar result = '';\n\t\tif (parts.length > 1) {\n\t\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t\t// the local part (i.e. everything up to `@`) intact.\n\t\t\tresult = parts[0] + '@';\n\t\t\tstring = parts[1];\n\t\t}\n\t\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\t\tstring = string.replace(regexSeparators, '\\x2E');\n\t\tvar labels = string.split('.');\n\t\tvar encoded = map(labels, fn).join('.');\n\t\treturn result + encoded;\n\t}\n\n\t/**\n\t * Creates an array containing the numeric code points of each Unicode\n\t * character in the string. While JavaScript uses UCS-2 internally,\n\t * this function will convert a pair of surrogate halves (each of which\n\t * UCS-2 exposes as separate characters) into a single code point,\n\t * matching UTF-16.\n\t * @see `punycode.ucs2.encode`\n\t * @see <https://mathiasbynens.be/notes/javascript-encoding>\n\t * @memberOf punycode.ucs2\n\t * @name decode\n\t * @param {String} string The Unicode input string (UCS-2).\n\t * @returns {Array} The new array of code points.\n\t */\n\tfunction ucs2decode(string) {\n\t\tvar output = [],\n\t\t    counter = 0,\n\t\t    length = string.length,\n\t\t    value,\n\t\t    extra;\n\t\twhile (counter < length) {\n\t\t\tvalue = string.charCodeAt(counter++);\n\t\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t\t// high surrogate, and there is a next character\n\t\t\t\textra = string.charCodeAt(counter++);\n\t\t\t\tif ((extra & 0xFC00) == 0xDC00) { // low surrogate\n\t\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t\t} else {\n\t\t\t\t\t// unmatched surrogate; only append this code unit, in case the next\n\t\t\t\t\t// code unit is the high surrogate of a surrogate pair\n\t\t\t\t\toutput.push(value);\n\t\t\t\t\tcounter--;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\toutput.push(value);\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t}\n\n\t/**\n\t * Creates a string based on an array of numeric code points.\n\t * @see `punycode.ucs2.decode`\n\t * @memberOf punycode.ucs2\n\t * @name encode\n\t * @param {Array} codePoints The array of numeric code points.\n\t * @returns {String} The new Unicode string (UCS-2).\n\t */\n\tfunction ucs2encode(array) {\n\t\treturn map(array, function(value) {\n\t\t\tvar output = '';\n\t\t\tif (value > 0xFFFF) {\n\t\t\t\tvalue -= 0x10000;\n\t\t\t\toutput += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);\n\t\t\t\tvalue = 0xDC00 | value & 0x3FF;\n\t\t\t}\n\t\t\toutput += stringFromCharCode(value);\n\t\t\treturn output;\n\t\t}).join('');\n\t}\n\n\t/**\n\t * Converts a basic code point into a digit/integer.\n\t * @see `digitToBasic()`\n\t * @private\n\t * @param {Number} codePoint The basic numeric code point value.\n\t * @returns {Number} The numeric value of a basic code point (for use in\n\t * representing integers) in the range `0` to `base - 1`, or `base` if\n\t * the code point does not represent a value.\n\t */\n\tfunction basicToDigit(codePoint) {\n\t\tif (codePoint - 48 < 10) {\n\t\t\treturn codePoint - 22;\n\t\t}\n\t\tif (codePoint - 65 < 26) {\n\t\t\treturn codePoint - 65;\n\t\t}\n\t\tif (codePoint - 97 < 26) {\n\t\t\treturn codePoint - 97;\n\t\t}\n\t\treturn base;\n\t}\n\n\t/**\n\t * Converts a digit/integer into a basic code point.\n\t * @see `basicToDigit()`\n\t * @private\n\t * @param {Number} digit The numeric value of a basic code point.\n\t * @returns {Number} The basic code point whose value (when used for\n\t * representing integers) is `digit`, which needs to be in the range\n\t * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n\t * used; else, the lowercase form is used. The behavior is undefined\n\t * if `flag` is non-zero and `digit` has no uppercase form.\n\t */\n\tfunction digitToBasic(digit, flag) {\n\t\t//  0..25 map to ASCII a..z or A..Z\n\t\t// 26..35 map to ASCII 0..9\n\t\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n\t}\n\n\t/**\n\t * Bias adaptation function as per section 3.4 of RFC 3492.\n\t * http://tools.ietf.org/html/rfc3492#section-3.4\n\t * @private\n\t */\n\tfunction adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}\n\n\t/**\n\t * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n\t * symbols.\n\t * @memberOf punycode\n\t * @param {String} input The Punycode string of ASCII-only symbols.\n\t * @returns {String} The resulting string of Unicode symbols.\n\t */\n\tfunction decode(input) {\n\t\t// Don't use UCS-2\n\t\tvar output = [],\n\t\t    inputLength = input.length,\n\t\t    out,\n\t\t    i = 0,\n\t\t    n = initialN,\n\t\t    bias = initialBias,\n\t\t    basic,\n\t\t    j,\n\t\t    index,\n\t\t    oldi,\n\t\t    w,\n\t\t    k,\n\t\t    digit,\n\t\t    t,\n\t\t    /** Cached calculation results */\n\t\t    baseMinusT;\n\n\t\t// Handle the basic code points: let `basic` be the number of input code\n\t\t// points before the last delimiter, or `0` if there is none, then copy\n\t\t// the first basic code points to the output.\n\n\t\tbasic = input.lastIndexOf(delimiter);\n\t\tif (basic < 0) {\n\t\t\tbasic = 0;\n\t\t}\n\n\t\tfor (j = 0; j < basic; ++j) {\n\t\t\t// if it's not a basic code point\n\t\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\t\terror('not-basic');\n\t\t\t}\n\t\t\toutput.push(input.charCodeAt(j));\n\t\t}\n\n\t\t// Main decoding loop: start just after the last delimiter if any basic code\n\t\t// points were copied; start at the beginning otherwise.\n\n\t\tfor (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t\t// `index` is the index of the next character to be consumed.\n\t\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t\t// which gets added to `i`. The overflow checking is easier\n\t\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t\t// value at the end to obtain `delta`.\n\t\t\tfor (oldi = i, w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\t\tif (index >= inputLength) {\n\t\t\t\t\terror('invalid-input');\n\t\t\t\t}\n\n\t\t\t\tdigit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\ti += digit * w;\n\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\t\tif (digit < t) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tbaseMinusT = base - t;\n\t\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tw *= baseMinusT;\n\n\t\t\t}\n\n\t\t\tout = output.length + 1;\n\t\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t\t// incrementing `n` each time, so we'll fix that now:\n\t\t\tif (floor(i / out) > maxInt - n) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tn += floor(i / out);\n\t\t\ti %= out;\n\n\t\t\t// Insert `n` at position `i` of the output\n\t\t\toutput.splice(i++, 0, n);\n\n\t\t}\n\n\t\treturn ucs2encode(output);\n\t}\n\n\t/**\n\t * Converts a string of Unicode symbols (e.g. a domain name label) to a\n\t * Punycode string of ASCII-only symbols.\n\t * @memberOf punycode\n\t * @param {String} input The string of Unicode symbols.\n\t * @returns {String} The resulting Punycode string of ASCII-only symbols.\n\t */\n\tfunction encode(input) {\n\t\tvar n,\n\t\t    delta,\n\t\t    handledCPCount,\n\t\t    basicLength,\n\t\t    bias,\n\t\t    j,\n\t\t    m,\n\t\t    q,\n\t\t    k,\n\t\t    t,\n\t\t    currentValue,\n\t\t    output = [],\n\t\t    /** `inputLength` will hold the number of code points in `input`. */\n\t\t    inputLength,\n\t\t    /** Cached calculation results */\n\t\t    handledCPCountPlusOne,\n\t\t    baseMinusT,\n\t\t    qMinusT;\n\n\t\t// Convert the input in UCS-2 to Unicode\n\t\tinput = ucs2decode(input);\n\n\t\t// Cache the length\n\t\tinputLength = input.length;\n\n\t\t// Initialize the state\n\t\tn = initialN;\n\t\tdelta = 0;\n\t\tbias = initialBias;\n\n\t\t// Handle the basic code points\n\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\tcurrentValue = input[j];\n\t\t\tif (currentValue < 0x80) {\n\t\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t\t}\n\t\t}\n\n\t\thandledCPCount = basicLength = output.length;\n\n\t\t// `handledCPCount` is the number of code points that have been handled;\n\t\t// `basicLength` is the number of basic code points.\n\n\t\t// Finish the basic string - if it is not empty - with a delimiter\n\t\tif (basicLength) {\n\t\t\toutput.push(delimiter);\n\t\t}\n\n\t\t// Main encoding loop:\n\t\twhile (handledCPCount < inputLength) {\n\n\t\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t\t// larger one:\n\t\t\tfor (m = maxInt, j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\t\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\t\tm = currentValue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,\n\t\t\t// but guard against overflow\n\t\t\thandledCPCountPlusOne = handledCPCount + 1;\n\t\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\t\tn = m;\n\n\t\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\n\t\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tif (currentValue == n) {\n\t\t\t\t\t// Represent delta as a generalized variable-length integer\n\t\t\t\t\tfor (q = delta, k = base; /* no condition */; k += base) {\n\t\t\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tqMinusT = q - t;\n\t\t\t\t\t\tbaseMinusT = base - t;\n\t\t\t\t\t\toutput.push(\n\t\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t\t);\n\t\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t\t}\n\n\t\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\t\tdelta = 0;\n\t\t\t\t\t++handledCPCount;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t++delta;\n\t\t\t++n;\n\n\t\t}\n\t\treturn output.join('');\n\t}\n\n\t/**\n\t * Converts a Punycode string representing a domain name or an email address\n\t * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n\t * it doesn't matter if you call it on a string that has already been\n\t * converted to Unicode.\n\t * @memberOf punycode\n\t * @param {String} input The Punycoded domain name or email address to\n\t * convert to Unicode.\n\t * @returns {String} The Unicode representation of the given Punycode\n\t * string.\n\t */\n\tfunction toUnicode(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexPunycode.test(string)\n\t\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/**\n\t * Converts a Unicode string representing a domain name or an email address to\n\t * Punycode. Only the non-ASCII parts of the domain name will be converted,\n\t * i.e. it doesn't matter if you call it with a domain that's already in\n\t * ASCII.\n\t * @memberOf punycode\n\t * @param {String} input The domain name or email address to convert, as a\n\t * Unicode string.\n\t * @returns {String} The Punycode representation of the given domain name or\n\t * email address.\n\t */\n\tfunction toASCII(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexNonASCII.test(string)\n\t\t\t\t? 'xn--' + encode(string)\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/** Define the public API */\n\tpunycode = {\n\t\t/**\n\t\t * A string representing the current Punycode.js version number.\n\t\t * @memberOf punycode\n\t\t * @type String\n\t\t */\n\t\t'version': '1.3.2',\n\t\t/**\n\t\t * An object of methods to convert from JavaScript's internal character\n\t\t * representation (UCS-2) to Unicode code points, and back.\n\t\t * @see <https://mathiasbynens.be/notes/javascript-encoding>\n\t\t * @memberOf punycode\n\t\t * @type Object\n\t\t */\n\t\t'ucs2': {\n\t\t\t'decode': ucs2decode,\n\t\t\t'encode': ucs2encode\n\t\t},\n\t\t'decode': decode,\n\t\t'encode': encode,\n\t\t'toASCII': toASCII,\n\t\t'toUnicode': toUnicode\n\t};\n\n\t/** Expose `punycode` */\n\t// Some AMD build optimizers, like r.js, check for specific condition patterns\n\t// like the following:\n\tif (\n\t\ttypeof define == 'function' &&\n\t\ttypeof define.amd == 'object' &&\n\t\tdefine.amd\n\t) {\n\t\tdefine('punycode', function() {\n\t\t\treturn punycode;\n\t\t});\n\t} else if (freeExports && freeModule) {\n\t\tif (module.exports == freeExports) { // in Node.js or RingoJS v0.8.0+\n\t\t\tfreeModule.exports = punycode;\n\t\t} else { // in Narwhal or RingoJS v0.7.0-\n\t\t\tfor (key in punycode) {\n\t\t\t\tpunycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);\n\t\t\t}\n\t\t}\n\t} else { // in Rhino or a web browser\n\t\troot.punycode = punycode;\n\t}\n\n}(this));\n","'use strict';\n\nmodule.exports = {\n  isString: function(arg) {\n    return typeof(arg) === 'string';\n  },\n  isObject: function(arg) {\n    return typeof(arg) === 'object' && arg !== null;\n  },\n  isNull: function(arg) {\n    return arg === null;\n  },\n  isNullOrUndefined: function(arg) {\n    return arg == null;\n  }\n};\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\n// If obj.hasOwnProperty has been overridden, then calling\n// obj.hasOwnProperty(prop) will break.\n// See: https://github.com/joyent/node/issues/1707\nfunction hasOwnProperty(obj, prop) {\n  return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nmodule.exports = function(qs, sep, eq, options) {\n  sep = sep || '&';\n  eq = eq || '=';\n  var obj = {};\n\n  if (typeof qs !== 'string' || qs.length === 0) {\n    return obj;\n  }\n\n  var regexp = /\\+/g;\n  qs = qs.split(sep);\n\n  var maxKeys = 1000;\n  if (options && typeof options.maxKeys === 'number') {\n    maxKeys = options.maxKeys;\n  }\n\n  var len = qs.length;\n  // maxKeys <= 0 means that we should not limit keys count\n  if (maxKeys > 0 && len > maxKeys) {\n    len = maxKeys;\n  }\n\n  for (var i = 0; i < len; ++i) {\n    var x = qs[i].replace(regexp, '%20'),\n        idx = x.indexOf(eq),\n        kstr, vstr, k, v;\n\n    if (idx >= 0) {\n      kstr = x.substr(0, idx);\n      vstr = x.substr(idx + 1);\n    } else {\n      kstr = x;\n      vstr = '';\n    }\n\n    k = decodeURIComponent(kstr);\n    v = decodeURIComponent(vstr);\n\n    if (!hasOwnProperty(obj, k)) {\n      obj[k] = v;\n    } else if (Array.isArray(obj[k])) {\n      obj[k].push(v);\n    } else {\n      obj[k] = [obj[k], v];\n    }\n  }\n\n  return obj;\n};\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar stringifyPrimitive = function(v) {\n  switch (typeof v) {\n    case 'string':\n      return v;\n\n    case 'boolean':\n      return v ? 'true' : 'false';\n\n    case 'number':\n      return isFinite(v) ? v : '';\n\n    default:\n      return '';\n  }\n};\n\nmodule.exports = function(obj, sep, eq, name) {\n  sep = sep || '&';\n  eq = eq || '=';\n  if (obj === null) {\n    obj = undefined;\n  }\n\n  if (typeof obj === 'object') {\n    return Object.keys(obj).map(function(k) {\n      var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;\n      if (Array.isArray(obj[k])) {\n        return obj[k].map(function(v) {\n          return ks + encodeURIComponent(stringifyPrimitive(v));\n        }).join(sep);\n      } else {\n        return ks + encodeURIComponent(stringifyPrimitive(obj[k]));\n      }\n    }).join(sep);\n\n  }\n\n  if (!name) return '';\n  return encodeURIComponent(stringifyPrimitive(name)) + eq +\n         encodeURIComponent(stringifyPrimitive(obj));\n};\n","'use strict';\n\nexports.decode = exports.parse = require('./decode');\nexports.encode = exports.stringify = require('./encode');\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar punycode = require('punycode');\nvar util = require('./util');\n\nexports.parse = urlParse;\nexports.resolve = urlResolve;\nexports.resolveObject = urlResolveObject;\nexports.format = urlFormat;\n\nexports.Url = Url;\n\nfunction Url() {\n  this.protocol = null;\n  this.slashes = null;\n  this.auth = null;\n  this.host = null;\n  this.port = null;\n  this.hostname = null;\n  this.hash = null;\n  this.search = null;\n  this.query = null;\n  this.pathname = null;\n  this.path = null;\n  this.href = null;\n}\n\n// Reference: RFC 3986, RFC 1808, RFC 2396\n\n// define these here so at least they only have to be\n// compiled once on the first module load.\nvar protocolPattern = /^([a-z0-9.+-]+:)/i,\n    portPattern = /:[0-9]*$/,\n\n    // Special case for a simple path URL\n    simplePathPattern = /^(\\/\\/?(?!\\/)[^\\?\\s]*)(\\?[^\\s]*)?$/,\n\n    // RFC 2396: characters reserved for delimiting URLs.\n    // We actually just auto-escape these.\n    delims = ['<', '>', '\"', '`', ' ', '\\r', '\\n', '\\t'],\n\n    // RFC 2396: characters not allowed for various reasons.\n    unwise = ['{', '}', '|', '\\\\', '^', '`'].concat(delims),\n\n    // Allowed by RFCs, but cause of XSS attacks.  Always escape these.\n    autoEscape = ['\\''].concat(unwise),\n    // Characters that are never ever allowed in a hostname.\n    // Note that any invalid chars are also handled, but these\n    // are the ones that are *expected* to be seen, so we fast-path\n    // them.\n    nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape),\n    hostEndingChars = ['/', '?', '#'],\n    hostnameMaxLen = 255,\n    hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,\n    hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,\n    // protocols that can allow \"unsafe\" and \"unwise\" chars.\n    unsafeProtocol = {\n      'javascript': true,\n      'javascript:': true\n    },\n    // protocols that never have a hostname.\n    hostlessProtocol = {\n      'javascript': true,\n      'javascript:': true\n    },\n    // protocols that always contain a // bit.\n    slashedProtocol = {\n      'http': true,\n      'https': true,\n      'ftp': true,\n      'gopher': true,\n      'file': true,\n      'http:': true,\n      'https:': true,\n      'ftp:': true,\n      'gopher:': true,\n      'file:': true\n    },\n    querystring = require('querystring');\n\nfunction urlParse(url, parseQueryString, slashesDenoteHost) {\n  if (url && util.isObject(url) && url instanceof Url) return url;\n\n  var u = new Url;\n  u.parse(url, parseQueryString, slashesDenoteHost);\n  return u;\n}\n\nUrl.prototype.parse = function(url, parseQueryString, slashesDenoteHost) {\n  if (!util.isString(url)) {\n    throw new TypeError(\"Parameter 'url' must be a string, not \" + typeof url);\n  }\n\n  // Copy chrome, IE, opera backslash-handling behavior.\n  // Back slashes before the query string get converted to forward slashes\n  // See: https://code.google.com/p/chromium/issues/detail?id=25916\n  var queryIndex = url.indexOf('?'),\n      splitter =\n          (queryIndex !== -1 && queryIndex < url.indexOf('#')) ? '?' : '#',\n      uSplit = url.split(splitter),\n      slashRegex = /\\\\/g;\n  uSplit[0] = uSplit[0].replace(slashRegex, '/');\n  url = uSplit.join(splitter);\n\n  var rest = url;\n\n  // trim before proceeding.\n  // This is to support parse stuff like \"  http://foo.com  \\n\"\n  rest = rest.trim();\n\n  if (!slashesDenoteHost && url.split('#').length === 1) {\n    // Try fast path regexp\n    var simplePath = simplePathPattern.exec(rest);\n    if (simplePath) {\n      this.path = rest;\n      this.href = rest;\n      this.pathname = simplePath[1];\n      if (simplePath[2]) {\n        this.search = simplePath[2];\n        if (parseQueryString) {\n          this.query = querystring.parse(this.search.substr(1));\n        } else {\n          this.query = this.search.substr(1);\n        }\n      } else if (parseQueryString) {\n        this.search = '';\n        this.query = {};\n      }\n      return this;\n    }\n  }\n\n  var proto = protocolPattern.exec(rest);\n  if (proto) {\n    proto = proto[0];\n    var lowerProto = proto.toLowerCase();\n    this.protocol = lowerProto;\n    rest = rest.substr(proto.length);\n  }\n\n  // figure out if it's got a host\n  // user@server is *always* interpreted as a hostname, and url\n  // resolution will treat //foo/bar as host=foo,path=bar because that's\n  // how the browser resolves relative URLs.\n  if (slashesDenoteHost || proto || rest.match(/^\\/\\/[^@\\/]+@[^@\\/]+/)) {\n    var slashes = rest.substr(0, 2) === '//';\n    if (slashes && !(proto && hostlessProtocol[proto])) {\n      rest = rest.substr(2);\n      this.slashes = true;\n    }\n  }\n\n  if (!hostlessProtocol[proto] &&\n      (slashes || (proto && !slashedProtocol[proto]))) {\n\n    // there's a hostname.\n    // the first instance of /, ?, ;, or # ends the host.\n    //\n    // If there is an @ in the hostname, then non-host chars *are* allowed\n    // to the left of the last @ sign, unless some host-ending character\n    // comes *before* the @-sign.\n    // URLs are obnoxious.\n    //\n    // ex:\n    // http://a@b@c/ => user:a@b host:c\n    // http://a@b?@c => user:a host:c path:/?@c\n\n    // v0.12 TODO(isaacs): This is not quite how Chrome does things.\n    // Review our test case against browsers more comprehensively.\n\n    // find the first instance of any hostEndingChars\n    var hostEnd = -1;\n    for (var i = 0; i < hostEndingChars.length; i++) {\n      var hec = rest.indexOf(hostEndingChars[i]);\n      if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n        hostEnd = hec;\n    }\n\n    // at this point, either we have an explicit point where the\n    // auth portion cannot go past, or the last @ char is the decider.\n    var auth, atSign;\n    if (hostEnd === -1) {\n      // atSign can be anywhere.\n      atSign = rest.lastIndexOf('@');\n    } else {\n      // atSign must be in auth portion.\n      // http://a@b/c@d => host:b auth:a path:/c@d\n      atSign = rest.lastIndexOf('@', hostEnd);\n    }\n\n    // Now we have a portion which is definitely the auth.\n    // Pull that off.\n    if (atSign !== -1) {\n      auth = rest.slice(0, atSign);\n      rest = rest.slice(atSign + 1);\n      this.auth = decodeURIComponent(auth);\n    }\n\n    // the host is the remaining to the left of the first non-host char\n    hostEnd = -1;\n    for (var i = 0; i < nonHostChars.length; i++) {\n      var hec = rest.indexOf(nonHostChars[i]);\n      if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n        hostEnd = hec;\n    }\n    // if we still have not hit it, then the entire thing is a host.\n    if (hostEnd === -1)\n      hostEnd = rest.length;\n\n    this.host = rest.slice(0, hostEnd);\n    rest = rest.slice(hostEnd);\n\n    // pull out port.\n    this.parseHost();\n\n    // we've indicated that there is a hostname,\n    // so even if it's empty, it has to be present.\n    this.hostname = this.hostname || '';\n\n    // if hostname begins with [ and ends with ]\n    // assume that it's an IPv6 address.\n    var ipv6Hostname = this.hostname[0] === '[' &&\n        this.hostname[this.hostname.length - 1] === ']';\n\n    // validate a little.\n    if (!ipv6Hostname) {\n      var hostparts = this.hostname.split(/\\./);\n      for (var i = 0, l = hostparts.length; i < l; i++) {\n        var part = hostparts[i];\n        if (!part) continue;\n        if (!part.match(hostnamePartPattern)) {\n          var newpart = '';\n          for (var j = 0, k = part.length; j < k; j++) {\n            if (part.charCodeAt(j) > 127) {\n              // we replace non-ASCII char with a temporary placeholder\n              // we need this to make sure size of hostname is not\n              // broken by replacing non-ASCII by nothing\n              newpart += 'x';\n            } else {\n              newpart += part[j];\n            }\n          }\n          // we test again with ASCII char only\n          if (!newpart.match(hostnamePartPattern)) {\n            var validParts = hostparts.slice(0, i);\n            var notHost = hostparts.slice(i + 1);\n            var bit = part.match(hostnamePartStart);\n            if (bit) {\n              validParts.push(bit[1]);\n              notHost.unshift(bit[2]);\n            }\n            if (notHost.length) {\n              rest = '/' + notHost.join('.') + rest;\n            }\n            this.hostname = validParts.join('.');\n            break;\n          }\n        }\n      }\n    }\n\n    if (this.hostname.length > hostnameMaxLen) {\n      this.hostname = '';\n    } else {\n      // hostnames are always lower case.\n      this.hostname = this.hostname.toLowerCase();\n    }\n\n    if (!ipv6Hostname) {\n      // IDNA Support: Returns a punycoded representation of \"domain\".\n      // It only converts parts of the domain name that\n      // have non-ASCII characters, i.e. it doesn't matter if\n      // you call it with a domain that already is ASCII-only.\n      this.hostname = punycode.toASCII(this.hostname);\n    }\n\n    var p = this.port ? ':' + this.port : '';\n    var h = this.hostname || '';\n    this.host = h + p;\n    this.href += this.host;\n\n    // strip [ and ] from the hostname\n    // the host field still retains them, though\n    if (ipv6Hostname) {\n      this.hostname = this.hostname.substr(1, this.hostname.length - 2);\n      if (rest[0] !== '/') {\n        rest = '/' + rest;\n      }\n    }\n  }\n\n  // now rest is set to the post-host stuff.\n  // chop off any delim chars.\n  if (!unsafeProtocol[lowerProto]) {\n\n    // First, make 100% sure that any \"autoEscape\" chars get\n    // escaped, even if encodeURIComponent doesn't think they\n    // need to be.\n    for (var i = 0, l = autoEscape.length; i < l; i++) {\n      var ae = autoEscape[i];\n      if (rest.indexOf(ae) === -1)\n        continue;\n      var esc = encodeURIComponent(ae);\n      if (esc === ae) {\n        esc = escape(ae);\n      }\n      rest = rest.split(ae).join(esc);\n    }\n  }\n\n\n  // chop off from the tail first.\n  var hash = rest.indexOf('#');\n  if (hash !== -1) {\n    // got a fragment string.\n    this.hash = rest.substr(hash);\n    rest = rest.slice(0, hash);\n  }\n  var qm = rest.indexOf('?');\n  if (qm !== -1) {\n    this.search = rest.substr(qm);\n    this.query = rest.substr(qm + 1);\n    if (parseQueryString) {\n      this.query = querystring.parse(this.query);\n    }\n    rest = rest.slice(0, qm);\n  } else if (parseQueryString) {\n    // no query string, but parseQueryString still requested\n    this.search = '';\n    this.query = {};\n  }\n  if (rest) this.pathname = rest;\n  if (slashedProtocol[lowerProto] &&\n      this.hostname && !this.pathname) {\n    this.pathname = '/';\n  }\n\n  //to support http.request\n  if (this.pathname || this.search) {\n    var p = this.pathname || '';\n    var s = this.search || '';\n    this.path = p + s;\n  }\n\n  // finally, reconstruct the href based on what has been validated.\n  this.href = this.format();\n  return this;\n};\n\n// format a parsed object into a url string\nfunction urlFormat(obj) {\n  // ensure it's an object, and not a string url.\n  // If it's an obj, this is a no-op.\n  // this way, you can call url_format() on strings\n  // to clean up potentially wonky urls.\n  if (util.isString(obj)) obj = urlParse(obj);\n  if (!(obj instanceof Url)) return Url.prototype.format.call(obj);\n  return obj.format();\n}\n\nUrl.prototype.format = function() {\n  var auth = this.auth || '';\n  if (auth) {\n    auth = encodeURIComponent(auth);\n    auth = auth.replace(/%3A/i, ':');\n    auth += '@';\n  }\n\n  var protocol = this.protocol || '',\n      pathname = this.pathname || '',\n      hash = this.hash || '',\n      host = false,\n      query = '';\n\n  if (this.host) {\n    host = auth + this.host;\n  } else if (this.hostname) {\n    host = auth + (this.hostname.indexOf(':') === -1 ?\n        this.hostname :\n        '[' + this.hostname + ']');\n    if (this.port) {\n      host += ':' + this.port;\n    }\n  }\n\n  if (this.query &&\n      util.isObject(this.query) &&\n      Object.keys(this.query).length) {\n    query = querystring.stringify(this.query);\n  }\n\n  var search = this.search || (query && ('?' + query)) || '';\n\n  if (protocol && protocol.substr(-1) !== ':') protocol += ':';\n\n  // only the slashedProtocols get the //.  Not mailto:, xmpp:, etc.\n  // unless they had them to begin with.\n  if (this.slashes ||\n      (!protocol || slashedProtocol[protocol]) && host !== false) {\n    host = '//' + (host || '');\n    if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname;\n  } else if (!host) {\n    host = '';\n  }\n\n  if (hash && hash.charAt(0) !== '#') hash = '#' + hash;\n  if (search && search.charAt(0) !== '?') search = '?' + search;\n\n  pathname = pathname.replace(/[?#]/g, function(match) {\n    return encodeURIComponent(match);\n  });\n  search = search.replace('#', '%23');\n\n  return protocol + host + pathname + search + hash;\n};\n\nfunction urlResolve(source, relative) {\n  return urlParse(source, false, true).resolve(relative);\n}\n\nUrl.prototype.resolve = function(relative) {\n  return this.resolveObject(urlParse(relative, false, true)).format();\n};\n\nfunction urlResolveObject(source, relative) {\n  if (!source) return relative;\n  return urlParse(source, false, true).resolveObject(relative);\n}\n\nUrl.prototype.resolveObject = function(relative) {\n  if (util.isString(relative)) {\n    var rel = new Url();\n    rel.parse(relative, false, true);\n    relative = rel;\n  }\n\n  var result = new Url();\n  var tkeys = Object.keys(this);\n  for (var tk = 0; tk < tkeys.length; tk++) {\n    var tkey = tkeys[tk];\n    result[tkey] = this[tkey];\n  }\n\n  // hash is always overridden, no matter what.\n  // even href=\"\" will remove it.\n  result.hash = relative.hash;\n\n  // if the relative url is empty, then there's nothing left to do here.\n  if (relative.href === '') {\n    result.href = result.format();\n    return result;\n  }\n\n  // hrefs like //foo/bar always cut to the protocol.\n  if (relative.slashes && !relative.protocol) {\n    // take everything except the protocol from relative\n    var rkeys = Object.keys(relative);\n    for (var rk = 0; rk < rkeys.length; rk++) {\n      var rkey = rkeys[rk];\n      if (rkey !== 'protocol')\n        result[rkey] = relative[rkey];\n    }\n\n    //urlParse appends trailing / to urls like http://www.example.com\n    if (slashedProtocol[result.protocol] &&\n        result.hostname && !result.pathname) {\n      result.path = result.pathname = '/';\n    }\n\n    result.href = result.format();\n    return result;\n  }\n\n  if (relative.protocol && relative.protocol !== result.protocol) {\n    // if it's a known url protocol, then changing\n    // the protocol does weird things\n    // first, if it's not file:, then we MUST have a host,\n    // and if there was a path\n    // to begin with, then we MUST have a path.\n    // if it is file:, then the host is dropped,\n    // because that's known to be hostless.\n    // anything else is assumed to be absolute.\n    if (!slashedProtocol[relative.protocol]) {\n      var keys = Object.keys(relative);\n      for (var v = 0; v < keys.length; v++) {\n        var k = keys[v];\n        result[k] = relative[k];\n      }\n      result.href = result.format();\n      return result;\n    }\n\n    result.protocol = relative.protocol;\n    if (!relative.host && !hostlessProtocol[relative.protocol]) {\n      var relPath = (relative.pathname || '').split('/');\n      while (relPath.length && !(relative.host = relPath.shift()));\n      if (!relative.host) relative.host = '';\n      if (!relative.hostname) relative.hostname = '';\n      if (relPath[0] !== '') relPath.unshift('');\n      if (relPath.length < 2) relPath.unshift('');\n      result.pathname = relPath.join('/');\n    } else {\n      result.pathname = relative.pathname;\n    }\n    result.search = relative.search;\n    result.query = relative.query;\n    result.host = relative.host || '';\n    result.auth = relative.auth;\n    result.hostname = relative.hostname || relative.host;\n    result.port = relative.port;\n    // to support http.request\n    if (result.pathname || result.search) {\n      var p = result.pathname || '';\n      var s = result.search || '';\n      result.path = p + s;\n    }\n    result.slashes = result.slashes || relative.slashes;\n    result.href = result.format();\n    return result;\n  }\n\n  var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'),\n      isRelAbs = (\n          relative.host ||\n          relative.pathname && relative.pathname.charAt(0) === '/'\n      ),\n      mustEndAbs = (isRelAbs || isSourceAbs ||\n                    (result.host && relative.pathname)),\n      removeAllDots = mustEndAbs,\n      srcPath = result.pathname && result.pathname.split('/') || [],\n      relPath = relative.pathname && relative.pathname.split('/') || [],\n      psychotic = result.protocol && !slashedProtocol[result.protocol];\n\n  // if the url is a non-slashed url, then relative\n  // links like ../.. should be able\n  // to crawl up to the hostname, as well.  This is strange.\n  // result.protocol has already been set by now.\n  // Later on, put the first path part into the host field.\n  if (psychotic) {\n    result.hostname = '';\n    result.port = null;\n    if (result.host) {\n      if (srcPath[0] === '') srcPath[0] = result.host;\n      else srcPath.unshift(result.host);\n    }\n    result.host = '';\n    if (relative.protocol) {\n      relative.hostname = null;\n      relative.port = null;\n      if (relative.host) {\n        if (relPath[0] === '') relPath[0] = relative.host;\n        else relPath.unshift(relative.host);\n      }\n      relative.host = null;\n    }\n    mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === '');\n  }\n\n  if (isRelAbs) {\n    // it's absolute.\n    result.host = (relative.host || relative.host === '') ?\n                  relative.host : result.host;\n    result.hostname = (relative.hostname || relative.hostname === '') ?\n                      relative.hostname : result.hostname;\n    result.search = relative.search;\n    result.query = relative.query;\n    srcPath = relPath;\n    // fall through to the dot-handling below.\n  } else if (relPath.length) {\n    // it's relative\n    // throw away the existing file, and take the new path instead.\n    if (!srcPath) srcPath = [];\n    srcPath.pop();\n    srcPath = srcPath.concat(relPath);\n    result.search = relative.search;\n    result.query = relative.query;\n  } else if (!util.isNullOrUndefined(relative.search)) {\n    // just pull out the search.\n    // like href='?foo'.\n    // Put this after the other two cases because it simplifies the booleans\n    if (psychotic) {\n      result.hostname = result.host = srcPath.shift();\n      //occationaly the auth can get stuck only in host\n      //this especially happens in cases like\n      //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n      var authInHost = result.host && result.host.indexOf('@') > 0 ?\n                       result.host.split('@') : false;\n      if (authInHost) {\n        result.auth = authInHost.shift();\n        result.host = result.hostname = authInHost.shift();\n      }\n    }\n    result.search = relative.search;\n    result.query = relative.query;\n    //to support http.request\n    if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n      result.path = (result.pathname ? result.pathname : '') +\n                    (result.search ? result.search : '');\n    }\n    result.href = result.format();\n    return result;\n  }\n\n  if (!srcPath.length) {\n    // no path at all.  easy.\n    // we've already handled the other stuff above.\n    result.pathname = null;\n    //to support http.request\n    if (result.search) {\n      result.path = '/' + result.search;\n    } else {\n      result.path = null;\n    }\n    result.href = result.format();\n    return result;\n  }\n\n  // if a url ENDs in . or .., then it must get a trailing slash.\n  // however, if it ends in anything else non-slashy,\n  // then it must NOT get a trailing slash.\n  var last = srcPath.slice(-1)[0];\n  var hasTrailingSlash = (\n      (result.host || relative.host || srcPath.length > 1) &&\n      (last === '.' || last === '..') || last === '');\n\n  // strip single dots, resolve double dots to parent dir\n  // if the path tries to go above the root, `up` ends up > 0\n  var up = 0;\n  for (var i = srcPath.length; i >= 0; i--) {\n    last = srcPath[i];\n    if (last === '.') {\n      srcPath.splice(i, 1);\n    } else if (last === '..') {\n      srcPath.splice(i, 1);\n      up++;\n    } else if (up) {\n      srcPath.splice(i, 1);\n      up--;\n    }\n  }\n\n  // if the path is allowed to go above the root, restore leading ..s\n  if (!mustEndAbs && !removeAllDots) {\n    for (; up--; up) {\n      srcPath.unshift('..');\n    }\n  }\n\n  if (mustEndAbs && srcPath[0] !== '' &&\n      (!srcPath[0] || srcPath[0].charAt(0) !== '/')) {\n    srcPath.unshift('');\n  }\n\n  if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) {\n    srcPath.push('');\n  }\n\n  var isAbsolute = srcPath[0] === '' ||\n      (srcPath[0] && srcPath[0].charAt(0) === '/');\n\n  // put the host back\n  if (psychotic) {\n    result.hostname = result.host = isAbsolute ? '' :\n                                    srcPath.length ? srcPath.shift() : '';\n    //occationaly the auth can get stuck only in host\n    //this especially happens in cases like\n    //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n    var authInHost = result.host && result.host.indexOf('@') > 0 ?\n                     result.host.split('@') : false;\n    if (authInHost) {\n      result.auth = authInHost.shift();\n      result.host = result.hostname = authInHost.shift();\n    }\n  }\n\n  mustEndAbs = mustEndAbs || (result.host && srcPath.length);\n\n  if (mustEndAbs && !isAbsolute) {\n    srcPath.unshift('');\n  }\n\n  if (!srcPath.length) {\n    result.pathname = null;\n    result.path = null;\n  } else {\n    result.pathname = srcPath.join('/');\n  }\n\n  //to support request.http\n  if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n    result.path = (result.pathname ? result.pathname : '') +\n                  (result.search ? result.search : '');\n  }\n  result.auth = relative.auth || result.auth;\n  result.slashes = result.slashes || relative.slashes;\n  result.href = result.format();\n  return result;\n};\n\nUrl.prototype.parseHost = function() {\n  var host = this.host;\n  var port = portPattern.exec(host);\n  if (port) {\n    port = port[0];\n    if (port !== ':') {\n      this.port = port.substr(1);\n    }\n    host = host.substr(0, host.length - port.length);\n  }\n  if (host) this.hostname = host;\n};\n","/**\n * Different types of environments for WebGL.\n *\n * @static\n * @memberof PIXI\n * @name ENV\n * @enum {number}\n * @property {number} WEBGL_LEGACY - Used for older v1 WebGL devices. PixiJS will aim to ensure compatibility\n *  with older / less advanced devices. If you experience unexplained flickering prefer this environment.\n * @property {number} WEBGL - Version 1 of WebGL\n * @property {number} WEBGL2 - Version 2 of WebGL\n */\nexport const ENV = {\n    WEBGL_LEGACY: 0,\n    WEBGL: 1,\n    WEBGL2: 2,\n};\n\n/**\n * Constant to identify the Renderer Type.\n *\n * @static\n * @memberof PIXI\n * @name RENDERER_TYPE\n * @enum {number}\n * @property {number} UNKNOWN - Unknown render type.\n * @property {number} WEBGL - WebGL render type.\n * @property {number} CANVAS - Canvas render type.\n */\nexport const RENDERER_TYPE = {\n    UNKNOWN:    0,\n    WEBGL:      1,\n    CANVAS:     2,\n};\n\n/**\n * Various blend modes supported by PIXI.\n *\n * IMPORTANT - The WebGL renderer only supports the NORMAL, ADD, MULTIPLY and SCREEN blend modes.\n * Anything else will silently act like NORMAL.\n *\n * @memberof PIXI\n * @name BLEND_MODES\n * @enum {number}\n * @property {number} NORMAL\n * @property {number} ADD\n * @property {number} MULTIPLY\n * @property {number} SCREEN\n * @property {number} OVERLAY\n * @property {number} DARKEN\n * @property {number} LIGHTEN\n * @property {number} COLOR_DODGE\n * @property {number} COLOR_BURN\n * @property {number} HARD_LIGHT\n * @property {number} SOFT_LIGHT\n * @property {number} DIFFERENCE\n * @property {number} EXCLUSION\n * @property {number} HUE\n * @property {number} SATURATION\n * @property {number} COLOR\n * @property {number} LUMINOSITY\n * @property {number} NORMAL_NPM\n * @property {number} ADD_NPM\n * @property {number} SCREEN_NPM\n * @property {number} NONE\n * @property {number} SRC_IN\n * @property {number} SRC_OUT\n * @property {number} SRC_ATOP\n * @property {number} DST_OVER\n * @property {number} DST_IN\n * @property {number} DST_OUT\n * @property {number} DST_ATOP\n * @property {number} SUBTRACT\n * @property {number} SRC_OVER\n * @property {number} ERASE\n */\nexport const BLEND_MODES = {\n    NORMAL:         0,\n    ADD:            1,\n    MULTIPLY:       2,\n    SCREEN:         3,\n    OVERLAY:        4,\n    DARKEN:         5,\n    LIGHTEN:        6,\n    COLOR_DODGE:    7,\n    COLOR_BURN:     8,\n    HARD_LIGHT:     9,\n    SOFT_LIGHT:     10,\n    DIFFERENCE:     11,\n    EXCLUSION:      12,\n    HUE:            13,\n    SATURATION:     14,\n    COLOR:          15,\n    LUMINOSITY:     16,\n    NORMAL_NPM:     17,\n    ADD_NPM:        18,\n    SCREEN_NPM:     19,\n    NONE:           20,\n\n    SRC_OVER:       0,\n    SRC_IN:         21,\n    SRC_OUT:        22,\n    SRC_ATOP:       23,\n    DST_OVER:       24,\n    DST_IN:         25,\n    DST_OUT:        26,\n    DST_ATOP:       27,\n    ERASE:          26,\n    SUBTRACT:       28,\n};\n\n/**\n * Various webgl draw modes. These can be used to specify which GL drawMode to use\n * under certain situations and renderers.\n *\n * @memberof PIXI\n * @static\n * @name DRAW_MODES\n * @enum {number}\n * @property {number} POINTS\n * @property {number} LINES\n * @property {number} LINE_LOOP\n * @property {number} LINE_STRIP\n * @property {number} TRIANGLES\n * @property {number} TRIANGLE_STRIP\n * @property {number} TRIANGLE_FAN\n */\nexport const DRAW_MODES = {\n    POINTS:         0,\n    LINES:          1,\n    LINE_LOOP:      2,\n    LINE_STRIP:     3,\n    TRIANGLES:      4,\n    TRIANGLE_STRIP: 5,\n    TRIANGLE_FAN:   6,\n};\n\n/**\n * Various GL texture/resources formats.\n *\n * @memberof PIXI\n * @static\n * @name FORMATS\n * @enum {number}\n * @property {number} RGBA=6408\n * @property {number} RGB=6407\n * @property {number} ALPHA=6406\n * @property {number} LUMINANCE=6409\n * @property {number} LUMINANCE_ALPHA=6410\n * @property {number} DEPTH_COMPONENT=6402\n * @property {number} DEPTH_STENCIL=34041\n */\nexport const FORMATS = {\n    RGBA:             6408,\n    RGB:              6407,\n    ALPHA:            6406,\n    LUMINANCE:        6409,\n    LUMINANCE_ALPHA:  6410,\n    DEPTH_COMPONENT:  6402,\n    DEPTH_STENCIL:    34041,\n};\n\n/**\n * Various GL target types.\n *\n * @memberof PIXI\n * @static\n * @name TARGETS\n * @enum {number}\n * @property {number} TEXTURE_2D=3553\n * @property {number} TEXTURE_CUBE_MAP=34067\n * @property {number} TEXTURE_2D_ARRAY=35866\n * @property {number} TEXTURE_CUBE_MAP_POSITIVE_X=34069\n * @property {number} TEXTURE_CUBE_MAP_NEGATIVE_X=34070\n * @property {number} TEXTURE_CUBE_MAP_POSITIVE_Y=34071\n * @property {number} TEXTURE_CUBE_MAP_NEGATIVE_Y=34072\n * @property {number} TEXTURE_CUBE_MAP_POSITIVE_Z=34073\n * @property {number} TEXTURE_CUBE_MAP_NEGATIVE_Z=34074\n */\nexport const TARGETS = {\n    TEXTURE_2D: 3553,\n    TEXTURE_CUBE_MAP: 34067,\n    TEXTURE_2D_ARRAY: 35866,\n    TEXTURE_CUBE_MAP_POSITIVE_X: 34069,\n    TEXTURE_CUBE_MAP_NEGATIVE_X: 34070,\n    TEXTURE_CUBE_MAP_POSITIVE_Y: 34071,\n    TEXTURE_CUBE_MAP_NEGATIVE_Y: 34072,\n    TEXTURE_CUBE_MAP_POSITIVE_Z: 34073,\n    TEXTURE_CUBE_MAP_NEGATIVE_Z: 34074,\n};\n\n/**\n * Various GL data format types.\n *\n * @memberof PIXI\n * @static\n * @name TYPES\n * @enum {number}\n * @property {number} UNSIGNED_BYTE=5121\n * @property {number} UNSIGNED_SHORT=5123\n * @property {number} UNSIGNED_SHORT_5_6_5=33635\n * @property {number} UNSIGNED_SHORT_4_4_4_4=32819\n * @property {number} UNSIGNED_SHORT_5_5_5_1=32820\n * @property {number} FLOAT=5126\n * @property {number} HALF_FLOAT=36193\n */\nexport const TYPES = {\n    UNSIGNED_BYTE: 5121,\n    UNSIGNED_SHORT: 5123,\n    UNSIGNED_SHORT_5_6_5: 33635,\n    UNSIGNED_SHORT_4_4_4_4: 32819,\n    UNSIGNED_SHORT_5_5_5_1: 32820,\n    FLOAT: 5126,\n    HALF_FLOAT: 36193,\n};\n\n/**\n * The scale modes that are supported by pixi.\n *\n * The {@link PIXI.settings.SCALE_MODE} scale mode affects the default scaling mode of future operations.\n * It can be re-assigned to either LINEAR or NEAREST, depending upon suitability.\n *\n * @memberof PIXI\n * @static\n * @name SCALE_MODES\n * @enum {number}\n * @property {number} LINEAR Smooth scaling\n * @property {number} NEAREST Pixelating scaling\n */\nexport const SCALE_MODES = {\n    LINEAR:     1,\n    NEAREST:    0,\n};\n\n/**\n * The wrap modes that are supported by pixi.\n *\n * The {@link PIXI.settings.WRAP_MODE} wrap mode affects the default wrapping mode of future operations.\n * It can be re-assigned to either CLAMP or REPEAT, depending upon suitability.\n * If the texture is non power of two then clamp will be used regardless as WebGL can\n * only use REPEAT if the texture is po2.\n *\n * This property only affects WebGL.\n *\n * @name WRAP_MODES\n * @memberof PIXI\n * @static\n * @enum {number}\n * @property {number} CLAMP - The textures uvs are clamped\n * @property {number} REPEAT - The texture uvs tile and repeat\n * @property {number} MIRRORED_REPEAT - The texture uvs tile and repeat with mirroring\n */\nexport const WRAP_MODES = {\n    CLAMP:           33071,\n    REPEAT:          10497,\n    MIRRORED_REPEAT: 33648,\n};\n\n/**\n * Mipmap filtering modes that are supported by pixi.\n *\n * The {@link PIXI.settings.MIPMAP_TEXTURES} affects default texture filtering.\n * Mipmaps are generated for a baseTexture if its `mipmap` field is `ON`,\n * or its `POW2` and texture dimensions are powers of 2.\n * Due to platform restriction, `ON` option will work like `POW2` for webgl-1.\n *\n * This property only affects WebGL.\n *\n * @name MIPMAP_MODES\n * @memberof PIXI\n * @static\n * @enum {number}\n * @property {number} OFF - No mipmaps\n * @property {number} POW2 - Generate mipmaps if texture dimensions are pow2\n * @property {number} ON - Always generate mipmaps\n */\nexport const MIPMAP_MODES = {\n    OFF: 0,\n    POW2: 1,\n    ON: 2,\n};\n\n/**\n * The gc modes that are supported by pixi.\n *\n * The {@link PIXI.settings.GC_MODE} Garbage Collection mode for PixiJS textures is AUTO\n * If set to GC_MODE, the renderer will occasionally check textures usage. If they are not\n * used for a specified period of time they will be removed from the GPU. They will of course\n * be uploaded again when they are required. This is a silent behind the scenes process that\n * should ensure that the GPU does not  get filled up.\n *\n * Handy for mobile devices!\n * This property only affects WebGL.\n *\n * @name GC_MODES\n * @enum {number}\n * @static\n * @memberof PIXI\n * @property {number} AUTO - Garbage collection will happen periodically automatically\n * @property {number} MANUAL - Garbage collection will need to be called manually\n */\nexport const GC_MODES = {\n    AUTO:           0,\n    MANUAL:         1,\n};\n\n/**\n * Constants that specify float precision in shaders.\n *\n * @name PRECISION\n * @memberof PIXI\n * @static\n * @enum {string}\n * @constant\n * @property {string} LOW='lowp'\n * @property {string} MEDIUM='mediump'\n * @property {string} HIGH='highp'\n */\nexport const PRECISION = {\n    LOW: 'lowp',\n    MEDIUM: 'mediump',\n    HIGH: 'highp',\n};\n","import { settings } from '@pixi/settings';\n\n/**\n * The prefix that denotes a URL is for a retina asset.\n *\n * @static\n * @name RETINA_PREFIX\n * @memberof PIXI.settings\n * @type {RegExp}\n * @default /@([0-9\\.]+)x/\n * @example `@2x`\n */\nsettings.RETINA_PREFIX = /@([0-9\\.]+)x/;\n\n/**\n * Should the `failIfMajorPerformanceCaveat` flag be enabled as a context option used in the `isWebGLSupported` function.\n * For most scenarios this should be left as true, as otherwise the user may have a poor experience.\n * However, it can be useful to disable under certain scenarios, such as headless unit tests.\n *\n * @static\n * @name FAIL_IF_MAJOR_PERFORMANCE_CAVEAT\n * @memberof PIXI.settings\n * @type {boolean}\n * @default true\n */\nsettings.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT = true;\n\nexport { settings };\n","let saidHello = false;\nconst VERSION = '__VERSION__';\n\n/**\n * Skips the hello message of renderers that are created after this is run.\n *\n * @function skipHello\n * @memberof PIXI.utils\n */\nexport function skipHello()\n{\n    saidHello = true;\n}\n\n/**\n * Logs out the version and renderer information for this running instance of PIXI.\n * If you don't want to see this message you can run `PIXI.utils.skipHello()` before\n * creating your renderer. Keep in mind that doing that will forever make you a jerk face.\n *\n * @static\n * @function sayHello\n * @memberof PIXI.utils\n * @param {string} type - The string renderer type to log.\n */\nexport function sayHello(type)\n{\n    if (saidHello)\n    {\n        return;\n    }\n\n    if (navigator.userAgent.toLowerCase().indexOf('chrome') > -1)\n    {\n        const args = [\n            `\\n %c %c %c PixiJS ${VERSION} - ✰ ${type} ✰  %c  %c  http://www.pixijs.com/  %c %c ♥%c♥%c♥ \\n\\n`,\n            'background: #ff66a5; padding:5px 0;',\n            'background: #ff66a5; padding:5px 0;',\n            'color: #ff66a5; background: #030307; padding:5px 0;',\n            'background: #ff66a5; padding:5px 0;',\n            'background: #ffc3dc; padding:5px 0;',\n            'background: #ff66a5; padding:5px 0;',\n            'color: #ff2424; background: #fff; padding:5px 0;',\n            'color: #ff2424; background: #fff; padding:5px 0;',\n            'color: #ff2424; background: #fff; padding:5px 0;',\n        ];\n\n        window.console.log.apply(console, args);\n    }\n    else if (window.console)\n    {\n        window.console.log(`PixiJS ${VERSION} - ${type} - http://www.pixijs.com/`);\n    }\n\n    saidHello = true;\n}\n","import { settings } from '../settings';\n\nlet supported;\n\n/**\n * Helper for checking for WebGL support.\n *\n * @memberof PIXI.utils\n * @function isWebGLSupported\n * @return {boolean} Is WebGL supported.\n */\nexport function isWebGLSupported()\n{\n    if (typeof supported === 'undefined')\n    {\n        supported = (function supported()\n        {\n            const contextOptions = {\n                stencil: true,\n                failIfMajorPerformanceCaveat: settings.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT,\n            };\n\n            try\n            {\n                if (!window.WebGLRenderingContext)\n                {\n                    return false;\n                }\n\n                const canvas = document.createElement('canvas');\n                let gl = canvas.getContext('webgl', contextOptions)\n                    || canvas.getContext('experimental-webgl', contextOptions);\n\n                const success = !!(gl && gl.getContextAttributes().stencil);\n\n                if (gl)\n                {\n                    const loseContext = gl.getExtension('WEBGL_lose_context');\n\n                    if (loseContext)\n                    {\n                        loseContext.loseContext();\n                    }\n                }\n\n                gl = null;\n\n                return success;\n            }\n            catch (e)\n            {\n                return false;\n            }\n        })();\n    }\n\n    return supported;\n}\n","/**\n * Converts a hexadecimal color number to an [R, G, B] array of normalized floats (numbers from 0.0 to 1.0).\n *\n * @example\n * PIXI.utils.hex2rgb(0xffffff); // returns [1, 1, 1]\n * @memberof PIXI.utils\n * @function hex2rgb\n * @param {number} hex - The hexadecimal number to convert\n * @param  {number[]} [out=[]] If supplied, this array will be used rather than returning a new one\n * @return {number[]} An array representing the [R, G, B] of the color where all values are floats.\n */\nexport function hex2rgb(hex, out)\n{\n    out = out || [];\n\n    out[0] = ((hex >> 16) & 0xFF) / 255;\n    out[1] = ((hex >> 8) & 0xFF) / 255;\n    out[2] = (hex & 0xFF) / 255;\n\n    return out;\n}\n\n/**\n * Converts a hexadecimal color number to a string.\n *\n * @example\n * PIXI.utils.hex2string(0xffffff); // returns \"#ffffff\"\n * @memberof PIXI.utils\n * @function hex2string\n * @param {number} hex - Number in hex (e.g., `0xffffff`)\n * @return {string} The string color (e.g., `\"#ffffff\"`).\n */\nexport function hex2string(hex)\n{\n    hex = hex.toString(16);\n    hex = '000000'.substr(0, 6 - hex.length) + hex;\n\n    return `#${hex}`;\n}\n\n/**\n * Converts a hexadecimal string to a hexadecimal color number.\n *\n * @example\n * PIXI.utils.string2hex(\"#ffffff\"); // returns 0xffffff\n * @memberof PIXI.utils\n * @function string2hex\n * @param {string} The string color (e.g., `\"#ffffff\"`)\n * @return {number} Number in hexadecimal.\n */\nexport function string2hex(string)\n{\n    if (typeof string === 'string' && string[0] === '#')\n    {\n        string = string.substr(1);\n    }\n\n    return parseInt(string, 16);\n}\n\n/**\n * Converts a color as an [R, G, B] array of normalized floats to a hexadecimal number.\n *\n * @example\n * PIXI.utils.rgb2hex([1, 1, 1]); // returns 0xffffff\n * @memberof PIXI.utils\n * @function rgb2hex\n * @param {number[]} rgb - Array of numbers where all values are normalized floats from 0.0 to 1.0.\n * @return {number} Number in hexadecimal.\n */\nexport function rgb2hex(rgb)\n{\n    return (((rgb[0] * 255) << 16) + ((rgb[1] * 255) << 8) + (rgb[2] * 255 | 0));\n}\n","import { BLEND_MODES } from '@pixi/constants';\n\n/**\n * Corrects PixiJS blend, takes premultiplied alpha into account\n *\n * @memberof PIXI.utils\n * @function mapPremultipliedBlendModes\n * @private\n * @param {Array<number[]>} [array] - The array to output into.\n * @return {Array<number[]>} Mapped modes.\n */\nfunction mapPremultipliedBlendModes()\n{\n    const pm = [];\n    const npm = [];\n\n    for (let i = 0; i < 32; i++)\n    {\n        pm[i] = i;\n        npm[i] = i;\n    }\n\n    pm[BLEND_MODES.NORMAL_NPM] = BLEND_MODES.NORMAL;\n    pm[BLEND_MODES.ADD_NPM] = BLEND_MODES.ADD;\n    pm[BLEND_MODES.SCREEN_NPM] = BLEND_MODES.SCREEN;\n\n    npm[BLEND_MODES.NORMAL] = BLEND_MODES.NORMAL_NPM;\n    npm[BLEND_MODES.ADD] = BLEND_MODES.ADD_NPM;\n    npm[BLEND_MODES.SCREEN] = BLEND_MODES.SCREEN_NPM;\n\n    const array = [];\n\n    array.push(npm);\n    array.push(pm);\n\n    return array;\n}\n\n/**\n * maps premultiply flag and blendMode to adjusted blendMode\n * @memberof PIXI.utils\n * @const premultiplyBlendMode\n * @type {Array<number[]>}\n */\nexport const premultiplyBlendMode = mapPremultipliedBlendModes();\n\n/**\n * changes blendMode according to texture format\n *\n * @memberof PIXI.utils\n * @function correctBlendMode\n * @param {number} blendMode supposed blend mode\n * @param {boolean} premultiplied  whether source is premultiplied\n * @returns {number} true blend mode for this texture\n */\nexport function correctBlendMode(blendMode, premultiplied)\n{\n    return premultiplyBlendMode[premultiplied ? 1 : 0][blendMode];\n}\n\n/**\n * combines rgb and alpha to out array\n *\n * @memberof PIXI.utils\n * @function premultiplyRgba\n * @param {Float32Array|number[]} rgb input rgb\n * @param {number} alpha alpha param\n * @param {Float32Array} [out] output\n * @param {boolean} [premultiply=true] do premultiply it\n * @returns {Float32Array} vec4 rgba\n */\nexport function premultiplyRgba(rgb, alpha, out, premultiply)\n{\n    out = out || new Float32Array(4);\n    if (premultiply || premultiply === undefined)\n    {\n        out[0] = rgb[0] * alpha;\n        out[1] = rgb[1] * alpha;\n        out[2] = rgb[2] * alpha;\n    }\n    else\n    {\n        out[0] = rgb[0];\n        out[1] = rgb[1];\n        out[2] = rgb[2];\n    }\n    out[3] = alpha;\n\n    return out;\n}\n\n/**\n * premultiplies tint\n *\n * @memberof PIXI.utils\n * @function premultiplyTint\n * @param {number} tint integer RGB\n * @param {number} alpha floating point alpha (0.0-1.0)\n * @returns {number} tint multiplied by alpha\n */\nexport function premultiplyTint(tint, alpha)\n{\n    if (alpha === 1.0)\n    {\n        return (alpha * 255 << 24) + tint;\n    }\n    if (alpha === 0.0)\n    {\n        return 0;\n    }\n    let R = ((tint >> 16) & 0xFF);\n    let G = ((tint >> 8) & 0xFF);\n    let B = (tint & 0xFF);\n\n    R = ((R * alpha) + 0.5) | 0;\n    G = ((G * alpha) + 0.5) | 0;\n    B = ((B * alpha) + 0.5) | 0;\n\n    return (alpha * 255 << 24) + (R << 16) + (G << 8) + B;\n}\n\n/**\n * converts integer tint and float alpha to vec4 form, premultiplies by default\n *\n * @memberof PIXI.utils\n * @function premultiplyTintToRgba\n * @param {number} tint input tint\n * @param {number} alpha alpha param\n * @param {Float32Array} [out] output\n * @param {boolean} [premultiply=true] do premultiply it\n * @returns {Float32Array} vec4 rgba\n */\nexport function premultiplyTintToRgba(tint, alpha, out, premultiply)\n{\n    out = out || new Float32Array(4);\n    out[0] = ((tint >> 16) & 0xFF) / 255.0;\n    out[1] = ((tint >> 8) & 0xFF) / 255.0;\n    out[2] = (tint & 0xFF) / 255.0;\n    if (premultiply || premultiply === undefined)\n    {\n        out[0] *= alpha;\n        out[1] *= alpha;\n        out[2] *= alpha;\n    }\n    out[3] = alpha;\n\n    return out;\n}\n","/**\n * Generic Mask Stack data structure\n *\n * @memberof PIXI.utils\n * @function createIndicesForQuads\n * @param {number} size - Number of quads\n * @param {Uint16Array|Uint32Array} [outBuffer] - Buffer for output, length has to be `6 * size`\n * @return {Uint16Array|Uint32Array} - Resulting index buffer\n */\nexport function createIndicesForQuads(size, outBuffer = null)\n{\n    // the total number of indices in our array, there are 6 points per quad.\n    const totalIndices = size * 6;\n\n    outBuffer = outBuffer || new Uint16Array(totalIndices);\n\n    if (outBuffer.length !== totalIndices)\n    {\n        throw new Error(`Out buffer length is incorrect, got ${outBuffer.length} and expected ${totalIndices}`);\n    }\n\n    // fill the indices with the quads to draw\n    for (let i = 0, j = 0; i < totalIndices; i += 6, j += 4)\n    {\n        outBuffer[i + 0] = j + 0;\n        outBuffer[i + 1] = j + 1;\n        outBuffer[i + 2] = j + 2;\n        outBuffer[i + 3] = j + 0;\n        outBuffer[i + 4] = j + 2;\n        outBuffer[i + 5] = j + 3;\n    }\n\n    return outBuffer;\n}\n","/**\n * Remove items from a javascript array without generating garbage\n *\n * @function removeItems\n * @memberof PIXI.utils\n * @param {Array<any>} arr Array to remove elements from\n * @param {number} startIdx starting index\n * @param {number} removeCount how many to remove\n */\nexport function removeItems(arr, startIdx, removeCount)\n{\n    const length = arr.length;\n    let i;\n\n    if (startIdx >= length || removeCount === 0)\n    {\n        return;\n    }\n\n    removeCount = (startIdx + removeCount > length ? length - startIdx : removeCount);\n\n    const len = length - removeCount;\n\n    for (i = startIdx; i < len; ++i)\n    {\n        arr[i] = arr[i + removeCount];\n    }\n\n    arr.length = len;\n}\n","let nextUid = 0;\n\n/**\n * Gets the next unique identifier\n *\n * @memberof PIXI.utils\n * @function uid\n * @return {number} The next unique identifier to use.\n */\nexport function uid()\n{\n    return ++nextUid;\n}\n","/**\n * Returns sign of number\n *\n * @memberof PIXI.utils\n * @function sign\n * @param {number} n - the number to check the sign of\n * @returns {number} 0 if `n` is 0, -1 if `n` is negative, 1 if `n` is positive\n */\nexport function sign(n)\n{\n    if (n === 0) return 0;\n\n    return n < 0 ? -1 : 1;\n}\n","// Taken from the bit-twiddle package\n\n/**\n * Rounds to next power of two.\n *\n * @function nextPow2\n * @memberof PIXI.utils\n * @param {number} v input value\n * @return {number}\n */\nexport function nextPow2(v)\n{\n    v += v === 0;\n    --v;\n    v |= v >>> 1;\n    v |= v >>> 2;\n    v |= v >>> 4;\n    v |= v >>> 8;\n    v |= v >>> 16;\n\n    return v + 1;\n}\n\n/**\n * Checks if a number is a power of two.\n *\n * @function isPow2\n * @memberof PIXI.utils\n * @param {number} v input value\n * @return {boolean} `true` if value is power of two\n */\nexport function isPow2(v)\n{\n    return !(v & (v - 1)) && (!!v);\n}\n\n/**\n * Computes ceil of log base 2\n *\n * @function log2\n * @memberof PIXI.utils\n * @param {number} v input value\n * @return {number} logarithm base 2\n */\nexport function log2(v)\n{\n    let r = (v > 0xFFFF) << 4;\n\n    v >>>= r;\n\n    let shift = (v > 0xFF) << 3;\n\n    v >>>= shift; r |= shift;\n    shift = (v > 0xF) << 2;\n    v >>>= shift; r |= shift;\n    shift = (v > 0x3) << 1;\n    v >>>= shift; r |= shift;\n\n    return r | (v >> 1);\n}\n","/**\n * @todo Describe property usage\n *\n * @static\n * @name ProgramCache\n * @memberof PIXI.utils\n * @type {Object}\n */\nexport const ProgramCache = {};\n\n/**\n * @todo Describe property usage\n *\n * @static\n * @name TextureCache\n * @memberof PIXI.utils\n * @type {Object}\n */\nexport const TextureCache = Object.create(null);\n\n/**\n * @todo Describe property usage\n *\n * @static\n * @name BaseTextureCache\n * @memberof PIXI.utils\n * @type {Object}\n */\n\nexport const BaseTextureCache = Object.create(null);\n/**\n * Destroys all texture in the cache\n *\n * @memberof PIXI.utils\n * @function destroyTextureCache\n */\nexport function destroyTextureCache()\n{\n    let key;\n\n    for (key in TextureCache)\n    {\n        TextureCache[key].destroy();\n    }\n    for (key in BaseTextureCache)\n    {\n        BaseTextureCache[key].destroy();\n    }\n}\n\n/**\n * Removes all textures from cache, but does not destroy them\n *\n * @memberof PIXI.utils\n * @function clearTextureCache\n */\nexport function clearTextureCache()\n{\n    let key;\n\n    for (key in TextureCache)\n    {\n        delete TextureCache[key];\n    }\n    for (key in BaseTextureCache)\n    {\n        delete BaseTextureCache[key];\n    }\n}\n","/**\n * Trim transparent borders from a canvas\n *\n * @memberof PIXI.utils\n * @function trimCanvas\n * @param {HTMLCanvasElement} canvas - the canvas to trim\n * @returns {object} Trim data\n */\nexport function trimCanvas(canvas)\n{\n    // https://gist.github.com/remy/784508\n\n    let width = canvas.width;\n    let height = canvas.height;\n\n    const context = canvas.getContext('2d');\n    const imageData = context.getImageData(0, 0, width, height);\n    const pixels = imageData.data;\n    const len = pixels.length;\n\n    const bound = {\n        top: null,\n        left: null,\n        right: null,\n        bottom: null,\n    };\n    let data = null;\n    let i;\n    let x;\n    let y;\n\n    for (i = 0; i < len; i += 4)\n    {\n        if (pixels[i + 3] !== 0)\n        {\n            x = (i / 4) % width;\n            y = ~~((i / 4) / width);\n\n            if (bound.top === null)\n            {\n                bound.top = y;\n            }\n\n            if (bound.left === null)\n            {\n                bound.left = x;\n            }\n            else if (x < bound.left)\n            {\n                bound.left = x;\n            }\n\n            if (bound.right === null)\n            {\n                bound.right = x + 1;\n            }\n            else if (bound.right < x)\n            {\n                bound.right = x + 1;\n            }\n\n            if (bound.bottom === null)\n            {\n                bound.bottom = y;\n            }\n            else if (bound.bottom < y)\n            {\n                bound.bottom = y;\n            }\n        }\n    }\n\n    if (bound.top !== null)\n    {\n        width = bound.right - bound.left;\n        height = bound.bottom - bound.top + 1;\n        data = context.getImageData(bound.left, bound.top, width, height);\n    }\n\n    return {\n        height,\n        width,\n        data,\n    };\n}\n","import { settings } from '@pixi/settings';\n\n/**\n * Creates a Canvas element of the given size to be used as a target for rendering to.\n *\n * @class\n * @memberof PIXI.utils\n */\nexport default class CanvasRenderTarget\n{\n    /**\n     * @param {number} width - the width for the newly created canvas\n     * @param {number} height - the height for the newly created canvas\n     * @param {number} [resolution=1] - The resolution / device pixel ratio of the canvas\n     */\n    constructor(width, height, resolution)\n    {\n        /**\n         * The Canvas object that belongs to this CanvasRenderTarget.\n         *\n         * @member {HTMLCanvasElement}\n         */\n        this.canvas = document.createElement('canvas');\n\n        /**\n         * A CanvasRenderingContext2D object representing a two-dimensional rendering context.\n         *\n         * @member {CanvasRenderingContext2D}\n         */\n        this.context = this.canvas.getContext('2d');\n\n        this.resolution = resolution || settings.RESOLUTION;\n\n        this.resize(width, height);\n    }\n\n    /**\n     * Clears the canvas that was created by the CanvasRenderTarget class.\n     *\n     * @private\n     */\n    clear()\n    {\n        this.context.setTransform(1, 0, 0, 1, 0, 0);\n        this.context.clearRect(0, 0, this.canvas.width, this.canvas.height);\n    }\n\n    /**\n     * Resizes the canvas to the specified width and height.\n     *\n     * @param {number} width - the new width of the canvas\n     * @param {number} height - the new height of the canvas\n     */\n    resize(width, height)\n    {\n        this.canvas.width = width * this.resolution;\n        this.canvas.height = height * this.resolution;\n    }\n\n    /**\n     * Destroys this canvas.\n     *\n     */\n    destroy()\n    {\n        this.context = null;\n        this.canvas = null;\n    }\n\n    /**\n     * The width of the canvas buffer in pixels.\n     *\n     * @member {number}\n     */\n    get width()\n    {\n        return this.canvas.width;\n    }\n\n    set width(val) // eslint-disable-line require-jsdoc\n    {\n        this.canvas.width = val;\n    }\n\n    /**\n     * The height of the canvas buffer in pixels.\n     *\n     * @member {number}\n     */\n    get height()\n    {\n        return this.canvas.height;\n    }\n\n    set height(val) // eslint-disable-line require-jsdoc\n    {\n        this.canvas.height = val;\n    }\n}\n","/**\n * Regexp for data URI.\n * Based on: {@link https://github.com/ragingwind/data-uri-regex}\n *\n * @static\n * @constant {RegExp|string} DATA_URI\n * @memberof PIXI\n * @example data:image/png;base64\n */\nexport const DATA_URI = /^\\s*data:(?:([\\w-]+)\\/([\\w+.-]+))?(?:;charset=([\\w-]+))?(?:;(base64))?,(.*)/i;\n","import { DATA_URI } from '../const';\n\n/**\n * Typedef for decomposeDataUri return object.\n *\n * @memberof PIXI.utils\n * @typedef {object} DecomposedDataUri\n * @property {string} mediaType Media type, eg. `image`\n * @property {string} subType Sub type, eg. `png`\n * @property {string} encoding Data encoding, eg. `base64`\n * @property {string} data The actual data\n */\n\n/**\n * Split a data URI into components. Returns undefined if\n * parameter `dataUri` is not a valid data URI.\n *\n * @memberof PIXI.utils\n * @function decomposeDataUri\n * @param {string} dataUri - the data URI to check\n * @return {PIXI.utils.DecomposedDataUri|undefined} The decomposed data uri or undefined\n */\nexport function decomposeDataUri(dataUri)\n{\n    const dataUriMatch = DATA_URI.exec(dataUri);\n\n    if (dataUriMatch)\n    {\n        return {\n            mediaType: dataUriMatch[1] ? dataUriMatch[1].toLowerCase() : undefined,\n            subType: dataUriMatch[2] ? dataUriMatch[2].toLowerCase() : undefined,\n            charset: dataUriMatch[3] ? dataUriMatch[3].toLowerCase() : undefined,\n            encoding: dataUriMatch[4] ? dataUriMatch[4].toLowerCase() : undefined,\n            data: dataUriMatch[5],\n        };\n    }\n\n    return undefined;\n}\n","import _url from 'url';\n\nlet tempAnchor;\n\n/**\n * Sets the `crossOrigin` property for this resource based on if the url\n * for this resource is cross-origin. If crossOrigin was manually set, this\n * function does nothing.\n * Nipped from the resource loader!\n *\n * @ignore\n * @param {string} url - The url to test.\n * @param {object} [loc=window.location] - The location object to test against.\n * @return {string} The crossOrigin value to use (or empty string for none).\n */\nexport function determineCrossOrigin(url, loc = window.location)\n{\n    // data: and javascript: urls are considered same-origin\n    if (url.indexOf('data:') === 0)\n    {\n        return '';\n    }\n\n    // default is window.location\n    loc = loc || window.location;\n\n    if (!tempAnchor)\n    {\n        tempAnchor = document.createElement('a');\n    }\n\n    // let the browser determine the full href for the url of this resource and then\n    // parse with the node url lib, we can't use the properties of the anchor element\n    // because they don't work in IE9 :(\n    tempAnchor.href = url;\n    url = _url.parse(tempAnchor.href);\n\n    const samePort = (!url.port && loc.port === '') || (url.port === loc.port);\n\n    // if cross origin\n    if (url.hostname !== loc.hostname || !samePort || url.protocol !== loc.protocol)\n    {\n        return 'anonymous';\n    }\n\n    return '';\n}\n","import { settings } from '../settings';\n\n/**\n * get the resolution / device pixel ratio of an asset by looking for the prefix\n * used by spritesheets and image urls\n *\n * @memberof PIXI.utils\n * @function getResolutionOfUrl\n * @param {string} url - the image path\n * @param {number} [defaultValue=1] - the defaultValue if no filename prefix is set.\n * @return {number} resolution / device pixel ratio of an asset\n */\nexport function getResolutionOfUrl(url, defaultValue)\n{\n    const resolution = settings.RETINA_PREFIX.exec(url);\n\n    if (resolution)\n    {\n        return parseFloat(resolution[1]);\n    }\n\n    return defaultValue !== undefined ? defaultValue : 1;\n}\n","// A map of warning messages already fired\nconst warnings = {};\n\n/**\n * Helper for warning developers about deprecated features & settings.\n * A stack track for warnings is given; useful for tracking-down where\n * deprecated methods/properties/classes are being used within the code.\n *\n * @memberof PIXI.utils\n * @function deprecation\n * @param {string} version - The version where the feature became deprecated\n * @param {string} message - Message should include what is deprecated, where, and the new solution\n * @param {number} [ignoreDepth=3] - The number of steps to ignore at the top of the error stack\n *        this is mostly to ignore internal deprecation calls.\n */\nexport function deprecation(version, message, ignoreDepth = 3)\n{\n    // Ignore duplicat\n    if (warnings[message])\n    {\n        return;\n    }\n\n    /* eslint-disable no-console */\n    let stack = new Error().stack;\n\n    // Handle IE < 10 and Safari < 6\n    if (typeof stack === 'undefined')\n    {\n        console.warn('PixiJS Deprecation Warning: ', `${message}\\nDeprecated since v${version}`);\n    }\n    else\n    {\n        // chop off the stack trace which includes PixiJS internal calls\n        stack = stack.split('\\n').splice(ignoreDepth).join('\\n');\n\n        if (console.groupCollapsed)\n        {\n            console.groupCollapsed(\n                '%cPixiJS Deprecation Warning: %c%s',\n                'color:#614108;background:#fffbe6',\n                'font-weight:normal;color:#614108;background:#fffbe6',\n                `${message}\\nDeprecated since v${version}`\n            );\n            console.warn(stack);\n            console.groupEnd();\n        }\n        else\n        {\n            console.warn('PixiJS Deprecation Warning: ', `${message}\\nDeprecated since v${version}`);\n            console.warn(stack);\n        }\n    }\n    /* eslint-enable no-console */\n\n    warnings[message] = true;\n}\n","/**\n * The Point object represents a location in a two-dimensional coordinate system, where x represents\n * the horizontal axis and y represents the vertical axis.\n *\n * @class\n * @memberof PIXI\n */\nexport default class Point\n{\n    /**\n     * @param {number} [x=0] - position of the point on the x axis\n     * @param {number} [y=0] - position of the point on the y axis\n     */\n    constructor(x = 0, y = 0)\n    {\n        /**\n         * @member {number}\n         * @default 0\n         */\n        this.x = x;\n\n        /**\n         * @member {number}\n         * @default 0\n         */\n        this.y = y;\n    }\n\n    /**\n     * Creates a clone of this point\n     *\n     * @return {PIXI.Point} a copy of the point\n     */\n    clone()\n    {\n        return new Point(this.x, this.y);\n    }\n\n    /**\n     * Copies x and y from the given point\n     *\n     * @param {PIXI.IPoint} p - The point to copy from\n     * @returns {PIXI.IPoint} Returns itself.\n     */\n    copyFrom(p)\n    {\n        this.set(p.x, p.y);\n\n        return this;\n    }\n\n    /**\n     * Copies x and y into the given point\n     *\n     * @param {PIXI.IPoint} p - The point to copy.\n     * @returns {PIXI.IPoint} Given point with values updated\n     */\n    copyTo(p)\n    {\n        p.set(this.x, this.y);\n\n        return p;\n    }\n\n    /**\n     * Returns true if the given point is equal to this point\n     *\n     * @param {PIXI.IPoint} p - The point to check\n     * @returns {boolean} Whether the given point equal to this point\n     */\n    equals(p)\n    {\n        return (p.x === this.x) && (p.y === this.y);\n    }\n\n    /**\n     * Sets the point to a new x and y position.\n     * If y is omitted, both x and y will be set to x.\n     *\n     * @param {number} [x=0] - position of the point on the x axis\n     * @param {number} [y=0] - position of the point on the y axis\n     */\n    set(x, y)\n    {\n        this.x = x || 0;\n        this.y = y || ((y !== 0) ? this.x : 0);\n    }\n}\n","/**\n * The Point object represents a location in a two-dimensional coordinate system, where x represents\n * the horizontal axis and y represents the vertical axis.\n *\n * An ObservablePoint is a point that triggers a callback when the point's position is changed.\n *\n * @class\n * @memberof PIXI\n */\nexport default class ObservablePoint\n{\n    /**\n     * @param {Function} cb - callback when changed\n     * @param {object} scope - owner of callback\n     * @param {number} [x=0] - position of the point on the x axis\n     * @param {number} [y=0] - position of the point on the y axis\n     */\n    constructor(cb, scope, x = 0, y = 0)\n    {\n        this._x = x;\n        this._y = y;\n\n        this.cb = cb;\n        this.scope = scope;\n    }\n\n    /**\n     * Creates a clone of this point.\n     * The callback and scope params can be overidden otherwise they will default\n     * to the clone object's values.\n     *\n     * @override\n     * @param {Function} [cb=null] - callback when changed\n     * @param {object} [scope=null] - owner of callback\n     * @return {PIXI.ObservablePoint} a copy of the point\n     */\n    clone(cb = null, scope = null)\n    {\n        const _cb = cb || this.cb;\n        const _scope = scope || this.scope;\n\n        return new ObservablePoint(_cb, _scope, this._x, this._y);\n    }\n\n    /**\n     * Sets the point to a new x and y position.\n     * If y is omitted, both x and y will be set to x.\n     *\n     * @param {number} [x=0] - position of the point on the x axis\n     * @param {number} [y=0] - position of the point on the y axis\n     */\n    set(x, y)\n    {\n        const _x = x || 0;\n        const _y = y || ((y !== 0) ? _x : 0);\n\n        if (this._x !== _x || this._y !== _y)\n        {\n            this._x = _x;\n            this._y = _y;\n            this.cb.call(this.scope);\n        }\n    }\n\n    /**\n     * Copies x and y from the given point\n     *\n     * @param {PIXI.IPoint} p - The point to copy from.\n     * @returns {PIXI.IPoint} Returns itself.\n     */\n    copyFrom(p)\n    {\n        if (this._x !== p.x || this._y !== p.y)\n        {\n            this._x = p.x;\n            this._y = p.y;\n            this.cb.call(this.scope);\n        }\n\n        return this;\n    }\n\n    /**\n     * Copies x and y into the given point\n     *\n     * @param {PIXI.IPoint} p - The point to copy.\n     * @returns {PIXI.IPoint} Given point with values updated\n     */\n    copyTo(p)\n    {\n        p.set(this._x, this._y);\n\n        return p;\n    }\n\n    /**\n     * Returns true if the given point is equal to this point\n     *\n     * @param {PIXI.IPoint} p - The point to check\n     * @returns {boolean} Whether the given point equal to this point\n     */\n    equals(p)\n    {\n        return (p.x === this._x) && (p.y === this._y);\n    }\n\n    /**\n     * The position of the displayObject on the x axis relative to the local coordinates of the parent.\n     *\n     * @member {number}\n     */\n    get x()\n    {\n        return this._x;\n    }\n\n    set x(value) // eslint-disable-line require-jsdoc\n    {\n        if (this._x !== value)\n        {\n            this._x = value;\n            this.cb.call(this.scope);\n        }\n    }\n\n    /**\n     * The position of the displayObject on the x axis relative to the local coordinates of the parent.\n     *\n     * @member {number}\n     */\n    get y()\n    {\n        return this._y;\n    }\n\n    set y(value) // eslint-disable-line require-jsdoc\n    {\n        if (this._y !== value)\n        {\n            this._y = value;\n            this.cb.call(this.scope);\n        }\n    }\n}\n\n/**\n * A number, or a string containing a number.\n * @memberof PIXI\n * @typedef {(PIXI.Point|PIXI.ObservablePoint)} IPoint\n */\n","/**\n * Two Pi.\n *\n * @static\n * @constant {number} PI_2\n * @memberof PIXI\n */\nexport const PI_2 = Math.PI * 2;\n\n/**\n * Conversion factor for converting radians to degrees.\n *\n * @static\n * @constant {number} RAD_TO_DEG\n * @memberof PIXI\n */\nexport const RAD_TO_DEG = 180 / Math.PI;\n\n/**\n * Conversion factor for converting degrees to radians.\n *\n * @static\n * @constant {number} DEG_TO_RAD\n * @memberof PIXI\n */\nexport const DEG_TO_RAD = Math.PI / 180;\n\n/**\n * Constants that identify shapes, mainly to prevent `instanceof` calls.\n *\n * @static\n * @constant\n * @name SHAPES\n * @memberof PIXI\n * @type {object}\n * @property {number} POLY Polygon\n * @property {number} RECT Rectangle\n * @property {number} CIRC Circle\n * @property {number} ELIP Ellipse\n * @property {number} RREC Rounded Rectangle\n */\nexport const SHAPES = {\n    POLY: 0,\n    RECT: 1,\n    CIRC: 2,\n    ELIP: 3,\n    RREC: 4,\n};\n\n","import Point from './Point';\nimport { PI_2 } from './const';\n\n/**\n * The PixiJS Matrix as a class makes it a lot faster.\n *\n * Here is a representation of it:\n * ```js\n * | a | c | tx|\n * | b | d | ty|\n * | 0 | 0 | 1 |\n * ```\n * @class\n * @memberof PIXI\n */\nexport default class Matrix\n{\n    /**\n     * @param {number} [a=1] - x scale\n     * @param {number} [b=0] - x skew\n     * @param {number} [c=0] - y skew\n     * @param {number} [d=1] - y scale\n     * @param {number} [tx=0] - x translation\n     * @param {number} [ty=0] - y translation\n     */\n    constructor(a = 1, b = 0, c = 0, d = 1, tx = 0, ty = 0)\n    {\n        /**\n         * @member {number}\n         * @default 1\n         */\n        this.a = a;\n\n        /**\n         * @member {number}\n         * @default 0\n         */\n        this.b = b;\n\n        /**\n         * @member {number}\n         * @default 0\n         */\n        this.c = c;\n\n        /**\n         * @member {number}\n         * @default 1\n         */\n        this.d = d;\n\n        /**\n         * @member {number}\n         * @default 0\n         */\n        this.tx = tx;\n\n        /**\n         * @member {number}\n         * @default 0\n         */\n        this.ty = ty;\n\n        this.array = null;\n    }\n\n    /**\n     * Creates a Matrix object based on the given array. The Element to Matrix mapping order is as follows:\n     *\n     * a = array[0]\n     * b = array[1]\n     * c = array[3]\n     * d = array[4]\n     * tx = array[2]\n     * ty = array[5]\n     *\n     * @param {number[]} array - The array that the matrix will be populated from.\n     */\n    fromArray(array)\n    {\n        this.a = array[0];\n        this.b = array[1];\n        this.c = array[3];\n        this.d = array[4];\n        this.tx = array[2];\n        this.ty = array[5];\n    }\n\n    /**\n     * sets the matrix properties\n     *\n     * @param {number} a - Matrix component\n     * @param {number} b - Matrix component\n     * @param {number} c - Matrix component\n     * @param {number} d - Matrix component\n     * @param {number} tx - Matrix component\n     * @param {number} ty - Matrix component\n     *\n     * @return {PIXI.Matrix} This matrix. Good for chaining method calls.\n     */\n    set(a, b, c, d, tx, ty)\n    {\n        this.a = a;\n        this.b = b;\n        this.c = c;\n        this.d = d;\n        this.tx = tx;\n        this.ty = ty;\n\n        return this;\n    }\n\n    /**\n     * Creates an array from the current Matrix object.\n     *\n     * @param {boolean} transpose - Whether we need to transpose the matrix or not\n     * @param {Float32Array} [out=new Float32Array(9)] - If provided the array will be assigned to out\n     * @return {number[]} the newly created array which contains the matrix\n     */\n    toArray(transpose, out)\n    {\n        if (!this.array)\n        {\n            this.array = new Float32Array(9);\n        }\n\n        const array = out || this.array;\n\n        if (transpose)\n        {\n            array[0] = this.a;\n            array[1] = this.b;\n            array[2] = 0;\n            array[3] = this.c;\n            array[4] = this.d;\n            array[5] = 0;\n            array[6] = this.tx;\n            array[7] = this.ty;\n            array[8] = 1;\n        }\n        else\n        {\n            array[0] = this.a;\n            array[1] = this.c;\n            array[2] = this.tx;\n            array[3] = this.b;\n            array[4] = this.d;\n            array[5] = this.ty;\n            array[6] = 0;\n            array[7] = 0;\n            array[8] = 1;\n        }\n\n        return array;\n    }\n\n    /**\n     * Get a new position with the current transformation applied.\n     * Can be used to go from a child's coordinate space to the world coordinate space. (e.g. rendering)\n     *\n     * @param {PIXI.Point} pos - The origin\n     * @param {PIXI.Point} [newPos] - The point that the new position is assigned to (allowed to be same as input)\n     * @return {PIXI.Point} The new point, transformed through this matrix\n     */\n    apply(pos, newPos)\n    {\n        newPos = newPos || new Point();\n\n        const x = pos.x;\n        const y = pos.y;\n\n        newPos.x = (this.a * x) + (this.c * y) + this.tx;\n        newPos.y = (this.b * x) + (this.d * y) + this.ty;\n\n        return newPos;\n    }\n\n    /**\n     * Get a new position with the inverse of the current transformation applied.\n     * Can be used to go from the world coordinate space to a child's coordinate space. (e.g. input)\n     *\n     * @param {PIXI.Point} pos - The origin\n     * @param {PIXI.Point} [newPos] - The point that the new position is assigned to (allowed to be same as input)\n     * @return {PIXI.Point} The new point, inverse-transformed through this matrix\n     */\n    applyInverse(pos, newPos)\n    {\n        newPos = newPos || new Point();\n\n        const id = 1 / ((this.a * this.d) + (this.c * -this.b));\n\n        const x = pos.x;\n        const y = pos.y;\n\n        newPos.x = (this.d * id * x) + (-this.c * id * y) + (((this.ty * this.c) - (this.tx * this.d)) * id);\n        newPos.y = (this.a * id * y) + (-this.b * id * x) + (((-this.ty * this.a) + (this.tx * this.b)) * id);\n\n        return newPos;\n    }\n\n    /**\n     * Translates the matrix on the x and y.\n     *\n     * @param {number} x How much to translate x by\n     * @param {number} y How much to translate y by\n     * @return {PIXI.Matrix} This matrix. Good for chaining method calls.\n     */\n    translate(x, y)\n    {\n        this.tx += x;\n        this.ty += y;\n\n        return this;\n    }\n\n    /**\n     * Applies a scale transformation to the matrix.\n     *\n     * @param {number} x The amount to scale horizontally\n     * @param {number} y The amount to scale vertically\n     * @return {PIXI.Matrix} This matrix. Good for chaining method calls.\n     */\n    scale(x, y)\n    {\n        this.a *= x;\n        this.d *= y;\n        this.c *= x;\n        this.b *= y;\n        this.tx *= x;\n        this.ty *= y;\n\n        return this;\n    }\n\n    /**\n     * Applies a rotation transformation to the matrix.\n     *\n     * @param {number} angle - The angle in radians.\n     * @return {PIXI.Matrix} This matrix. Good for chaining method calls.\n     */\n    rotate(angle)\n    {\n        const cos = Math.cos(angle);\n        const sin = Math.sin(angle);\n\n        const a1 = this.a;\n        const c1 = this.c;\n        const tx1 = this.tx;\n\n        this.a = (a1 * cos) - (this.b * sin);\n        this.b = (a1 * sin) + (this.b * cos);\n        this.c = (c1 * cos) - (this.d * sin);\n        this.d = (c1 * sin) + (this.d * cos);\n        this.tx = (tx1 * cos) - (this.ty * sin);\n        this.ty = (tx1 * sin) + (this.ty * cos);\n\n        return this;\n    }\n\n    /**\n     * Appends the given Matrix to this Matrix.\n     *\n     * @param {PIXI.Matrix} matrix - The matrix to append.\n     * @return {PIXI.Matrix} This matrix. Good for chaining method calls.\n     */\n    append(matrix)\n    {\n        const a1 = this.a;\n        const b1 = this.b;\n        const c1 = this.c;\n        const d1 = this.d;\n\n        this.a = (matrix.a * a1) + (matrix.b * c1);\n        this.b = (matrix.a * b1) + (matrix.b * d1);\n        this.c = (matrix.c * a1) + (matrix.d * c1);\n        this.d = (matrix.c * b1) + (matrix.d * d1);\n\n        this.tx = (matrix.tx * a1) + (matrix.ty * c1) + this.tx;\n        this.ty = (matrix.tx * b1) + (matrix.ty * d1) + this.ty;\n\n        return this;\n    }\n\n    /**\n     * Sets the matrix based on all the available properties\n     *\n     * @param {number} x - Position on the x axis\n     * @param {number} y - Position on the y axis\n     * @param {number} pivotX - Pivot on the x axis\n     * @param {number} pivotY - Pivot on the y axis\n     * @param {number} scaleX - Scale on the x axis\n     * @param {number} scaleY - Scale on the y axis\n     * @param {number} rotation - Rotation in radians\n     * @param {number} skewX - Skew on the x axis\n     * @param {number} skewY - Skew on the y axis\n     * @return {PIXI.Matrix} This matrix. Good for chaining method calls.\n     */\n    setTransform(x, y, pivotX, pivotY, scaleX, scaleY, rotation, skewX, skewY)\n    {\n        this.a = Math.cos(rotation + skewY) * scaleX;\n        this.b = Math.sin(rotation + skewY) * scaleX;\n        this.c = -Math.sin(rotation - skewX) * scaleY;\n        this.d = Math.cos(rotation - skewX) * scaleY;\n\n        this.tx = x - ((pivotX * this.a) + (pivotY * this.c));\n        this.ty = y - ((pivotX * this.b) + (pivotY * this.d));\n\n        return this;\n    }\n\n    /**\n     * Prepends the given Matrix to this Matrix.\n     *\n     * @param {PIXI.Matrix} matrix - The matrix to prepend\n     * @return {PIXI.Matrix} This matrix. Good for chaining method calls.\n     */\n    prepend(matrix)\n    {\n        const tx1 = this.tx;\n\n        if (matrix.a !== 1 || matrix.b !== 0 || matrix.c !== 0 || matrix.d !== 1)\n        {\n            const a1 = this.a;\n            const c1 = this.c;\n\n            this.a = (a1 * matrix.a) + (this.b * matrix.c);\n            this.b = (a1 * matrix.b) + (this.b * matrix.d);\n            this.c = (c1 * matrix.a) + (this.d * matrix.c);\n            this.d = (c1 * matrix.b) + (this.d * matrix.d);\n        }\n\n        this.tx = (tx1 * matrix.a) + (this.ty * matrix.c) + matrix.tx;\n        this.ty = (tx1 * matrix.b) + (this.ty * matrix.d) + matrix.ty;\n\n        return this;\n    }\n\n    /**\n     * Decomposes the matrix (x, y, scaleX, scaleY, and rotation) and sets the properties on to a transform.\n     *\n     * @param {PIXI.Transform} transform - The transform to apply the properties to.\n     * @return {PIXI.Transform} The transform with the newly applied properties\n     */\n    decompose(transform)\n    {\n        // sort out rotation / skew..\n        const a = this.a;\n        const b = this.b;\n        const c = this.c;\n        const d = this.d;\n\n        const skewX = -Math.atan2(-c, d);\n        const skewY = Math.atan2(b, a);\n\n        const delta = Math.abs(skewX + skewY);\n\n        if (delta < 0.00001 || Math.abs(PI_2 - delta) < 0.00001)\n        {\n            transform.rotation = skewY;\n            transform.skew.x = transform.skew.y = 0;\n        }\n        else\n        {\n            transform.rotation = 0;\n            transform.skew.x = skewX;\n            transform.skew.y = skewY;\n        }\n\n        // next set scale\n        transform.scale.x = Math.sqrt((a * a) + (b * b));\n        transform.scale.y = Math.sqrt((c * c) + (d * d));\n\n        // next set position\n        transform.position.x = this.tx;\n        transform.position.y = this.ty;\n\n        return transform;\n    }\n\n    /**\n     * Inverts this matrix\n     *\n     * @return {PIXI.Matrix} This matrix. Good for chaining method calls.\n     */\n    invert()\n    {\n        const a1 = this.a;\n        const b1 = this.b;\n        const c1 = this.c;\n        const d1 = this.d;\n        const tx1 = this.tx;\n        const n = (a1 * d1) - (b1 * c1);\n\n        this.a = d1 / n;\n        this.b = -b1 / n;\n        this.c = -c1 / n;\n        this.d = a1 / n;\n        this.tx = ((c1 * this.ty) - (d1 * tx1)) / n;\n        this.ty = -((a1 * this.ty) - (b1 * tx1)) / n;\n\n        return this;\n    }\n\n    /**\n     * Resets this Matrix to an identity (default) matrix.\n     *\n     * @return {PIXI.Matrix} This matrix. Good for chaining method calls.\n     */\n    identity()\n    {\n        this.a = 1;\n        this.b = 0;\n        this.c = 0;\n        this.d = 1;\n        this.tx = 0;\n        this.ty = 0;\n\n        return this;\n    }\n\n    /**\n     * Creates a new Matrix object with the same values as this one.\n     *\n     * @return {PIXI.Matrix} A copy of this matrix. Good for chaining method calls.\n     */\n    clone()\n    {\n        const matrix = new Matrix();\n\n        matrix.a = this.a;\n        matrix.b = this.b;\n        matrix.c = this.c;\n        matrix.d = this.d;\n        matrix.tx = this.tx;\n        matrix.ty = this.ty;\n\n        return matrix;\n    }\n\n    /**\n     * Changes the values of the given matrix to be the same as the ones in this matrix\n     *\n     * @param {PIXI.Matrix} matrix - The matrix to copy to.\n     * @return {PIXI.Matrix} The matrix given in parameter with its values updated.\n     */\n    copyTo(matrix)\n    {\n        matrix.a = this.a;\n        matrix.b = this.b;\n        matrix.c = this.c;\n        matrix.d = this.d;\n        matrix.tx = this.tx;\n        matrix.ty = this.ty;\n\n        return matrix;\n    }\n\n    /**\n     * Changes the values of the matrix to be the same as the ones in given matrix\n     *\n     * @param {PIXI.Matrix} matrix - The matrix to copy from.\n     * @return {PIXI.Matrix} this\n     */\n    copyFrom(matrix)\n    {\n        this.a = matrix.a;\n        this.b = matrix.b;\n        this.c = matrix.c;\n        this.d = matrix.d;\n        this.tx = matrix.tx;\n        this.ty = matrix.ty;\n\n        return this;\n    }\n\n    /**\n     * A default (identity) matrix\n     *\n     * @static\n     * @const\n     * @member {PIXI.Matrix}\n     */\n    static get IDENTITY()\n    {\n        return new Matrix();\n    }\n\n    /**\n     * A temp matrix\n     *\n     * @static\n     * @const\n     * @member {PIXI.Matrix}\n     */\n    static get TEMP_MATRIX()\n    {\n        return new Matrix();\n    }\n}\n","// Your friendly neighbour https://en.wikipedia.org/wiki/Dihedral_group\n//\n// This file implements the dihedral group of order 16, also called\n// of degree 8. That's why its called GroupD8.\n\nimport Matrix from './Matrix';\n\n/*\n * Transform matrix for operation n is:\n * | ux | vx |\n * | uy | vy |\n */\n\nconst ux = [1, 1, 0, -1, -1, -1, 0, 1, 1, 1, 0, -1, -1, -1, 0, 1];\nconst uy = [0, 1, 1, 1, 0, -1, -1, -1, 0, 1, 1, 1, 0, -1, -1, -1];\nconst vx = [0, -1, -1, -1, 0, 1, 1, 1, 0, 1, 1, 1, 0, -1, -1, -1];\nconst vy = [1, 1, 0, -1, -1, -1, 0, 1, -1, -1, 0, 1, 1, 1, 0, -1];\n\n/**\n * [Cayley Table]{@link https://en.wikipedia.org/wiki/Cayley_table}\n * for the composition of each rotation in the dihederal group D8.\n *\n * @type number[][]\n * @private\n */\nconst rotationCayley = [];\n\n/**\n * Matrices for each `GD8Symmetry` rotation.\n *\n * @type Matrix[]\n * @private\n */\nconst rotationMatrices = [];\n\n/*\n * Alias for {@code Math.sign}.\n */\nconst signum = Math.sign;\n\n/*\n * Initializes `rotationCayley` and `rotationMatrices`. It is called\n * only once below.\n */\nfunction init()\n{\n    for (let i = 0; i < 16; i++)\n    {\n        const row = [];\n\n        rotationCayley.push(row);\n\n        for (let j = 0; j < 16; j++)\n        {\n            /* Multiplies rotation matrices i and j. */\n            const _ux = signum((ux[i] * ux[j]) + (vx[i] * uy[j]));\n            const _uy = signum((uy[i] * ux[j]) + (vy[i] * uy[j]));\n            const _vx = signum((ux[i] * vx[j]) + (vx[i] * vy[j]));\n            const _vy = signum((uy[i] * vx[j]) + (vy[i] * vy[j]));\n\n            /* Finds rotation matrix matching the product and pushes it. */\n            for (let k = 0; k < 16; k++)\n            {\n                if (ux[k] === _ux && uy[k] === _uy\n                      && vx[k] === _vx && vy[k] === _vy)\n                {\n                    row.push(k);\n                    break;\n                }\n            }\n        }\n    }\n\n    for (let i = 0; i < 16; i++)\n    {\n        const mat = new Matrix();\n\n        mat.set(ux[i], uy[i], vx[i], vy[i], 0, 0);\n        rotationMatrices.push(mat);\n    }\n}\n\ninit();\n\n/**\n * @memberof PIXI\n * @typedef {number} GD8Symmetry\n * @see PIXI.GroupD8\n */\n\n/**\n * Implements the dihedral group D8, which is similar to\n * [group D4]{@link http://mathworld.wolfram.com/DihedralGroupD4.html};\n * D8 is the same but with diagonals, and it is used for texture\n * rotations.\n *\n * The directions the U- and V- axes after rotation\n * of an angle of `a: GD8Constant` are the vectors `(uX(a), uY(a))`\n * and `(vX(a), vY(a))`. These aren't necessarily unit vectors.\n *\n * **Origin:**<br>\n *  This is the small part of gameofbombs.com portal system. It works.\n *\n * @see PIXI.GroupD8.E\n * @see PIXI.GroupD8.SE\n * @see PIXI.GroupD8.S\n * @see PIXI.GroupD8.SW\n * @see PIXI.GroupD8.W\n * @see PIXI.GroupD8.NW\n * @see PIXI.GroupD8.N\n * @see PIXI.GroupD8.NE\n * @author Ivan @ivanpopelyshev\n * @class\n * @memberof PIXI\n */\nconst GroupD8 = {\n    /**\n     * | Rotation | Direction |\n     * |----------|-----------|\n     * | 0°       | East      |\n     *\n     * @constant {PIXI.GD8Symmetry}\n     */\n    E: 0,\n\n    /**\n     * | Rotation | Direction |\n     * |----------|-----------|\n     * | 45°↻     | Southeast |\n     *\n     * @constant {PIXI.GD8Symmetry}\n     */\n    SE: 1,\n\n    /**\n     * | Rotation | Direction |\n     * |----------|-----------|\n     * | 90°↻     | South     |\n     *\n     * @constant {PIXI.GD8Symmetry}\n     */\n    S: 2,\n\n    /**\n     * | Rotation | Direction |\n     * |----------|-----------|\n     * | 135°↻    | Southwest |\n     *\n     * @constant {PIXI.GD8Symmetry}\n     */\n    SW: 3,\n\n    /**\n     * | Rotation | Direction |\n     * |----------|-----------|\n     * | 180°     | West      |\n     *\n     * @constant {PIXI.GD8Symmetry}\n     */\n    W: 4,\n\n    /**\n     * | Rotation    | Direction    |\n     * |-------------|--------------|\n     * | -135°/225°↻ | Northwest    |\n     *\n     * @constant {PIXI.GD8Symmetry}\n     */\n    NW: 5,\n\n    /**\n     * | Rotation    | Direction    |\n     * |-------------|--------------|\n     * | -90°/270°↻  | North        |\n     *\n     * @constant {PIXI.GD8Symmetry}\n     */\n    N: 6,\n\n    /**\n     * | Rotation    | Direction    |\n     * |-------------|--------------|\n     * | -45°/315°↻  | Northeast    |\n     *\n     * @constant {PIXI.GD8Symmetry}\n     */\n    NE: 7,\n\n    /**\n     * Reflection about Y-axis.\n     *\n     * @constant {PIXI.GD8Symmetry}\n     */\n    MIRROR_VERTICAL: 8,\n\n    /**\n     * Reflection about the main diagonal.\n     *\n     * @constant {PIXI.GD8Symmetry}\n     */\n    MAIN_DIAGONAL: 10,\n\n    /**\n     * Reflection about X-axis.\n     *\n     * @constant {PIXI.GD8Symmetry}\n     */\n    MIRROR_HORIZONTAL: 12,\n\n    /**\n     * Reflection about reverse diagonal.\n     *\n     * @constant {PIXI.GD8Symmetry}\n     */\n    REVERSE_DIAGONAL: 14,\n\n    /**\n     * @memberof PIXI.GroupD8\n     * @param {PIXI.GD8Symmetry} ind - sprite rotation angle.\n     * @return {PIXI.GD8Symmetry} The X-component of the U-axis\n     *    after rotating the axes.\n     */\n    uX: (ind) => ux[ind],\n\n    /**\n     * @memberof PIXI.GroupD8\n     * @param {PIXI.GD8Symmetry} ind - sprite rotation angle.\n     * @return {PIXI.GD8Symmetry} The Y-component of the U-axis\n     *    after rotating the axes.\n     */\n    uY: (ind) => uy[ind],\n\n    /**\n     * @memberof PIXI.GroupD8\n     * @param {PIXI.GD8Symmetry} ind - sprite rotation angle.\n     * @return {PIXI.GD8Symmetry} The X-component of the V-axis\n     *    after rotating the axes.\n     */\n    vX: (ind) => vx[ind],\n\n    /**\n     * @memberof PIXI.GroupD8\n     * @param {PIXI.GD8Symmetry} ind - sprite rotation angle.\n     * @return {PIXI.GD8Symmetry} The Y-component of the V-axis\n     *    after rotating the axes.\n     */\n    vY: (ind) => vy[ind],\n\n    /**\n     * @memberof PIXI.GroupD8\n     * @param {PIXI.GD8Symmetry} rotation - symmetry whose opposite\n     *   is needed. Only rotations have opposite symmetries while\n     *   reflections don't.\n     * @return {PIXI.GD8Symmetry} The opposite symmetry of `rotation`\n     */\n    inv: (rotation) =>\n    {\n        if (rotation & 8)// true only if between 8 & 15 (reflections)\n        {\n            return rotation & 15;// or rotation % 16\n        }\n\n        return (-rotation) & 7;// or (8 - rotation) % 8\n    },\n\n    /**\n     * Composes the two D8 operations.\n     *\n     * Taking `^` as reflection:\n     *\n     * |       | E=0 | S=2 | W=4 | N=6 | E^=8 | S^=10 | W^=12 | N^=14 |\n     * |-------|-----|-----|-----|-----|------|-------|-------|-------|\n     * | E=0   | E   | S   | W   | N   | E^   | S^    | W^    | N^    |\n     * | S=2   | S   | W   | N   | E   | S^   | W^    | N^    | E^    |\n     * | W=4   | W   | N   | E   | S   | W^   | N^    | E^    | S^    |\n     * | N=6   | N   | E   | S   | W   | N^   | E^    | S^    | W^    |\n     * | E^=8  | E^  | N^  | W^  | S^  | E    | N     | W     | S     |\n     * | S^=10 | S^  | E^  | N^  | W^  | S    | E     | N     | W     |\n     * | W^=12 | W^  | S^  | E^  | N^  | W    | S     | E     | N     |\n     * | N^=14 | N^  | W^  | S^  | E^  | N    | W     | S     | E     |\n     *\n     * [This is a Cayley table]{@link https://en.wikipedia.org/wiki/Cayley_table}\n     * @memberof PIXI.GroupD8\n     * @param {PIXI.GD8Symmetry} rotationSecond - Second operation, which\n     *   is the row in the above cayley table.\n     * @param {PIXI.GD8Symmetry} rotationFirst - First operation, which\n     *   is the column in the above cayley table.\n     * @return {PIXI.GD8Symmetry} Composed operation\n     */\n    add: (rotationSecond, rotationFirst) => (\n        rotationCayley[rotationSecond][rotationFirst]\n    ),\n\n    /**\n     * Reverse of `add`.\n     *\n     * @memberof PIXI.GroupD8\n     * @param {PIXI.GD8Symmetry} rotationSecond - Second operation\n     * @param {PIXI.GD8Symmetry} rotationFirst - First operation\n     * @return {PIXI.GD8Symmetry} Result\n     */\n    sub: (rotationSecond, rotationFirst) => (\n        rotationCayley[rotationSecond][GroupD8.inv(rotationFirst)]\n    ),\n\n    /**\n     * Adds 180 degrees to rotation, which is a commutative\n     * operation.\n     *\n     * @memberof PIXI.GroupD8\n     * @param {number} rotation - The number to rotate.\n     * @returns {number} Rotated number\n     */\n    rotate180: (rotation) => rotation ^ 4,\n\n    /**\n     * Checks if the rotation angle is vertical, i.e. south\n     * or north. It doesn't work for reflections.\n     *\n     * @memberof PIXI.GroupD8\n     * @param {PIXI.GD8Symmetry} rotation - The number to check.\n     * @returns {boolean} Whether or not the direction is vertical\n     */\n    isVertical: (rotation) => (rotation & 3) === 2, // rotation % 4 === 2\n\n    /**\n     * Approximates the vector `V(dx,dy)` into one of the\n     * eight directions provided by `GroupD8`.\n     *\n     * @memberof PIXI.GroupD8\n     * @param {number} dx - X-component of the vector\n     * @param {number} dy - Y-component of the vector\n     * @return {PIXI.GD8Symmetry} Approximation of the vector into\n     *  one of the eight symmetries.\n     */\n    byDirection: (dx, dy) =>\n    {\n        if (Math.abs(dx) * 2 <= Math.abs(dy))\n        {\n            if (dy >= 0)\n            {\n                return GroupD8.S;\n            }\n\n            return GroupD8.N;\n        }\n        else if (Math.abs(dy) * 2 <= Math.abs(dx))\n        {\n            if (dx > 0)\n            {\n                return GroupD8.E;\n            }\n\n            return GroupD8.W;\n        }\n        else if (dy > 0)\n        {\n            if (dx > 0)\n            {\n                return GroupD8.SE;\n            }\n\n            return GroupD8.SW;\n        }\n        else if (dx > 0)\n        {\n            return GroupD8.NE;\n        }\n\n        return GroupD8.NW;\n    },\n\n    /**\n     * Helps sprite to compensate texture packer rotation.\n     *\n     * @memberof PIXI.GroupD8\n     * @param {PIXI.Matrix} matrix - sprite world matrix\n     * @param {PIXI.GD8Symmetry} rotation - The rotation factor to use.\n     * @param {number} tx - sprite anchoring\n     * @param {number} ty - sprite anchoring\n     */\n    matrixAppendRotationInv: (matrix, rotation, tx = 0, ty = 0) =>\n    {\n        // Packer used \"rotation\", we use \"inv(rotation)\"\n        const mat = rotationMatrices[GroupD8.inv(rotation)];\n\n        mat.tx = tx;\n        mat.ty = ty;\n        matrix.append(mat);\n    },\n};\n\nexport default GroupD8;\n","import ObservablePoint from './ObservablePoint';\nimport Matrix from './Matrix';\n\n/**\n * Transform that takes care about its versions\n *\n * @class\n * @memberof PIXI\n */\nexport default class Transform\n{\n    constructor()\n    {\n        /**\n         * The world transformation matrix.\n         *\n         * @member {PIXI.Matrix}\n         */\n        this.worldTransform = new Matrix();\n\n        /**\n         * The local transformation matrix.\n         *\n         * @member {PIXI.Matrix}\n         */\n        this.localTransform = new Matrix();\n\n        /**\n         * The coordinate of the object relative to the local coordinates of the parent.\n         *\n         * @member {PIXI.ObservablePoint}\n         */\n        this.position = new ObservablePoint(this.onChange, this, 0, 0);\n\n        /**\n         * The scale factor of the object.\n         *\n         * @member {PIXI.ObservablePoint}\n         */\n        this.scale = new ObservablePoint(this.onChange, this, 1, 1);\n\n        /**\n         * The pivot point of the displayObject that it rotates around.\n         *\n         * @member {PIXI.ObservablePoint}\n         */\n        this.pivot = new ObservablePoint(this.onChange, this, 0, 0);\n\n        /**\n         * The skew amount, on the x and y axis.\n         *\n         * @member {PIXI.ObservablePoint}\n         */\n        this.skew = new ObservablePoint(this.updateSkew, this, 0, 0);\n\n        /**\n         * The rotation amount.\n         *\n         * @protected\n         * @member {number}\n         */\n        this._rotation = 0;\n\n        /**\n         * The X-coordinate value of the normalized local X axis,\n         * the first column of the local transformation matrix without a scale.\n         *\n         * @protected\n         * @member {number}\n         */\n        this._cx = 1;\n\n        /**\n         * The Y-coordinate value of the normalized local X axis,\n         * the first column of the local transformation matrix without a scale.\n         *\n         * @protected\n         * @member {number}\n         */\n        this._sx = 0;\n\n        /**\n         * The X-coordinate value of the normalized local Y axis,\n         * the second column of the local transformation matrix without a scale.\n         *\n         * @protected\n         * @member {number}\n         */\n        this._cy = 0;\n\n        /**\n         * The Y-coordinate value of the normalized local Y axis,\n         * the second column of the local transformation matrix without a scale.\n         *\n         * @protected\n         * @member {number}\n         */\n        this._sy = 1;\n\n        /**\n         * The locally unique ID of the local transform.\n         *\n         * @protected\n         * @member {number}\n         */\n        this._localID = 0;\n\n        /**\n         * The locally unique ID of the local transform\n         * used to calculate the current local transformation matrix.\n         *\n         * @protected\n         * @member {number}\n         */\n        this._currentLocalID = 0;\n\n        /**\n         * The locally unique ID of the world transform.\n         *\n         * @protected\n         * @member {number}\n         */\n        this._worldID = 0;\n\n        /**\n         * The locally unique ID of the parent's world transform\n         * used to calculate the current world transformation matrix.\n         *\n         * @protected\n         * @member {number}\n         */\n        this._parentID = 0;\n    }\n\n    /**\n     * Called when a value changes.\n     *\n     * @protected\n     */\n    onChange()\n    {\n        this._localID++;\n    }\n\n    /**\n     * Called when the skew or the rotation changes.\n     *\n     * @protected\n     */\n    updateSkew()\n    {\n        this._cx = Math.cos(this._rotation + this.skew._y);\n        this._sx = Math.sin(this._rotation + this.skew._y);\n        this._cy = -Math.sin(this._rotation - this.skew._x); // cos, added PI/2\n        this._sy = Math.cos(this._rotation - this.skew._x); // sin, added PI/2\n\n        this._localID++;\n    }\n\n    /**\n     * Updates the local transformation matrix.\n     */\n    updateLocalTransform()\n    {\n        const lt = this.localTransform;\n\n        if (this._localID !== this._currentLocalID)\n        {\n            // get the matrix values of the displayobject based on its transform properties..\n            lt.a = this._cx * this.scale._x;\n            lt.b = this._sx * this.scale._x;\n            lt.c = this._cy * this.scale._y;\n            lt.d = this._sy * this.scale._y;\n\n            lt.tx = this.position._x - ((this.pivot._x * lt.a) + (this.pivot._y * lt.c));\n            lt.ty = this.position._y - ((this.pivot._x * lt.b) + (this.pivot._y * lt.d));\n            this._currentLocalID = this._localID;\n\n            // force an update..\n            this._parentID = -1;\n        }\n    }\n\n    /**\n     * Updates the local and the world transformation matrices.\n     *\n     * @param {PIXI.Transform} parentTransform - The parent transform\n     */\n    updateTransform(parentTransform)\n    {\n        const lt = this.localTransform;\n\n        if (this._localID !== this._currentLocalID)\n        {\n            // get the matrix values of the displayobject based on its transform properties..\n            lt.a = this._cx * this.scale._x;\n            lt.b = this._sx * this.scale._x;\n            lt.c = this._cy * this.scale._y;\n            lt.d = this._sy * this.scale._y;\n\n            lt.tx = this.position._x - ((this.pivot._x * lt.a) + (this.pivot._y * lt.c));\n            lt.ty = this.position._y - ((this.pivot._x * lt.b) + (this.pivot._y * lt.d));\n            this._currentLocalID = this._localID;\n\n            // force an update..\n            this._parentID = -1;\n        }\n\n        if (this._parentID !== parentTransform._worldID)\n        {\n            // concat the parent matrix with the objects transform.\n            const pt = parentTransform.worldTransform;\n            const wt = this.worldTransform;\n\n            wt.a = (lt.a * pt.a) + (lt.b * pt.c);\n            wt.b = (lt.a * pt.b) + (lt.b * pt.d);\n            wt.c = (lt.c * pt.a) + (lt.d * pt.c);\n            wt.d = (lt.c * pt.b) + (lt.d * pt.d);\n            wt.tx = (lt.tx * pt.a) + (lt.ty * pt.c) + pt.tx;\n            wt.ty = (lt.tx * pt.b) + (lt.ty * pt.d) + pt.ty;\n\n            this._parentID = parentTransform._worldID;\n\n            // update the id of the transform..\n            this._worldID++;\n        }\n    }\n\n    /**\n     * Decomposes a matrix and sets the transforms properties based on it.\n     *\n     * @param {PIXI.Matrix} matrix - The matrix to decompose\n     */\n    setFromMatrix(matrix)\n    {\n        matrix.decompose(this);\n        this._localID++;\n    }\n\n    /**\n     * The rotation of the object in radians.\n     *\n     * @member {number}\n     */\n    get rotation()\n    {\n        return this._rotation;\n    }\n\n    set rotation(value) // eslint-disable-line require-jsdoc\n    {\n        if (this._rotation !== value)\n        {\n            this._rotation = value;\n            this.updateSkew();\n        }\n    }\n}\n\n/**\n * A default (identity) transform\n *\n * @static\n * @constant\n * @member {PIXI.Transform}\n */\nTransform.IDENTITY = new Transform();\n","import { SHAPES } from '../const';\n\n/**\n * Size object, contains width and height\n *\n * @memberof PIXI\n * @typedef {object} ISize\n * @property {number} width - Width component\n * @property {number} height - Height component\n */\n\n/**\n * Rectangle object is an area defined by its position, as indicated by its top-left corner\n * point (x, y) and by its width and its height.\n *\n * @class\n * @memberof PIXI\n */\nexport default class Rectangle\n{\n    /**\n     * @param {number} [x=0] - The X coordinate of the upper-left corner of the rectangle\n     * @param {number} [y=0] - The Y coordinate of the upper-left corner of the rectangle\n     * @param {number} [width=0] - The overall width of this rectangle\n     * @param {number} [height=0] - The overall height of this rectangle\n     */\n    constructor(x = 0, y = 0, width = 0, height = 0)\n    {\n        /**\n         * @member {number}\n         * @default 0\n         */\n        this.x = Number(x);\n\n        /**\n         * @member {number}\n         * @default 0\n         */\n        this.y = Number(y);\n\n        /**\n         * @member {number}\n         * @default 0\n         */\n        this.width = Number(width);\n\n        /**\n         * @member {number}\n         * @default 0\n         */\n        this.height = Number(height);\n\n        /**\n         * The type of the object, mainly used to avoid `instanceof` checks\n         *\n         * @member {number}\n         * @readOnly\n         * @default PIXI.SHAPES.RECT\n         * @see PIXI.SHAPES\n         */\n        this.type = SHAPES.RECT;\n    }\n\n    /**\n     * returns the left edge of the rectangle\n     *\n     * @member {number}\n     */\n    get left()\n    {\n        return this.x;\n    }\n\n    /**\n     * returns the right edge of the rectangle\n     *\n     * @member {number}\n     */\n    get right()\n    {\n        return this.x + this.width;\n    }\n\n    /**\n     * returns the top edge of the rectangle\n     *\n     * @member {number}\n     */\n    get top()\n    {\n        return this.y;\n    }\n\n    /**\n     * returns the bottom edge of the rectangle\n     *\n     * @member {number}\n     */\n    get bottom()\n    {\n        return this.y + this.height;\n    }\n\n    /**\n     * A constant empty rectangle.\n     *\n     * @static\n     * @constant\n     * @member {PIXI.Rectangle}\n     */\n    static get EMPTY()\n    {\n        return new Rectangle(0, 0, 0, 0);\n    }\n\n    /**\n     * Creates a clone of this Rectangle\n     *\n     * @return {PIXI.Rectangle} a copy of the rectangle\n     */\n    clone()\n    {\n        return new Rectangle(this.x, this.y, this.width, this.height);\n    }\n\n    /**\n     * Copies another rectangle to this one.\n     *\n     * @param {PIXI.Rectangle} rectangle - The rectangle to copy from.\n     * @return {PIXI.Rectangle} Returns itself.\n     */\n    copyFrom(rectangle)\n    {\n        this.x = rectangle.x;\n        this.y = rectangle.y;\n        this.width = rectangle.width;\n        this.height = rectangle.height;\n\n        return this;\n    }\n\n    /**\n     * Copies this rectangle to another one.\n     *\n     * @param {PIXI.Rectangle} rectangle - The rectangle to copy to.\n     * @return {PIXI.Rectangle} Returns given parameter.\n     */\n    copyTo(rectangle)\n    {\n        rectangle.x = this.x;\n        rectangle.y = this.y;\n        rectangle.width = this.width;\n        rectangle.height = this.height;\n\n        return rectangle;\n    }\n\n    /**\n     * Checks whether the x and y coordinates given are contained within this Rectangle\n     *\n     * @param {number} x - The X coordinate of the point to test\n     * @param {number} y - The Y coordinate of the point to test\n     * @return {boolean} Whether the x/y coordinates are within this Rectangle\n     */\n    contains(x, y)\n    {\n        if (this.width <= 0 || this.height <= 0)\n        {\n            return false;\n        }\n\n        if (x >= this.x && x < this.x + this.width)\n        {\n            if (y >= this.y && y < this.y + this.height)\n            {\n                return true;\n            }\n        }\n\n        return false;\n    }\n\n    /**\n     * Pads the rectangle making it grow in all directions.\n     *\n     * @param {number} paddingX - The horizontal padding amount.\n     * @param {number} paddingY - The vertical padding amount.\n     */\n    pad(paddingX, paddingY)\n    {\n        paddingX = paddingX || 0;\n        paddingY = paddingY || ((paddingY !== 0) ? paddingX : 0);\n\n        this.x -= paddingX;\n        this.y -= paddingY;\n\n        this.width += paddingX * 2;\n        this.height += paddingY * 2;\n    }\n\n    /**\n     * Fits this rectangle around the passed one.\n     *\n     * @param {PIXI.Rectangle} rectangle - The rectangle to fit.\n     */\n    fit(rectangle)\n    {\n        const x1 = Math.max(this.x, rectangle.x);\n        const x2 = Math.min(this.x + this.width, rectangle.x + rectangle.width);\n        const y1 = Math.max(this.y, rectangle.y);\n        const y2 = Math.min(this.y + this.height, rectangle.y + rectangle.height);\n\n        this.x = x1;\n        this.width = Math.max(x2 - x1, 0);\n        this.y = y1;\n        this.height = Math.max(y2 - y1, 0);\n    }\n\n    /**\n     * Enlarges rectangle that way its corners lie on grid\n     *\n     * @param {number} [resolution=1] resolution\n     * @param {number} [eps=0.001] precision\n     */\n    ceil(resolution = 1, eps = 0.001)\n    {\n        const x2 = Math.ceil((this.x + this.width - eps) * resolution) / resolution;\n        const y2 = Math.ceil((this.y + this.height - eps) * resolution) / resolution;\n\n        this.x = Math.floor((this.x + eps) * resolution) / resolution;\n        this.y = Math.floor((this.y + eps) * resolution) / resolution;\n\n        this.width = x2 - this.x;\n        this.height = y2 - this.y;\n    }\n\n    /**\n     * Enlarges this rectangle to include the passed rectangle.\n     *\n     * @param {PIXI.Rectangle} rectangle - The rectangle to include.\n     */\n    enlarge(rectangle)\n    {\n        const x1 = Math.min(this.x, rectangle.x);\n        const x2 = Math.max(this.x + this.width, rectangle.x + rectangle.width);\n        const y1 = Math.min(this.y, rectangle.y);\n        const y2 = Math.max(this.y + this.height, rectangle.y + rectangle.height);\n\n        this.x = x1;\n        this.width = x2 - x1;\n        this.y = y1;\n        this.height = y2 - y1;\n    }\n}\n","import Rectangle from './Rectangle';\nimport { SHAPES } from '../const';\n\n/**\n * The Circle object is used to help draw graphics and can also be used to specify a hit area for displayObjects.\n *\n * @class\n * @memberof PIXI\n */\nexport default class Circle\n{\n    /**\n     * @param {number} [x=0] - The X coordinate of the center of this circle\n     * @param {number} [y=0] - The Y coordinate of the center of this circle\n     * @param {number} [radius=0] - The radius of the circle\n     */\n    constructor(x = 0, y = 0, radius = 0)\n    {\n        /**\n         * @member {number}\n         * @default 0\n         */\n        this.x = x;\n\n        /**\n         * @member {number}\n         * @default 0\n         */\n        this.y = y;\n\n        /**\n         * @member {number}\n         * @default 0\n         */\n        this.radius = radius;\n\n        /**\n         * The type of the object, mainly used to avoid `instanceof` checks\n         *\n         * @member {number}\n         * @readOnly\n         * @default PIXI.SHAPES.CIRC\n         * @see PIXI.SHAPES\n         */\n        this.type = SHAPES.CIRC;\n    }\n\n    /**\n     * Creates a clone of this Circle instance\n     *\n     * @return {PIXI.Circle} a copy of the Circle\n     */\n    clone()\n    {\n        return new Circle(this.x, this.y, this.radius);\n    }\n\n    /**\n     * Checks whether the x and y coordinates given are contained within this circle\n     *\n     * @param {number} x - The X coordinate of the point to test\n     * @param {number} y - The Y coordinate of the point to test\n     * @return {boolean} Whether the x/y coordinates are within this Circle\n     */\n    contains(x, y)\n    {\n        if (this.radius <= 0)\n        {\n            return false;\n        }\n\n        const r2 = this.radius * this.radius;\n        let dx = (this.x - x);\n        let dy = (this.y - y);\n\n        dx *= dx;\n        dy *= dy;\n\n        return (dx + dy <= r2);\n    }\n\n    /**\n    * Returns the framing rectangle of the circle as a Rectangle object\n    *\n    * @return {PIXI.Rectangle} the framing rectangle\n    */\n    getBounds()\n    {\n        return new Rectangle(this.x - this.radius, this.y - this.radius, this.radius * 2, this.radius * 2);\n    }\n}\n","import Rectangle from './Rectangle';\nimport { SHAPES } from '../const';\n\n/**\n * The Ellipse object is used to help draw graphics and can also be used to specify a hit area for displayObjects.\n *\n * @class\n * @memberof PIXI\n */\nexport default class Ellipse\n{\n    /**\n     * @param {number} [x=0] - The X coordinate of the center of this ellipse\n     * @param {number} [y=0] - The Y coordinate of the center of this ellipse\n     * @param {number} [halfWidth=0] - The half width of this ellipse\n     * @param {number} [halfHeight=0] - The half height of this ellipse\n     */\n    constructor(x = 0, y = 0, halfWidth = 0, halfHeight = 0)\n    {\n        /**\n         * @member {number}\n         * @default 0\n         */\n        this.x = x;\n\n        /**\n         * @member {number}\n         * @default 0\n         */\n        this.y = y;\n\n        /**\n         * @member {number}\n         * @default 0\n         */\n        this.width = halfWidth;\n\n        /**\n         * @member {number}\n         * @default 0\n         */\n        this.height = halfHeight;\n\n        /**\n         * The type of the object, mainly used to avoid `instanceof` checks\n         *\n         * @member {number}\n         * @readOnly\n         * @default PIXI.SHAPES.ELIP\n         * @see PIXI.SHAPES\n         */\n        this.type = SHAPES.ELIP;\n    }\n\n    /**\n     * Creates a clone of this Ellipse instance\n     *\n     * @return {PIXI.Ellipse} a copy of the ellipse\n     */\n    clone()\n    {\n        return new Ellipse(this.x, this.y, this.width, this.height);\n    }\n\n    /**\n     * Checks whether the x and y coordinates given are contained within this ellipse\n     *\n     * @param {number} x - The X coordinate of the point to test\n     * @param {number} y - The Y coordinate of the point to test\n     * @return {boolean} Whether the x/y coords are within this ellipse\n     */\n    contains(x, y)\n    {\n        if (this.width <= 0 || this.height <= 0)\n        {\n            return false;\n        }\n\n        // normalize the coords to an ellipse with center 0,0\n        let normx = ((x - this.x) / this.width);\n        let normy = ((y - this.y) / this.height);\n\n        normx *= normx;\n        normy *= normy;\n\n        return (normx + normy <= 1);\n    }\n\n    /**\n     * Returns the framing rectangle of the ellipse as a Rectangle object\n     *\n     * @return {PIXI.Rectangle} the framing rectangle\n     */\n    getBounds()\n    {\n        return new Rectangle(this.x - this.width, this.y - this.height, this.width, this.height);\n    }\n}\n","import Point from '../Point';\nimport { SHAPES } from '../const';\n\n/**\n * A class to define a shape via user defined co-orinates.\n *\n * @class\n * @memberof PIXI\n */\nexport default class Polygon\n{\n    /**\n     * @param {PIXI.Point[]|number[]} points - This can be an array of Points\n     *  that form the polygon, a flat array of numbers that will be interpreted as [x,y, x,y, ...], or\n     *  the arguments passed can be all the points of the polygon e.g.\n     *  `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the arguments passed can be flat\n     *  x,y values e.g. `new Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are Numbers.\n     */\n    constructor(...points)\n    {\n        if (Array.isArray(points[0]))\n        {\n            points = points[0];\n        }\n\n        // if this is an array of points, convert it to a flat array of numbers\n        if (points[0] instanceof Point)\n        {\n            const p = [];\n\n            for (let i = 0, il = points.length; i < il; i++)\n            {\n                p.push(points[i].x, points[i].y);\n            }\n\n            points = p;\n        }\n\n        /**\n         * An array of the points of this polygon\n         *\n         * @member {number[]}\n         */\n        this.points = points;\n\n        /**\n         * The type of the object, mainly used to avoid `instanceof` checks\n         *\n         * @member {number}\n         * @readOnly\n         * @default PIXI.SHAPES.POLY\n         * @see PIXI.SHAPES\n         */\n        this.type = SHAPES.POLY;\n\n        /**\n         * `false` after moveTo, `true` after `closePath`. In all other cases it is `true`.\n         * @member {boolean}\n         * @default true\n         */\n        this.closeStroke = true;\n    }\n\n    /**\n     * Creates a clone of this polygon\n     *\n     * @return {PIXI.Polygon} a copy of the polygon\n     */\n    clone()\n    {\n        const polygon = new Polygon(this.points.slice());\n\n        polygon.closeStroke = this.closeStroke;\n\n        return polygon;\n    }\n\n    /**\n     * Checks whether the x and y coordinates passed to this function are contained within this polygon\n     *\n     * @param {number} x - The X coordinate of the point to test\n     * @param {number} y - The Y coordinate of the point to test\n     * @return {boolean} Whether the x/y coordinates are within this polygon\n     */\n    contains(x, y)\n    {\n        let inside = false;\n\n        // use some raycasting to test hits\n        // https://github.com/substack/point-in-polygon/blob/master/index.js\n        const length = this.points.length / 2;\n\n        for (let i = 0, j = length - 1; i < length; j = i++)\n        {\n            const xi = this.points[i * 2];\n            const yi = this.points[(i * 2) + 1];\n            const xj = this.points[j * 2];\n            const yj = this.points[(j * 2) + 1];\n            const intersect = ((yi > y) !== (yj > y)) && (x < ((xj - xi) * ((y - yi) / (yj - yi))) + xi);\n\n            if (intersect)\n            {\n                inside = !inside;\n            }\n        }\n\n        return inside;\n    }\n}\n","import { SHAPES } from '../const';\n\n/**\n * The Rounded Rectangle object is an area that has nice rounded corners, as indicated by its\n * top-left corner point (x, y) and by its width and its height and its radius.\n *\n * @class\n * @memberof PIXI\n */\nexport default class RoundedRectangle\n{\n    /**\n     * @param {number} [x=0] - The X coordinate of the upper-left corner of the rounded rectangle\n     * @param {number} [y=0] - The Y coordinate of the upper-left corner of the rounded rectangle\n     * @param {number} [width=0] - The overall width of this rounded rectangle\n     * @param {number} [height=0] - The overall height of this rounded rectangle\n     * @param {number} [radius=20] - Controls the radius of the rounded corners\n     */\n    constructor(x = 0, y = 0, width = 0, height = 0, radius = 20)\n    {\n        /**\n         * @member {number}\n         * @default 0\n         */\n        this.x = x;\n\n        /**\n         * @member {number}\n         * @default 0\n         */\n        this.y = y;\n\n        /**\n         * @member {number}\n         * @default 0\n         */\n        this.width = width;\n\n        /**\n         * @member {number}\n         * @default 0\n         */\n        this.height = height;\n\n        /**\n         * @member {number}\n         * @default 20\n         */\n        this.radius = radius;\n\n        /**\n         * The type of the object, mainly used to avoid `instanceof` checks\n         *\n         * @member {number}\n         * @readonly\n         * @default PIXI.SHAPES.RREC\n         * @see PIXI.SHAPES\n         */\n        this.type = SHAPES.RREC;\n    }\n\n    /**\n     * Creates a clone of this Rounded Rectangle\n     *\n     * @return {PIXI.RoundedRectangle} a copy of the rounded rectangle\n     */\n    clone()\n    {\n        return new RoundedRectangle(this.x, this.y, this.width, this.height, this.radius);\n    }\n\n    /**\n     * Checks whether the x and y coordinates given are contained within this Rounded Rectangle\n     *\n     * @param {number} x - The X coordinate of the point to test\n     * @param {number} y - The Y coordinate of the point to test\n     * @return {boolean} Whether the x/y coordinates are within this Rounded Rectangle\n     */\n    contains(x, y)\n    {\n        if (this.width <= 0 || this.height <= 0)\n        {\n            return false;\n        }\n        if (x >= this.x && x <= this.x + this.width)\n        {\n            if (y >= this.y && y <= this.y + this.height)\n            {\n                if ((y >= this.y + this.radius && y <= this.y + this.height - this.radius)\n                || (x >= this.x + this.radius && x <= this.x + this.width - this.radius))\n                {\n                    return true;\n                }\n                let dx = x - (this.x + this.radius);\n                let dy = y - (this.y + this.radius);\n                const radius2 = this.radius * this.radius;\n\n                if ((dx * dx) + (dy * dy) <= radius2)\n                {\n                    return true;\n                }\n                dx = x - (this.x + this.width - this.radius);\n                if ((dx * dx) + (dy * dy) <= radius2)\n                {\n                    return true;\n                }\n                dy = y - (this.y + this.height - this.radius);\n                if ((dx * dx) + (dy * dy) <= radius2)\n                {\n                    return true;\n                }\n                dx = x - (this.x + this.radius);\n                if ((dx * dx) + (dy * dy) <= radius2)\n                {\n                    return true;\n                }\n            }\n        }\n\n        return false;\n    }\n}\n","import { settings } from '@pixi/settings';\n\n/**\n * Sets the default value for the container property 'sortableChildren'.\n * If set to true, the container will sort its children by zIndex value\n * when updateTransform() is called, or manually if sortChildren() is called.\n *\n * This actually changes the order of elements in the array, so should be treated\n * as a basic solution that is not performant compared to other solutions,\n * such as @link https://github.com/pixijs/pixi-display\n *\n * Also be aware of that this may not work nicely with the addChildAt() function,\n * as the zIndex sorting may cause the child to automatically sorted to another position.\n *\n * @static\n * @constant\n * @name SORTABLE_CHILDREN\n * @memberof PIXI.settings\n * @type {boolean}\n * @default false\n */\nsettings.SORTABLE_CHILDREN = false;\n\nexport { settings };\n","import { Rectangle } from '@pixi/math';\n\n/**\n * 'Builder' pattern for bounds rectangles.\n *\n * This could be called an Axis-Aligned Bounding Box.\n * It is not an actual shape. It is a mutable thing; no 'EMPTY' or those kind of problems.\n *\n * @class\n * @memberof PIXI\n */\nexport default class Bounds\n{\n    constructor()\n    {\n        /**\n         * @member {number}\n         * @default 0\n         */\n        this.minX = Infinity;\n\n        /**\n         * @member {number}\n         * @default 0\n         */\n        this.minY = Infinity;\n\n        /**\n         * @member {number}\n         * @default 0\n         */\n        this.maxX = -Infinity;\n\n        /**\n         * @member {number}\n         * @default 0\n         */\n        this.maxY = -Infinity;\n\n        this.rect = null;\n    }\n\n    /**\n     * Checks if bounds are empty.\n     *\n     * @return {boolean} True if empty.\n     */\n    isEmpty()\n    {\n        return this.minX > this.maxX || this.minY > this.maxY;\n    }\n\n    /**\n     * Clears the bounds and resets.\n     *\n     */\n    clear()\n    {\n        this.updateID++;\n\n        this.minX = Infinity;\n        this.minY = Infinity;\n        this.maxX = -Infinity;\n        this.maxY = -Infinity;\n    }\n\n    /**\n     * Can return Rectangle.EMPTY constant, either construct new rectangle, either use your rectangle\n     * It is not guaranteed that it will return tempRect\n     *\n     * @param {PIXI.Rectangle} rect - temporary object will be used if AABB is not empty\n     * @returns {PIXI.Rectangle} A rectangle of the bounds\n     */\n    getRectangle(rect)\n    {\n        if (this.minX > this.maxX || this.minY > this.maxY)\n        {\n            return Rectangle.EMPTY;\n        }\n\n        rect = rect || new Rectangle(0, 0, 1, 1);\n\n        rect.x = this.minX;\n        rect.y = this.minY;\n        rect.width = this.maxX - this.minX;\n        rect.height = this.maxY - this.minY;\n\n        return rect;\n    }\n\n    /**\n     * This function should be inlined when its possible.\n     *\n     * @param {PIXI.Point} point - The point to add.\n     */\n    addPoint(point)\n    {\n        this.minX = Math.min(this.minX, point.x);\n        this.maxX = Math.max(this.maxX, point.x);\n        this.minY = Math.min(this.minY, point.y);\n        this.maxY = Math.max(this.maxY, point.y);\n    }\n\n    /**\n     * Adds a quad, not transformed\n     *\n     * @param {Float32Array} vertices - The verts to add.\n     */\n    addQuad(vertices)\n    {\n        let minX = this.minX;\n        let minY = this.minY;\n        let maxX = this.maxX;\n        let maxY = this.maxY;\n\n        let x = vertices[0];\n        let y = vertices[1];\n\n        minX = x < minX ? x : minX;\n        minY = y < minY ? y : minY;\n        maxX = x > maxX ? x : maxX;\n        maxY = y > maxY ? y : maxY;\n\n        x = vertices[2];\n        y = vertices[3];\n        minX = x < minX ? x : minX;\n        minY = y < minY ? y : minY;\n        maxX = x > maxX ? x : maxX;\n        maxY = y > maxY ? y : maxY;\n\n        x = vertices[4];\n        y = vertices[5];\n        minX = x < minX ? x : minX;\n        minY = y < minY ? y : minY;\n        maxX = x > maxX ? x : maxX;\n        maxY = y > maxY ? y : maxY;\n\n        x = vertices[6];\n        y = vertices[7];\n        minX = x < minX ? x : minX;\n        minY = y < minY ? y : minY;\n        maxX = x > maxX ? x : maxX;\n        maxY = y > maxY ? y : maxY;\n\n        this.minX = minX;\n        this.minY = minY;\n        this.maxX = maxX;\n        this.maxY = maxY;\n    }\n\n    /**\n     * Adds sprite frame, transformed.\n     *\n     * @param {PIXI.Transform} transform - TODO\n     * @param {number} x0 - TODO\n     * @param {number} y0 - TODO\n     * @param {number} x1 - TODO\n     * @param {number} y1 - TODO\n     */\n    addFrame(transform, x0, y0, x1, y1)\n    {\n        const matrix = transform.worldTransform;\n        const a = matrix.a;\n        const b = matrix.b;\n        const c = matrix.c;\n        const d = matrix.d;\n        const tx = matrix.tx;\n        const ty = matrix.ty;\n\n        let minX = this.minX;\n        let minY = this.minY;\n        let maxX = this.maxX;\n        let maxY = this.maxY;\n\n        let x = (a * x0) + (c * y0) + tx;\n        let y = (b * x0) + (d * y0) + ty;\n\n        minX = x < minX ? x : minX;\n        minY = y < minY ? y : minY;\n        maxX = x > maxX ? x : maxX;\n        maxY = y > maxY ? y : maxY;\n\n        x = (a * x1) + (c * y0) + tx;\n        y = (b * x1) + (d * y0) + ty;\n        minX = x < minX ? x : minX;\n        minY = y < minY ? y : minY;\n        maxX = x > maxX ? x : maxX;\n        maxY = y > maxY ? y : maxY;\n\n        x = (a * x0) + (c * y1) + tx;\n        y = (b * x0) + (d * y1) + ty;\n        minX = x < minX ? x : minX;\n        minY = y < minY ? y : minY;\n        maxX = x > maxX ? x : maxX;\n        maxY = y > maxY ? y : maxY;\n\n        x = (a * x1) + (c * y1) + tx;\n        y = (b * x1) + (d * y1) + ty;\n        minX = x < minX ? x : minX;\n        minY = y < minY ? y : minY;\n        maxX = x > maxX ? x : maxX;\n        maxY = y > maxY ? y : maxY;\n\n        this.minX = minX;\n        this.minY = minY;\n        this.maxX = maxX;\n        this.maxY = maxY;\n    }\n\n    /**\n     * Adds screen vertices from array\n     *\n     * @param {Float32Array} vertexData - calculated vertices\n     * @param {number} beginOffset - begin offset\n     * @param {number} endOffset - end offset, excluded\n     */\n    addVertexData(vertexData, beginOffset, endOffset)\n    {\n        let minX = this.minX;\n        let minY = this.minY;\n        let maxX = this.maxX;\n        let maxY = this.maxY;\n\n        for (let i = beginOffset; i < endOffset; i += 2)\n        {\n            const x = vertexData[i];\n            const y = vertexData[i + 1];\n\n            minX = x < minX ? x : minX;\n            minY = y < minY ? y : minY;\n            maxX = x > maxX ? x : maxX;\n            maxY = y > maxY ? y : maxY;\n        }\n\n        this.minX = minX;\n        this.minY = minY;\n        this.maxX = maxX;\n        this.maxY = maxY;\n    }\n\n    /**\n     * Add an array of mesh vertices\n     *\n     * @param {PIXI.Transform} transform - mesh transform\n     * @param {Float32Array} vertices - mesh coordinates in array\n     * @param {number} beginOffset - begin offset\n     * @param {number} endOffset - end offset, excluded\n     */\n    addVertices(transform, vertices, beginOffset, endOffset)\n    {\n        const matrix = transform.worldTransform;\n        const a = matrix.a;\n        const b = matrix.b;\n        const c = matrix.c;\n        const d = matrix.d;\n        const tx = matrix.tx;\n        const ty = matrix.ty;\n\n        let minX = this.minX;\n        let minY = this.minY;\n        let maxX = this.maxX;\n        let maxY = this.maxY;\n\n        for (let i = beginOffset; i < endOffset; i += 2)\n        {\n            const rawX = vertices[i];\n            const rawY = vertices[i + 1];\n            const x = (a * rawX) + (c * rawY) + tx;\n            const y = (d * rawY) + (b * rawX) + ty;\n\n            minX = x < minX ? x : minX;\n            minY = y < minY ? y : minY;\n            maxX = x > maxX ? x : maxX;\n            maxY = y > maxY ? y : maxY;\n        }\n\n        this.minX = minX;\n        this.minY = minY;\n        this.maxX = maxX;\n        this.maxY = maxY;\n    }\n\n    /**\n     * Adds other Bounds\n     *\n     * @param {PIXI.Bounds} bounds - TODO\n     */\n    addBounds(bounds)\n    {\n        const minX = this.minX;\n        const minY = this.minY;\n        const maxX = this.maxX;\n        const maxY = this.maxY;\n\n        this.minX = bounds.minX < minX ? bounds.minX : minX;\n        this.minY = bounds.minY < minY ? bounds.minY : minY;\n        this.maxX = bounds.maxX > maxX ? bounds.maxX : maxX;\n        this.maxY = bounds.maxY > maxY ? bounds.maxY : maxY;\n    }\n\n    /**\n     * Adds other Bounds, masked with Bounds\n     *\n     * @param {PIXI.Bounds} bounds - TODO\n     * @param {PIXI.Bounds} mask - TODO\n     */\n    addBoundsMask(bounds, mask)\n    {\n        const _minX = bounds.minX > mask.minX ? bounds.minX : mask.minX;\n        const _minY = bounds.minY > mask.minY ? bounds.minY : mask.minY;\n        const _maxX = bounds.maxX < mask.maxX ? bounds.maxX : mask.maxX;\n        const _maxY = bounds.maxY < mask.maxY ? bounds.maxY : mask.maxY;\n\n        if (_minX <= _maxX && _minY <= _maxY)\n        {\n            const minX = this.minX;\n            const minY = this.minY;\n            const maxX = this.maxX;\n            const maxY = this.maxY;\n\n            this.minX = _minX < minX ? _minX : minX;\n            this.minY = _minY < minY ? _minY : minY;\n            this.maxX = _maxX > maxX ? _maxX : maxX;\n            this.maxY = _maxY > maxY ? _maxY : maxY;\n        }\n    }\n\n    /**\n     * Adds other Bounds, masked with Rectangle\n     *\n     * @param {PIXI.Bounds} bounds - TODO\n     * @param {PIXI.Rectangle} area - TODO\n     */\n    addBoundsArea(bounds, area)\n    {\n        const _minX = bounds.minX > area.x ? bounds.minX : area.x;\n        const _minY = bounds.minY > area.y ? bounds.minY : area.y;\n        const _maxX = bounds.maxX < area.x + area.width ? bounds.maxX : (area.x + area.width);\n        const _maxY = bounds.maxY < area.y + area.height ? bounds.maxY : (area.y + area.height);\n\n        if (_minX <= _maxX && _minY <= _maxY)\n        {\n            const minX = this.minX;\n            const minY = this.minY;\n            const maxX = this.maxX;\n            const maxY = this.maxY;\n\n            this.minX = _minX < minX ? _minX : minX;\n            this.minY = _minY < minY ? _minY : minY;\n            this.maxX = _maxX > maxX ? _maxX : maxX;\n            this.maxY = _maxY > maxY ? _maxY : maxY;\n        }\n    }\n}\n","import { EventEmitter } from '@pixi/utils';\nimport { Rectangle, Transform, RAD_TO_DEG, DEG_TO_RAD } from '@pixi/math';\nimport Bounds from './Bounds';\n// _tempDisplayObjectParent = new DisplayObject();\n\n/**\n * The base class for all objects that are rendered on the screen.\n *\n * This is an abstract class and should not be used on its own; rather it should be extended.\n *\n * @class\n * @extends PIXI.utils.EventEmitter\n * @memberof PIXI\n */\nexport default class DisplayObject extends EventEmitter\n{\n    /**\n     * Mixes all enumerable properties and methods from a source object to DisplayObject.\n     *\n     * @param {object} source The source of properties and methods to mix in.\n     */\n    static mixin(source)\n    {\n        // in ES8/ES2017, this would be really easy:\n        // Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n\n        // get all the enumerable property keys\n        const keys = Object.keys(source);\n\n        // loop through properties\n        for (let i = 0; i < keys.length; ++i)\n        {\n            const propertyName = keys[i];\n\n            // Set the property using the property descriptor - this works for accessors and normal value properties\n            Object.defineProperty(\n                DisplayObject.prototype,\n                propertyName,\n                Object.getOwnPropertyDescriptor(source, propertyName)\n            );\n        }\n    }\n\n    constructor()\n    {\n        super();\n\n        this.tempDisplayObjectParent = null;\n\n        // TODO: need to create Transform from factory\n        /**\n         * World transform and local transform of this object.\n         * This will become read-only later, please do not assign anything there unless you know what are you doing.\n         *\n         * @member {PIXI.Transform}\n         */\n        this.transform = new Transform();\n\n        /**\n         * The opacity of the object.\n         *\n         * @member {number}\n         */\n        this.alpha = 1;\n\n        /**\n         * The visibility of the object. If false the object will not be drawn, and\n         * the updateTransform function will not be called.\n         *\n         * Only affects recursive calls from parent. You can ask for bounds or call updateTransform manually.\n         *\n         * @member {boolean}\n         */\n        this.visible = true;\n\n        /**\n         * Can this object be rendered, if false the object will not be drawn but the updateTransform\n         * methods will still be called.\n         *\n         * Only affects recursive calls from parent. You can ask for bounds manually.\n         *\n         * @member {boolean}\n         */\n        this.renderable = true;\n\n        /**\n         * The display object container that contains this display object.\n         *\n         * @member {PIXI.Container}\n         * @readonly\n         */\n        this.parent = null;\n\n        /**\n         * The multiplied alpha of the displayObject.\n         *\n         * @member {number}\n         * @readonly\n         */\n        this.worldAlpha = 1;\n\n        /**\n         * Which index in the children array the display component was before the previous zIndex sort.\n         * Used by containers to help sort objects with the same zIndex, by using previous array index as the decider.\n         *\n         * @member {number}\n         * @protected\n         */\n        this._lastSortedIndex = 0;\n\n        /**\n         * The zIndex of the displayObject.\n         * A higher value will mean it will be rendered on top of other displayObjects within the same container.\n         *\n         * @member {number}\n         * @protected\n         */\n        this._zIndex = 0;\n\n        /**\n         * The area the filter is applied to. This is used as more of an optimization\n         * rather than figuring out the dimensions of the displayObject each frame you can set this rectangle.\n         *\n         * Also works as an interaction mask.\n         *\n         * @member {?PIXI.Rectangle}\n         */\n        this.filterArea = null;\n\n        /**\n         * Sets the filters for the displayObject.\n         * * IMPORTANT: This is a WebGL only feature and will be ignored by the canvas renderer.\n         * To remove filters simply set this property to `'null'`.\n         *\n         * @member {?PIXI.Filter[]}\n         */\n        this.filters = null;\n        this._enabledFilters = null;\n\n        /**\n         * The bounds object, this is used to calculate and store the bounds of the displayObject.\n         *\n         * @member {PIXI.Bounds}\n         * @protected\n         */\n        this._bounds = new Bounds();\n        this._boundsID = 0;\n        this._lastBoundsID = -1;\n        this._boundsRect = null;\n        this._localBoundsRect = null;\n\n        /**\n         * The original, cached mask of the object.\n         *\n         * @member {PIXI.Graphics|PIXI.Sprite|null}\n         * @protected\n         */\n        this._mask = null;\n\n        /**\n         * Fired when this DisplayObject is added to a Container.\n         *\n         * @event PIXI.DisplayObject#added\n         * @param {PIXI.Container} container - The container added to.\n         */\n\n        /**\n         * Fired when this DisplayObject is removed from a Container.\n         *\n         * @event PIXI.DisplayObject#removed\n         * @param {PIXI.Container} container - The container removed from.\n         */\n\n        /**\n         * If the object has been destroyed via destroy(). If true, it should not be used.\n         *\n         * @member {boolean}\n         * @protected\n         */\n        this._destroyed = false;\n\n        /**\n         * used to fast check if a sprite is.. a sprite!\n         * @member {boolean}\n         */\n        this.isSprite = false;\n    }\n\n    /**\n     * @protected\n     * @member {PIXI.DisplayObject}\n     */\n    get _tempDisplayObjectParent()\n    {\n        if (this.tempDisplayObjectParent === null)\n        {\n            this.tempDisplayObjectParent = new DisplayObject();\n        }\n\n        return this.tempDisplayObjectParent;\n    }\n\n    /**\n     * Updates the object transform for rendering.\n     *\n     * TODO - Optimization pass!\n     */\n    updateTransform()\n    {\n        this.transform.updateTransform(this.parent.transform);\n        // multiply the alphas..\n        this.worldAlpha = this.alpha * this.parent.worldAlpha;\n\n        this._bounds.updateID++;\n    }\n\n    /**\n     * Recursively updates transform of all objects from the root to this one\n     * internal function for toLocal()\n     */\n    _recursivePostUpdateTransform()\n    {\n        if (this.parent)\n        {\n            this.parent._recursivePostUpdateTransform();\n            this.transform.updateTransform(this.parent.transform);\n        }\n        else\n        {\n            this.transform.updateTransform(this._tempDisplayObjectParent.transform);\n        }\n    }\n\n    /**\n     * Retrieves the bounds of the displayObject as a rectangle object.\n     *\n     * @param {boolean} [skipUpdate] - Setting to `true` will stop the transforms of the scene graph from\n     *  being updated. This means the calculation returned MAY be out of date BUT will give you a\n     *  nice performance boost.\n     * @param {PIXI.Rectangle} [rect] - Optional rectangle to store the result of the bounds calculation.\n     * @return {PIXI.Rectangle} The rectangular bounding area.\n     */\n    getBounds(skipUpdate, rect)\n    {\n        if (!skipUpdate)\n        {\n            if (!this.parent)\n            {\n                this.parent = this._tempDisplayObjectParent;\n                this.updateTransform();\n                this.parent = null;\n            }\n            else\n            {\n                this._recursivePostUpdateTransform();\n                this.updateTransform();\n            }\n        }\n\n        if (this._boundsID !== this._lastBoundsID)\n        {\n            this.calculateBounds();\n            this._lastBoundsID = this._boundsID;\n        }\n\n        if (!rect)\n        {\n            if (!this._boundsRect)\n            {\n                this._boundsRect = new Rectangle();\n            }\n\n            rect = this._boundsRect;\n        }\n\n        return this._bounds.getRectangle(rect);\n    }\n\n    /**\n     * Retrieves the local bounds of the displayObject as a rectangle object.\n     *\n     * @param {PIXI.Rectangle} [rect] - Optional rectangle to store the result of the bounds calculation.\n     * @return {PIXI.Rectangle} The rectangular bounding area.\n     */\n    getLocalBounds(rect)\n    {\n        const transformRef = this.transform;\n        const parentRef = this.parent;\n\n        this.parent = null;\n        this.transform = this._tempDisplayObjectParent.transform;\n\n        if (!rect)\n        {\n            if (!this._localBoundsRect)\n            {\n                this._localBoundsRect = new Rectangle();\n            }\n\n            rect = this._localBoundsRect;\n        }\n\n        const bounds = this.getBounds(false, rect);\n\n        this.parent = parentRef;\n        this.transform = transformRef;\n\n        return bounds;\n    }\n\n    /**\n     * Calculates the global position of the display object.\n     *\n     * @param {PIXI.IPoint} position - The world origin to calculate from.\n     * @param {PIXI.IPoint} [point] - A Point object in which to store the value, optional\n     *  (otherwise will create a new Point).\n     * @param {boolean} [skipUpdate=false] - Should we skip the update transform.\n     * @return {PIXI.IPoint} A point object representing the position of this object.\n     */\n    toGlobal(position, point, skipUpdate = false)\n    {\n        if (!skipUpdate)\n        {\n            this._recursivePostUpdateTransform();\n\n            // this parent check is for just in case the item is a root object.\n            // If it is we need to give it a temporary parent so that displayObjectUpdateTransform works correctly\n            // this is mainly to avoid a parent check in the main loop. Every little helps for performance :)\n            if (!this.parent)\n            {\n                this.parent = this._tempDisplayObjectParent;\n                this.displayObjectUpdateTransform();\n                this.parent = null;\n            }\n            else\n            {\n                this.displayObjectUpdateTransform();\n            }\n        }\n\n        // don't need to update the lot\n        return this.worldTransform.apply(position, point);\n    }\n\n    /**\n     * Calculates the local position of the display object relative to another point.\n     *\n     * @param {PIXI.IPoint} position - The world origin to calculate from.\n     * @param {PIXI.DisplayObject} [from] - The DisplayObject to calculate the global position from.\n     * @param {PIXI.IPoint} [point] - A Point object in which to store the value, optional\n     *  (otherwise will create a new Point).\n     * @param {boolean} [skipUpdate=false] - Should we skip the update transform\n     * @return {PIXI.IPoint} A point object representing the position of this object\n     */\n    toLocal(position, from, point, skipUpdate)\n    {\n        if (from)\n        {\n            position = from.toGlobal(position, point, skipUpdate);\n        }\n\n        if (!skipUpdate)\n        {\n            this._recursivePostUpdateTransform();\n\n            // this parent check is for just in case the item is a root object.\n            // If it is we need to give it a temporary parent so that displayObjectUpdateTransform works correctly\n            // this is mainly to avoid a parent check in the main loop. Every little helps for performance :)\n            if (!this.parent)\n            {\n                this.parent = this._tempDisplayObjectParent;\n                this.displayObjectUpdateTransform();\n                this.parent = null;\n            }\n            else\n            {\n                this.displayObjectUpdateTransform();\n            }\n        }\n\n        // simply apply the matrix..\n        return this.worldTransform.applyInverse(position, point);\n    }\n\n    /**\n     * Renders the object using the WebGL renderer.\n     *\n     * @param {PIXI.Renderer} renderer - The renderer.\n     */\n    render(renderer) // eslint-disable-line no-unused-vars\n    {\n        // OVERWRITE;\n    }\n\n    /**\n     * Set the parent Container of this DisplayObject.\n     *\n     * @param {PIXI.Container} container - The Container to add this DisplayObject to.\n     * @return {PIXI.Container} The Container that this DisplayObject was added to.\n     */\n    setParent(container)\n    {\n        if (!container || !container.addChild)\n        {\n            throw new Error('setParent: Argument must be a Container');\n        }\n\n        container.addChild(this);\n\n        return container;\n    }\n\n    /**\n     * Convenience function to set the position, scale, skew and pivot at once.\n     *\n     * @param {number} [x=0] - The X position\n     * @param {number} [y=0] - The Y position\n     * @param {number} [scaleX=1] - The X scale value\n     * @param {number} [scaleY=1] - The Y scale value\n     * @param {number} [rotation=0] - The rotation\n     * @param {number} [skewX=0] - The X skew value\n     * @param {number} [skewY=0] - The Y skew value\n     * @param {number} [pivotX=0] - The X pivot value\n     * @param {number} [pivotY=0] - The Y pivot value\n     * @return {PIXI.DisplayObject} The DisplayObject instance\n     */\n    setTransform(x = 0, y = 0, scaleX = 1, scaleY = 1, rotation = 0, skewX = 0, skewY = 0, pivotX = 0, pivotY = 0)\n    {\n        this.position.x = x;\n        this.position.y = y;\n        this.scale.x = !scaleX ? 1 : scaleX;\n        this.scale.y = !scaleY ? 1 : scaleY;\n        this.rotation = rotation;\n        this.skew.x = skewX;\n        this.skew.y = skewY;\n        this.pivot.x = pivotX;\n        this.pivot.y = pivotY;\n\n        return this;\n    }\n\n    /**\n     * Base destroy method for generic display objects. This will automatically\n     * remove the display object from its parent Container as well as remove\n     * all current event listeners and internal references. Do not use a DisplayObject\n     * after calling `destroy()`.\n     *\n     */\n    destroy()\n    {\n        this.removeAllListeners();\n        if (this.parent)\n        {\n            this.parent.removeChild(this);\n        }\n        this.transform = null;\n\n        this.parent = null;\n\n        this._bounds = null;\n        this._currentBounds = null;\n        this._mask = null;\n\n        this.filterArea = null;\n\n        this.interactive = false;\n        this.interactiveChildren = false;\n\n        this._destroyed = true;\n    }\n\n    /**\n     * The position of the displayObject on the x axis relative to the local coordinates of the parent.\n     * An alias to position.x\n     *\n     * @member {number}\n     */\n    get x()\n    {\n        return this.position.x;\n    }\n\n    set x(value) // eslint-disable-line require-jsdoc\n    {\n        this.transform.position.x = value;\n    }\n\n    /**\n     * The position of the displayObject on the y axis relative to the local coordinates of the parent.\n     * An alias to position.y\n     *\n     * @member {number}\n     */\n    get y()\n    {\n        return this.position.y;\n    }\n\n    set y(value) // eslint-disable-line require-jsdoc\n    {\n        this.transform.position.y = value;\n    }\n\n    /**\n     * Current transform of the object based on world (parent) factors.\n     *\n     * @member {PIXI.Matrix}\n     * @readonly\n     */\n    get worldTransform()\n    {\n        return this.transform.worldTransform;\n    }\n\n    /**\n     * Current transform of the object based on local factors: position, scale, other stuff.\n     *\n     * @member {PIXI.Matrix}\n     * @readonly\n     */\n    get localTransform()\n    {\n        return this.transform.localTransform;\n    }\n\n    /**\n     * The coordinate of the object relative to the local coordinates of the parent.\n     * Assignment by value since pixi-v4.\n     *\n     * @member {PIXI.IPoint}\n     */\n    get position()\n    {\n        return this.transform.position;\n    }\n\n    set position(value) // eslint-disable-line require-jsdoc\n    {\n        this.transform.position.copyFrom(value);\n    }\n\n    /**\n     * The scale factor of the object.\n     * Assignment by value since pixi-v4.\n     *\n     * @member {PIXI.IPoint}\n     */\n    get scale()\n    {\n        return this.transform.scale;\n    }\n\n    set scale(value) // eslint-disable-line require-jsdoc\n    {\n        this.transform.scale.copyFrom(value);\n    }\n\n    /**\n     * The pivot point of the displayObject that it rotates around.\n     * Assignment by value since pixi-v4.\n     *\n     * @member {PIXI.IPoint}\n     */\n    get pivot()\n    {\n        return this.transform.pivot;\n    }\n\n    set pivot(value) // eslint-disable-line require-jsdoc\n    {\n        this.transform.pivot.copyFrom(value);\n    }\n\n    /**\n     * The skew factor for the object in radians.\n     * Assignment by value since pixi-v4.\n     *\n     * @member {PIXI.ObservablePoint}\n     */\n    get skew()\n    {\n        return this.transform.skew;\n    }\n\n    set skew(value) // eslint-disable-line require-jsdoc\n    {\n        this.transform.skew.copyFrom(value);\n    }\n\n    /**\n     * The rotation of the object in radians.\n     * 'rotation' and 'angle' have the same effect on a display object; rotation is in radians, angle is in degrees.\n     *\n     * @member {number}\n     */\n    get rotation()\n    {\n        return this.transform.rotation;\n    }\n\n    set rotation(value) // eslint-disable-line require-jsdoc\n    {\n        this.transform.rotation = value;\n    }\n\n    /**\n     * The angle of the object in degrees.\n     * 'rotation' and 'angle' have the same effect on a display object; rotation is in radians, angle is in degrees.\n     *\n     * @member {number}\n     */\n    get angle()\n    {\n        return this.transform.rotation * RAD_TO_DEG;\n    }\n\n    set angle(value) // eslint-disable-line require-jsdoc\n    {\n        this.transform.rotation = value * DEG_TO_RAD;\n    }\n\n    /**\n     * The zIndex of the displayObject.\n     * If a container has the sortableChildren property set to true, children will be automatically\n     * sorted by zIndex value; a higher value will mean it will be moved towards the end of the array,\n     * and thus rendered on top of other displayObjects within the same container.\n     *\n     * @member {number}\n     */\n    get zIndex()\n    {\n        return this._zIndex;\n    }\n\n    set zIndex(value) // eslint-disable-line require-jsdoc\n    {\n        this._zIndex = value;\n        if (this.parent)\n        {\n            this.parent.sortDirty = true;\n        }\n    }\n\n    /**\n     * Indicates if the object is globally visible.\n     *\n     * @member {boolean}\n     * @readonly\n     */\n    get worldVisible()\n    {\n        let item = this;\n\n        do\n        {\n            if (!item.visible)\n            {\n                return false;\n            }\n\n            item = item.parent;\n        } while (item);\n\n        return true;\n    }\n\n    /**\n     * Sets a mask for the displayObject. A mask is an object that limits the visibility of an\n     * object to the shape of the mask applied to it. In PixiJS a regular mask must be a\n     * {@link PIXI.Graphics} or a {@link PIXI.Sprite} object. This allows for much faster masking in canvas as it\n     * utilities shape clipping. To remove a mask, set this property to `null`.\n     *\n     * For sprite mask both alpha and red channel are used. Black mask is the same as transparent mask.\n     * @example\n     * const graphics = new PIXI.Graphics();\n     * graphics.beginFill(0xFF3300);\n     * graphics.drawRect(50, 250, 100, 100);\n     * graphics.endFill();\n     *\n     * const sprite = new PIXI.Sprite(texture);\n     * sprite.mask = graphics;\n     * @todo At the moment, PIXI.CanvasRenderer doesn't support PIXI.Sprite as mask.\n     *\n     * @member {PIXI.Graphics|PIXI.Sprite|null}\n     */\n    get mask()\n    {\n        return this._mask;\n    }\n\n    set mask(value) // eslint-disable-line require-jsdoc\n    {\n        if (this._mask)\n        {\n            this._mask.renderable = true;\n            this._mask.isMask = false;\n        }\n\n        this._mask = value;\n\n        if (this._mask)\n        {\n            this._mask.renderable = false;\n            this._mask.isMask = true;\n        }\n    }\n}\n\n/**\n * DisplayObject default updateTransform, does not update children of container.\n * Will crash if there's no parent element.\n *\n * @memberof PIXI.DisplayObject#\n * @function displayObjectUpdateTransform\n */\nDisplayObject.prototype.displayObjectUpdateTransform = DisplayObject.prototype.updateTransform;\n","import { settings } from '@pixi/settings';\nimport { removeItems } from '@pixi/utils';\nimport DisplayObject from './DisplayObject';\n\nfunction sortChildren(a, b)\n{\n    if (a.zIndex === b.zIndex)\n    {\n        return a._lastSortedIndex - b._lastSortedIndex;\n    }\n\n    return a.zIndex - b.zIndex;\n}\n\n/**\n * A Container represents a collection of display objects.\n *\n * It is the base class of all display objects that act as a container for other objects (like Sprites).\n *\n *```js\n * let container = new PIXI.Container();\n * container.addChild(sprite);\n * ```\n *\n * @class\n * @extends PIXI.DisplayObject\n * @memberof PIXI\n */\nexport default class Container extends DisplayObject\n{\n    constructor()\n    {\n        super();\n\n        /**\n         * The array of children of this container.\n         *\n         * @member {PIXI.DisplayObject[]}\n         * @readonly\n         */\n        this.children = [];\n\n        /**\n         * If set to true, the container will sort its children by zIndex value\n         * when updateTransform() is called, or manually if sortChildren() is called.\n         *\n         * This actually changes the order of elements in the array, so should be treated\n         * as a basic solution that is not performant compared to other solutions,\n         * such as @link https://github.com/pixijs/pixi-display\n         *\n         * Also be aware of that this may not work nicely with the addChildAt() function,\n         * as the zIndex sorting may cause the child to automatically sorted to another position.\n         *\n         * @see PIXI.settings.SORTABLE_CHILDREN\n         *\n         * @member {boolean}\n         */\n        this.sortableChildren = settings.SORTABLE_CHILDREN;\n\n        /**\n         * Should children be sorted by zIndex at the next updateTransform call.\n         * Will get automatically set to true if a new child is added, or if a child's zIndex changes.\n         *\n         * @member {boolean}\n         */\n        this.sortDirty = false;\n\n        /**\n         * Fired when a DisplayObject is added to this Container.\n         *\n         * @event PIXI.Container#childAdded\n         * @param {PIXI.DisplayObject} child - The child added to the Container.\n         * @param {PIXI.Container} container - The container that added the child.\n         * @param {number} index - The children's index of the added child.\n         */\n\n        /**\n         * Fired when a DisplayObject is removed from this Container.\n         *\n         * @event PIXI.DisplayObject#removedFrom\n         * @param {PIXI.DisplayObject} child - The child removed from the Container.\n         * @param {PIXI.Container} container - The container that removed removed the child.\n         * @param {number} index - The former children's index of the removed child\n         */\n    }\n\n    /**\n     * Overridable method that can be used by Container subclasses whenever the children array is modified\n     *\n     * @protected\n     */\n    onChildrenChange()\n    {\n        /* empty */\n    }\n\n    /**\n     * Adds one or more children to the container.\n     *\n     * Multiple items can be added like so: `myContainer.addChild(thingOne, thingTwo, thingThree)`\n     *\n     * @param {...PIXI.DisplayObject} child - The DisplayObject(s) to add to the container\n     * @return {PIXI.DisplayObject} The first child that was added.\n     */\n    addChild(child)\n    {\n        const argumentsLength = arguments.length;\n\n        // if there is only one argument we can bypass looping through the them\n        if (argumentsLength > 1)\n        {\n            // loop through the arguments property and add all children\n            // use it the right way (.length and [i]) so that this function can still be optimized by JS runtimes\n            for (let i = 0; i < argumentsLength; i++)\n            {\n                this.addChild(arguments[i]);\n            }\n        }\n        else\n        {\n            // if the child has a parent then lets remove it as PixiJS objects can only exist in one place\n            if (child.parent)\n            {\n                child.parent.removeChild(child);\n            }\n\n            child.parent = this;\n            this.sortDirty = true;\n\n            // ensure child transform will be recalculated\n            child.transform._parentID = -1;\n\n            this.children.push(child);\n\n            // ensure bounds will be recalculated\n            this._boundsID++;\n\n            // TODO - lets either do all callbacks or all events.. not both!\n            this.onChildrenChange(this.children.length - 1);\n            this.emit('childAdded', child, this, this.children.length - 1);\n            child.emit('added', this);\n        }\n\n        return child;\n    }\n\n    /**\n     * Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown\n     *\n     * @param {PIXI.DisplayObject} child - The child to add\n     * @param {number} index - The index to place the child in\n     * @return {PIXI.DisplayObject} The child that was added.\n     */\n    addChildAt(child, index)\n    {\n        if (index < 0 || index > this.children.length)\n        {\n            throw new Error(`${child}addChildAt: The index ${index} supplied is out of bounds ${this.children.length}`);\n        }\n\n        if (child.parent)\n        {\n            child.parent.removeChild(child);\n        }\n\n        child.parent = this;\n        this.sortDirty = true;\n\n        // ensure child transform will be recalculated\n        child.transform._parentID = -1;\n\n        this.children.splice(index, 0, child);\n\n        // ensure bounds will be recalculated\n        this._boundsID++;\n\n        // TODO - lets either do all callbacks or all events.. not both!\n        this.onChildrenChange(index);\n        child.emit('added', this);\n        this.emit('childAdded', child, this, index);\n\n        return child;\n    }\n\n    /**\n     * Swaps the position of 2 Display Objects within this container.\n     *\n     * @param {PIXI.DisplayObject} child - First display object to swap\n     * @param {PIXI.DisplayObject} child2 - Second display object to swap\n     */\n    swapChildren(child, child2)\n    {\n        if (child === child2)\n        {\n            return;\n        }\n\n        const index1 = this.getChildIndex(child);\n        const index2 = this.getChildIndex(child2);\n\n        this.children[index1] = child2;\n        this.children[index2] = child;\n        this.onChildrenChange(index1 < index2 ? index1 : index2);\n    }\n\n    /**\n     * Returns the index position of a child DisplayObject instance\n     *\n     * @param {PIXI.DisplayObject} child - The DisplayObject instance to identify\n     * @return {number} The index position of the child display object to identify\n     */\n    getChildIndex(child)\n    {\n        const index = this.children.indexOf(child);\n\n        if (index === -1)\n        {\n            throw new Error('The supplied DisplayObject must be a child of the caller');\n        }\n\n        return index;\n    }\n\n    /**\n     * Changes the position of an existing child in the display object container\n     *\n     * @param {PIXI.DisplayObject} child - The child DisplayObject instance for which you want to change the index number\n     * @param {number} index - The resulting index number for the child display object\n     */\n    setChildIndex(child, index)\n    {\n        if (index < 0 || index >= this.children.length)\n        {\n            throw new Error(`The index ${index} supplied is out of bounds ${this.children.length}`);\n        }\n\n        const currentIndex = this.getChildIndex(child);\n\n        removeItems(this.children, currentIndex, 1); // remove from old position\n        this.children.splice(index, 0, child); // add at new position\n\n        this.onChildrenChange(index);\n    }\n\n    /**\n     * Returns the child at the specified index\n     *\n     * @param {number} index - The index to get the child at\n     * @return {PIXI.DisplayObject} The child at the given index, if any.\n     */\n    getChildAt(index)\n    {\n        if (index < 0 || index >= this.children.length)\n        {\n            throw new Error(`getChildAt: Index (${index}) does not exist.`);\n        }\n\n        return this.children[index];\n    }\n\n    /**\n     * Removes one or more children from the container.\n     *\n     * @param {...PIXI.DisplayObject} child - The DisplayObject(s) to remove\n     * @return {PIXI.DisplayObject} The first child that was removed.\n     */\n    removeChild(child)\n    {\n        const argumentsLength = arguments.length;\n\n        // if there is only one argument we can bypass looping through the them\n        if (argumentsLength > 1)\n        {\n            // loop through the arguments property and add all children\n            // use it the right way (.length and [i]) so that this function can still be optimized by JS runtimes\n            for (let i = 0; i < argumentsLength; i++)\n            {\n                this.removeChild(arguments[i]);\n            }\n        }\n        else\n        {\n            const index = this.children.indexOf(child);\n\n            if (index === -1) return null;\n\n            child.parent = null;\n            // ensure child transform will be recalculated\n            child.transform._parentID = -1;\n            removeItems(this.children, index, 1);\n\n            // ensure bounds will be recalculated\n            this._boundsID++;\n\n            // TODO - lets either do all callbacks or all events.. not both!\n            this.onChildrenChange(index);\n            child.emit('removed', this);\n            this.emit('childRemoved', child, this, index);\n        }\n\n        return child;\n    }\n\n    /**\n     * Removes a child from the specified index position.\n     *\n     * @param {number} index - The index to get the child from\n     * @return {PIXI.DisplayObject} The child that was removed.\n     */\n    removeChildAt(index)\n    {\n        const child = this.getChildAt(index);\n\n        // ensure child transform will be recalculated..\n        child.parent = null;\n        child.transform._parentID = -1;\n        removeItems(this.children, index, 1);\n\n        // ensure bounds will be recalculated\n        this._boundsID++;\n\n        // TODO - lets either do all callbacks or all events.. not both!\n        this.onChildrenChange(index);\n        child.emit('removed', this);\n        this.emit('childRemoved', child, this, index);\n\n        return child;\n    }\n\n    /**\n     * Removes all children from this container that are within the begin and end indexes.\n     *\n     * @param {number} [beginIndex=0] - The beginning position.\n     * @param {number} [endIndex=this.children.length] - The ending position. Default value is size of the container.\n     * @returns {PIXI.DisplayObject[]} List of removed children\n     */\n    removeChildren(beginIndex = 0, endIndex)\n    {\n        const begin = beginIndex;\n        const end = typeof endIndex === 'number' ? endIndex : this.children.length;\n        const range = end - begin;\n        let removed;\n\n        if (range > 0 && range <= end)\n        {\n            removed = this.children.splice(begin, range);\n\n            for (let i = 0; i < removed.length; ++i)\n            {\n                removed[i].parent = null;\n                if (removed[i].transform)\n                {\n                    removed[i].transform._parentID = -1;\n                }\n            }\n\n            this._boundsID++;\n\n            this.onChildrenChange(beginIndex);\n\n            for (let i = 0; i < removed.length; ++i)\n            {\n                removed[i].emit('removed', this);\n                this.emit('childRemoved', removed[i], this, i);\n            }\n\n            return removed;\n        }\n        else if (range === 0 && this.children.length === 0)\n        {\n            return [];\n        }\n\n        throw new RangeError('removeChildren: numeric values are outside the acceptable range.');\n    }\n\n    /**\n     * Sorts children by zIndex. Previous order is mantained for 2 children with the same zIndex.\n     */\n    sortChildren()\n    {\n        let sortRequired = false;\n\n        for (let i = 0, j = this.children.length; i < j; ++i)\n        {\n            const child = this.children[i];\n\n            child._lastSortedIndex = i;\n\n            if (!sortRequired && child.zIndex !== 0)\n            {\n                sortRequired = true;\n            }\n        }\n\n        if (sortRequired && this.children.length > 1)\n        {\n            this.children.sort(sortChildren);\n        }\n\n        this.sortDirty = false;\n    }\n\n    /**\n     * Updates the transform on all children of this container for rendering\n     */\n    updateTransform()\n    {\n        if (this.sortableChildren && this.sortDirty)\n        {\n            this.sortChildren();\n        }\n\n        this._boundsID++;\n\n        this.transform.updateTransform(this.parent.transform);\n\n        // TODO: check render flags, how to process stuff here\n        this.worldAlpha = this.alpha * this.parent.worldAlpha;\n\n        for (let i = 0, j = this.children.length; i < j; ++i)\n        {\n            const child = this.children[i];\n\n            if (child.visible)\n            {\n                child.updateTransform();\n            }\n        }\n    }\n\n    /**\n     * Recalculates the bounds of the container.\n     *\n     */\n    calculateBounds()\n    {\n        this._bounds.clear();\n\n        this._calculateBounds();\n\n        for (let i = 0; i < this.children.length; i++)\n        {\n            const child = this.children[i];\n\n            if (!child.visible || !child.renderable)\n            {\n                continue;\n            }\n\n            child.calculateBounds();\n\n            // TODO: filter+mask, need to mask both somehow\n            if (child._mask)\n            {\n                child._mask.calculateBounds();\n                this._bounds.addBoundsMask(child._bounds, child._mask._bounds);\n            }\n            else if (child.filterArea)\n            {\n                this._bounds.addBoundsArea(child._bounds, child.filterArea);\n            }\n            else\n            {\n                this._bounds.addBounds(child._bounds);\n            }\n        }\n\n        this._lastBoundsID = this._boundsID;\n    }\n\n    /**\n     * Recalculates the bounds of the object. Override this to\n     * calculate the bounds of the specific object (not including children).\n     *\n     * @protected\n     */\n    _calculateBounds()\n    {\n        // FILL IN//\n    }\n\n    /**\n     * Renders the object using the WebGL renderer\n     *\n     * @param {PIXI.Renderer} renderer - The renderer\n     */\n    render(renderer)\n    {\n        // if the object is not visible or the alpha is 0 then no need to render this element\n        if (!this.visible || this.worldAlpha <= 0 || !this.renderable)\n        {\n            return;\n        }\n\n        // do a quick check to see if this element has a mask or a filter.\n        if (this._mask || (this.filters && this.filters.length))\n        {\n            this.renderAdvanced(renderer);\n        }\n        else\n        {\n            this._render(renderer);\n\n            // simple render children!\n            for (let i = 0, j = this.children.length; i < j; ++i)\n            {\n                this.children[i].render(renderer);\n            }\n        }\n    }\n\n    /**\n     * Render the object using the WebGL renderer and advanced features.\n     *\n     * @protected\n     * @param {PIXI.Renderer} renderer - The renderer\n     */\n    renderAdvanced(renderer)\n    {\n        renderer.batch.flush();\n\n        const filters = this.filters;\n        const mask = this._mask;\n\n        // push filter first as we need to ensure the stencil buffer is correct for any masking\n        if (filters)\n        {\n            if (!this._enabledFilters)\n            {\n                this._enabledFilters = [];\n            }\n\n            this._enabledFilters.length = 0;\n\n            for (let i = 0; i < filters.length; i++)\n            {\n                if (filters[i].enabled)\n                {\n                    this._enabledFilters.push(filters[i]);\n                }\n            }\n\n            if (this._enabledFilters.length)\n            {\n                renderer.filter.push(this, this._enabledFilters);\n            }\n        }\n\n        if (mask)\n        {\n            renderer.mask.push(this, this._mask);\n        }\n\n        // add this object to the batch, only rendered if it has a texture.\n        this._render(renderer);\n\n        // now loop through the children and make sure they get rendered\n        for (let i = 0, j = this.children.length; i < j; i++)\n        {\n            this.children[i].render(renderer);\n        }\n\n        renderer.batch.flush();\n\n        if (mask)\n        {\n            renderer.mask.pop(this, this._mask);\n        }\n\n        if (filters && this._enabledFilters && this._enabledFilters.length)\n        {\n            renderer.filter.pop();\n        }\n    }\n\n    /**\n     * To be overridden by the subclasses.\n     *\n     * @protected\n     * @param {PIXI.Renderer} renderer - The renderer\n     */\n    _render(renderer) // eslint-disable-line no-unused-vars\n    {\n        // this is where content itself gets rendered...\n    }\n\n    /**\n     * Removes all internal references and listeners as well as removes children from the display list.\n     * Do not use a Container after calling `destroy`.\n     *\n     * @param {object|boolean} [options] - Options parameter. A boolean will act as if all options\n     *  have been set to that value\n     * @param {boolean} [options.children=false] - if set to true, all the children will have their destroy\n     *  method called as well. 'options' will be passed on to those calls.\n     * @param {boolean} [options.texture=false] - Only used for child Sprites if options.children is set to true\n     *  Should it destroy the texture of the child sprite\n     * @param {boolean} [options.baseTexture=false] - Only used for child Sprites if options.children is set to true\n     *  Should it destroy the base texture of the child sprite\n     */\n    destroy(options)\n    {\n        super.destroy();\n\n        this.sortDirty = false;\n\n        const destroyChildren = typeof options === 'boolean' ? options : options && options.children;\n\n        const oldChildren = this.removeChildren(0, this.children.length);\n\n        if (destroyChildren)\n        {\n            for (let i = 0; i < oldChildren.length; ++i)\n            {\n                oldChildren[i].destroy(options);\n            }\n        }\n    }\n\n    /**\n     * The width of the Container, setting this will actually modify the scale to achieve the value set\n     *\n     * @member {number}\n     */\n    get width()\n    {\n        return this.scale.x * this.getLocalBounds().width;\n    }\n\n    set width(value) // eslint-disable-line require-jsdoc\n    {\n        const width = this.getLocalBounds().width;\n\n        if (width !== 0)\n        {\n            this.scale.x = value / width;\n        }\n        else\n        {\n            this.scale.x = 1;\n        }\n\n        this._width = value;\n    }\n\n    /**\n     * The height of the Container, setting this will actually modify the scale to achieve the value set\n     *\n     * @member {number}\n     */\n    get height()\n    {\n        return this.scale.y * this.getLocalBounds().height;\n    }\n\n    set height(value) // eslint-disable-line require-jsdoc\n    {\n        const height = this.getLocalBounds().height;\n\n        if (height !== 0)\n        {\n            this.scale.y = value / height;\n        }\n        else\n        {\n            this.scale.y = 1;\n        }\n\n        this._height = value;\n    }\n}\n\n// performance increase to avoid using call.. (10x faster)\nContainer.prototype.containerUpdateTransform = Container.prototype.updateTransform;\n","/**\n * Default property values of accessible objects\n * used by {@link PIXI.accessibility.AccessibilityManager}.\n *\n * @private\n * @function accessibleTarget\n * @memberof PIXI.accessibility\n * @type {Object}\n * @example\n *      function MyObject() {}\n *\n *      Object.assign(\n *          MyObject.prototype,\n *          PIXI.accessibility.accessibleTarget\n *      );\n */\nexport default {\n    /**\n     *  Flag for if the object is accessible. If true AccessibilityManager will overlay a\n     *   shadow div with attributes set\n     *\n     * @member {boolean}\n     * @memberof PIXI.DisplayObject#\n     */\n    accessible: false,\n\n    /**\n     * Sets the title attribute of the shadow div\n     * If accessibleTitle AND accessibleHint has not been this will default to 'displayObject [tabIndex]'\n     *\n     * @member {?string}\n     * @memberof PIXI.DisplayObject#\n     */\n    accessibleTitle: null,\n\n    /**\n     * Sets the aria-label attribute of the shadow div\n     *\n     * @member {string}\n     * @memberof PIXI.DisplayObject#\n     */\n    accessibleHint: null,\n\n    /**\n     * @member {number}\n     * @memberof PIXI.DisplayObject#\n     * @private\n     * @todo Needs docs.\n     */\n    tabIndex: 0,\n\n    /**\n     * @member {boolean}\n     * @memberof PIXI.DisplayObject#\n     * @todo Needs docs.\n     */\n    _accessibleActive: false,\n\n    /**\n     * @member {boolean}\n     * @memberof PIXI.DisplayObject#\n     * @todo Needs docs.\n     */\n    _accessibleDiv: false,\n};\n","import accessibleTarget from './accessibleTarget';\nimport { removeItems, isMobile } from '@pixi/utils';\nimport { DisplayObject } from '@pixi/display';\n\n// add some extra variables to the container..\nDisplayObject.mixin(accessibleTarget);\n\nconst KEY_CODE_TAB = 9;\n\nconst DIV_TOUCH_SIZE = 100;\nconst DIV_TOUCH_POS_X = 0;\nconst DIV_TOUCH_POS_Y = 0;\nconst DIV_TOUCH_ZINDEX = 2;\n\nconst DIV_HOOK_SIZE = 1;\nconst DIV_HOOK_POS_X = -1000;\nconst DIV_HOOK_POS_Y = -1000;\nconst DIV_HOOK_ZINDEX = 2;\n\n/**\n * The Accessibility manager recreates the ability to tab and have content read by screen readers.\n * This is very important as it can possibly help people with disabilities access PixiJS content.\n *\n * A DisplayObject can be made accessible just like it can be made interactive. This manager will map the\n * events as if the mouse was being used, minimizing the effort required to implement.\n *\n * An instance of this class is automatically created by default, and can be found at `renderer.plugins.accessibility`\n *\n * @class\n * @memberof PIXI.accessibility\n */\nexport default class AccessibilityManager\n{\n    /**\n     * @param {PIXI.CanvasRenderer|PIXI.Renderer} renderer - A reference to the current renderer\n     */\n    constructor(renderer)\n    {\n        /**\n         * @type {?HTMLElement}\n         * @private\n         */\n        this._hookDiv = null;\n        if (isMobile.tablet || isMobile.phone)\n        {\n            this.createTouchHook();\n        }\n\n        // first we create a div that will sit over the PixiJS element. This is where the div overlays will go.\n        const div = document.createElement('div');\n\n        div.style.width = `${DIV_TOUCH_SIZE}px`;\n        div.style.height = `${DIV_TOUCH_SIZE}px`;\n        div.style.position = 'absolute';\n        div.style.top = `${DIV_TOUCH_POS_X}px`;\n        div.style.left = `${DIV_TOUCH_POS_Y}px`;\n        div.style.zIndex = DIV_TOUCH_ZINDEX;\n\n        /**\n         * This is the dom element that will sit over the PixiJS element. This is where the div overlays will go.\n         *\n         * @type {HTMLElement}\n         * @private\n         */\n        this.div = div;\n\n        /**\n         * A simple pool for storing divs.\n         *\n         * @type {*}\n         * @private\n         */\n        this.pool = [];\n\n        /**\n         * This is a tick used to check if an object is no longer being rendered.\n         *\n         * @type {Number}\n         * @private\n         */\n        this.renderId = 0;\n\n        /**\n         * Setting this to true will visually show the divs.\n         *\n         * @type {boolean}\n         */\n        this.debug = false;\n\n        /**\n         * The renderer this accessibility manager works for.\n         *\n         * @member {PIXI.AbstractRenderer}\n         */\n        this.renderer = renderer;\n\n        /**\n         * The array of currently active accessible items.\n         *\n         * @member {Array<*>}\n         * @private\n         */\n        this.children = [];\n\n        /**\n         * pre-bind the functions\n         *\n         * @type {Function}\n         * @private\n         */\n        this._onKeyDown = this._onKeyDown.bind(this);\n\n        /**\n         * pre-bind the functions\n         *\n         * @type {Function}\n         * @private\n         */\n        this._onMouseMove = this._onMouseMove.bind(this);\n\n        /**\n         * A flag\n         * @type {boolean}\n         * @readonly\n         */\n        this.isActive = false;\n\n        /**\n         * A flag\n         * @type {boolean}\n         * @readonly\n         */\n        this.isMobileAccessibility = false;\n\n        // let listen for tab.. once pressed we can fire up and show the accessibility layer\n        window.addEventListener('keydown', this._onKeyDown, false);\n    }\n\n    /**\n     * Creates the touch hooks.\n     *\n     * @private\n     */\n    createTouchHook()\n    {\n        const hookDiv = document.createElement('button');\n\n        hookDiv.style.width = `${DIV_HOOK_SIZE}px`;\n        hookDiv.style.height = `${DIV_HOOK_SIZE}px`;\n        hookDiv.style.position = 'absolute';\n        hookDiv.style.top = `${DIV_HOOK_POS_X}px`;\n        hookDiv.style.left = `${DIV_HOOK_POS_Y}px`;\n        hookDiv.style.zIndex = DIV_HOOK_ZINDEX;\n        hookDiv.style.backgroundColor = '#FF0000';\n        hookDiv.title = 'HOOK DIV';\n\n        hookDiv.addEventListener('focus', () =>\n        {\n            this.isMobileAccessibility = true;\n            this.activate();\n            this.destroyTouchHook();\n        });\n\n        document.body.appendChild(hookDiv);\n        this._hookDiv = hookDiv;\n    }\n\n    /**\n     * Destroys the touch hooks.\n     *\n     * @private\n     */\n    destroyTouchHook()\n    {\n        if (!this._hookDiv)\n        {\n            return;\n        }\n        document.body.removeChild(this._hookDiv);\n        this._hookDiv = null;\n    }\n\n    /**\n     * Activating will cause the Accessibility layer to be shown.\n     * This is called when a user presses the tab key.\n     *\n     * @private\n     */\n    activate()\n    {\n        if (this.isActive)\n        {\n            return;\n        }\n\n        this.isActive = true;\n\n        window.document.addEventListener('mousemove', this._onMouseMove, true);\n        window.removeEventListener('keydown', this._onKeyDown, false);\n\n        this.renderer.on('postrender', this.update, this);\n\n        if (this.renderer.view.parentNode)\n        {\n            this.renderer.view.parentNode.appendChild(this.div);\n        }\n    }\n\n    /**\n     * Deactivating will cause the Accessibility layer to be hidden.\n     * This is called when a user moves the mouse.\n     *\n     * @private\n     */\n    deactivate()\n    {\n        if (!this.isActive || this.isMobileAccessibility)\n        {\n            return;\n        }\n\n        this.isActive = false;\n\n        window.document.removeEventListener('mousemove', this._onMouseMove, true);\n        window.addEventListener('keydown', this._onKeyDown, false);\n\n        this.renderer.off('postrender', this.update);\n\n        if (this.div.parentNode)\n        {\n            this.div.parentNode.removeChild(this.div);\n        }\n    }\n\n    /**\n     * This recursive function will run through the scene graph and add any new accessible objects to the DOM layer.\n     *\n     * @private\n     * @param {PIXI.Container} displayObject - The DisplayObject to check.\n     */\n    updateAccessibleObjects(displayObject)\n    {\n        if (!displayObject.visible)\n        {\n            return;\n        }\n\n        if (displayObject.accessible && displayObject.interactive)\n        {\n            if (!displayObject._accessibleActive)\n            {\n                this.addChild(displayObject);\n            }\n\n            displayObject.renderId = this.renderId;\n        }\n\n        const children = displayObject.children;\n\n        for (let i = 0; i < children.length; i++)\n        {\n            this.updateAccessibleObjects(children[i]);\n        }\n    }\n\n    /**\n     * Before each render this function will ensure that all divs are mapped correctly to their DisplayObjects.\n     *\n     * @private\n     */\n    update()\n    {\n        if (!this.renderer.renderingToScreen)\n        {\n            return;\n        }\n\n        // update children...\n        this.updateAccessibleObjects(this.renderer._lastObjectRendered);\n\n        const rect = this.renderer.view.getBoundingClientRect();\n        const sx = rect.width / this.renderer.width;\n        const sy = rect.height / this.renderer.height;\n\n        let div = this.div;\n\n        div.style.left = `${rect.left}px`;\n        div.style.top = `${rect.top}px`;\n        div.style.width = `${this.renderer.width}px`;\n        div.style.height = `${this.renderer.height}px`;\n\n        for (let i = 0; i < this.children.length; i++)\n        {\n            const child = this.children[i];\n\n            if (child.renderId !== this.renderId)\n            {\n                child._accessibleActive = false;\n\n                removeItems(this.children, i, 1);\n                this.div.removeChild(child._accessibleDiv);\n                this.pool.push(child._accessibleDiv);\n                child._accessibleDiv = null;\n\n                i--;\n\n                if (this.children.length === 0)\n                {\n                    this.deactivate();\n                }\n            }\n            else\n            {\n                // map div to display..\n                div = child._accessibleDiv;\n                let hitArea = child.hitArea;\n                const wt = child.worldTransform;\n\n                if (child.hitArea)\n                {\n                    div.style.left = `${(wt.tx + (hitArea.x * wt.a)) * sx}px`;\n                    div.style.top = `${(wt.ty + (hitArea.y * wt.d)) * sy}px`;\n\n                    div.style.width = `${hitArea.width * wt.a * sx}px`;\n                    div.style.height = `${hitArea.height * wt.d * sy}px`;\n                }\n                else\n                {\n                    hitArea = child.getBounds();\n\n                    this.capHitArea(hitArea);\n\n                    div.style.left = `${hitArea.x * sx}px`;\n                    div.style.top = `${hitArea.y * sy}px`;\n\n                    div.style.width = `${hitArea.width * sx}px`;\n                    div.style.height = `${hitArea.height * sy}px`;\n\n                    // update button titles and hints if they exist and they've changed\n                    if (div.title !== child.accessibleTitle && child.accessibleTitle !== null)\n                    {\n                        div.title = child.accessibleTitle;\n                    }\n                    if (div.getAttribute('aria-label') !== child.accessibleHint\n                        && child.accessibleHint !== null)\n                    {\n                        div.setAttribute('aria-label', child.accessibleHint);\n                    }\n                }\n            }\n        }\n\n        // increment the render id..\n        this.renderId++;\n    }\n\n    /**\n     * Adjust the hit area based on the bounds of a display object\n     *\n     * @param {PIXI.Rectangle} hitArea - Bounds of the child\n     */\n    capHitArea(hitArea)\n    {\n        if (hitArea.x < 0)\n        {\n            hitArea.width += hitArea.x;\n            hitArea.x = 0;\n        }\n\n        if (hitArea.y < 0)\n        {\n            hitArea.height += hitArea.y;\n            hitArea.y = 0;\n        }\n\n        if (hitArea.x + hitArea.width > this.renderer.width)\n        {\n            hitArea.width = this.renderer.width - hitArea.x;\n        }\n\n        if (hitArea.y + hitArea.height > this.renderer.height)\n        {\n            hitArea.height = this.renderer.height - hitArea.y;\n        }\n    }\n\n    /**\n     * Adds a DisplayObject to the accessibility manager\n     *\n     * @private\n     * @param {PIXI.DisplayObject} displayObject - The child to make accessible.\n     */\n    addChild(displayObject)\n    {\n        //    this.activate();\n\n        let div = this.pool.pop();\n\n        if (!div)\n        {\n            div = document.createElement('button');\n\n            div.style.width = `${DIV_TOUCH_SIZE}px`;\n            div.style.height = `${DIV_TOUCH_SIZE}px`;\n            div.style.backgroundColor = this.debug ? 'rgba(255,0,0,0.5)' : 'transparent';\n            div.style.position = 'absolute';\n            div.style.zIndex = DIV_TOUCH_ZINDEX;\n            div.style.borderStyle = 'none';\n\n            // ARIA attributes ensure that button title and hint updates are announced properly\n            if (navigator.userAgent.toLowerCase().indexOf('chrome') > -1)\n            {\n                // Chrome doesn't need aria-live to work as intended; in fact it just gets more confused.\n                div.setAttribute('aria-live', 'off');\n            }\n            else\n            {\n                div.setAttribute('aria-live', 'polite');\n            }\n\n            if (navigator.userAgent.match(/rv:.*Gecko\\//))\n            {\n                // FireFox needs this to announce only the new button name\n                div.setAttribute('aria-relevant', 'additions');\n            }\n            else\n            {\n                // required by IE, other browsers don't much care\n                div.setAttribute('aria-relevant', 'text');\n            }\n\n            div.addEventListener('click', this._onClick.bind(this));\n            div.addEventListener('focus', this._onFocus.bind(this));\n            div.addEventListener('focusout', this._onFocusOut.bind(this));\n        }\n\n        if (displayObject.accessibleTitle && displayObject.accessibleTitle !== null)\n        {\n            div.title = displayObject.accessibleTitle;\n        }\n        else if (!displayObject.accessibleHint\n                 || displayObject.accessibleHint === null)\n        {\n            div.title = `displayObject ${displayObject.tabIndex}`;\n        }\n\n        if (displayObject.accessibleHint\n            && displayObject.accessibleHint !== null)\n        {\n            div.setAttribute('aria-label', displayObject.accessibleHint);\n        }\n\n        //\n\n        displayObject._accessibleActive = true;\n        displayObject._accessibleDiv = div;\n        div.displayObject = displayObject;\n\n        this.children.push(displayObject);\n        this.div.appendChild(displayObject._accessibleDiv);\n        displayObject._accessibleDiv.tabIndex = displayObject.tabIndex;\n    }\n\n    /**\n     * Maps the div button press to pixi's InteractionManager (click)\n     *\n     * @private\n     * @param {MouseEvent} e - The click event.\n     */\n    _onClick(e)\n    {\n        const interactionManager = this.renderer.plugins.interaction;\n\n        interactionManager.dispatchEvent(e.target.displayObject, 'click', interactionManager.eventData);\n        interactionManager.dispatchEvent(e.target.displayObject, 'pointertap', interactionManager.eventData);\n        interactionManager.dispatchEvent(e.target.displayObject, 'tap', interactionManager.eventData);\n    }\n\n    /**\n     * Maps the div focus events to pixi's InteractionManager (mouseover)\n     *\n     * @private\n     * @param {FocusEvent} e - The focus event.\n     */\n    _onFocus(e)\n    {\n        if (!e.target.getAttribute('aria-live', 'off'))\n        {\n            e.target.setAttribute('aria-live', 'assertive');\n        }\n        const interactionManager = this.renderer.plugins.interaction;\n\n        interactionManager.dispatchEvent(e.target.displayObject, 'mouseover', interactionManager.eventData);\n    }\n\n    /**\n     * Maps the div focus events to pixi's InteractionManager (mouseout)\n     *\n     * @private\n     * @param {FocusEvent} e - The focusout event.\n     */\n    _onFocusOut(e)\n    {\n        if (!e.target.getAttribute('aria-live', 'off'))\n        {\n            e.target.setAttribute('aria-live', 'polite');\n        }\n        const interactionManager = this.renderer.plugins.interaction;\n\n        interactionManager.dispatchEvent(e.target.displayObject, 'mouseout', interactionManager.eventData);\n    }\n\n    /**\n     * Is called when a key is pressed\n     *\n     * @private\n     * @param {KeyboardEvent} e - The keydown event.\n     */\n    _onKeyDown(e)\n    {\n        if (e.keyCode !== KEY_CODE_TAB)\n        {\n            return;\n        }\n\n        this.activate();\n    }\n\n    /**\n     * Is called when the mouse moves across the renderer element\n     *\n     * @private\n     * @param {MouseEvent} e - The mouse event.\n     */\n    _onMouseMove(e)\n    {\n        if (e.movementX === 0 && e.movementY === 0)\n        {\n            return;\n        }\n\n        this.deactivate();\n    }\n\n    /**\n     * Destroys the accessibility manager\n     *\n     */\n    destroy()\n    {\n        this.destroyTouchHook();\n        this.div = null;\n\n        for (let i = 0; i < this.children.length; i++)\n        {\n            this.children[i].div = null;\n        }\n\n        window.document.removeEventListener('mousemove', this._onMouseMove, true);\n        window.removeEventListener('keydown', this._onKeyDown);\n\n        this.pool = null;\n        this.children = null;\n        this.renderer = null;\n    }\n}\n","/**\n * A Runner is a highly performant and simple alternative to signals. Best used in situations\n * where events are dispatched to many objects at high frequency (say every frame!)\n *\n *\n * like a signal..\n * ```\n * const myObject = {\n *     loaded: new PIXI.Runner('loaded')\n * }\n *\n * const listener = {\n *     loaded: function(){\n *         // thin\n *     }\n * }\n *\n * myObject.update.add(listener);\n *\n * myObject.loaded.emit();\n * ```\n *\n * Or for handling calling the same function on many items\n * ```\n * const myGame = {\n *     update: new PIXI.Runner('update')\n * }\n *\n * const gameObject = {\n *     update: function(time){\n *         // update my gamey state\n *     }\n * }\n *\n * myGame.update.add(gameObject1);\n *\n * myGame.update.emit(time);\n * ```\n * @class\n * @memberof PIXI\n */\nexport default class Runner\n{\n    /**\n     *  @param {string} name the function name that will be executed on the listeners added to this Runner.\n     */\n    constructor(name)\n    {\n        this.items = [];\n        this._name = name;\n        this._aliasCount = 0;\n    }\n\n    /**\n     * Dispatch/Broadcast Runner to all listeners added to the queue.\n     * @param {...any} params - optional parameters to pass to each listener\n     */\n    emit(a0, a1, a2, a3, a4, a5, a6, a7)\n    {\n        if (arguments.length > 8)\n        {\n            throw new Error('max arguments reached');\n        }\n\n        const { name, items } = this;\n\n        this._aliasCount++;\n\n        for (let i = 0, len = items.length; i < len; i++)\n        {\n            items[i][name](a0, a1, a2, a3, a4, a5, a6, a7);\n        }\n\n        if (items === this.items)\n        {\n            this._aliasCount--;\n        }\n\n        return this;\n    }\n\n    ensureNonAliasedItems()\n    {\n        if (this._aliasCount > 0 && this.items.length > 1)\n        {\n            this._aliasCount = 0;\n            this.items = this.items.slice(0);\n        }\n    }\n\n    /**\n     * Add a listener to the Runner\n     *\n     * Runners do not need to have scope or functions passed to them.\n     * All that is required is to pass the listening object and ensure that it has contains a function that has the same name\n     * as the name provided to the Runner when it was created.\n     *\n     * Eg A listener passed to this Runner will require a 'complete' function.\n     *\n     * ```\n     * const complete = new PIXI.Runner('complete');\n     * ```\n     *\n     * The scope used will be the object itself.\n     *\n     * @param {any} item - The object that will be listening.\n     */\n    add(item)\n    {\n        if (item[this._name])\n        {\n            this.ensureNonAliasedItems();\n            this.remove(item);\n            this.items.push(item);\n        }\n\n        return this;\n    }\n\n    /**\n     * Remove a single listener from the dispatch queue.\n     * @param {any} item - The listenr that you would like to remove.\n     */\n    remove(item)\n    {\n        const index = this.items.indexOf(item);\n\n        if (index !== -1)\n        {\n            this.ensureNonAliasedItems();\n            this.items.splice(index, 1);\n        }\n\n        return this;\n    }\n\n    /**\n     * Check to see if the listener is already in the Runner\n     * @param {any} item - The listener that you would like to check.\n     */\n    contains(item)\n    {\n        return this.items.indexOf(item) !== -1;\n    }\n\n    /**\n     * Remove all listeners from the Runner\n     */\n    removeAll()\n    {\n        this.ensureNonAliasedItems();\n        this.items.length = 0;\n\n        return this;\n    }\n\n    /**\n     * Remove all references, don't use after this.\n     */\n    destroy()\n    {\n        this.removeAll();\n        this.items = null;\n        this._name = null;\n    }\n\n    /**\n     * `true` if there are no this Runner contains no listeners\n     *\n     * @member {boolean}\n     * @readonly\n     */\n    get empty()\n    {\n        return this.items.length === 0;\n    }\n\n    /**\n     * The name of the runner.\n     *\n     * @member {string}\n     * @readonly\n     */\n    get name()\n    {\n        return this._name;\n    }\n}\n\n/**\n * Alias for `emit`\n * @memberof PIXI.Runner#\n * @method dispatch\n * @see PIXI.Runner#emit\n */\nRunner.prototype.dispatch = Runner.prototype.emit;\n\n/**\n * Alias for `emit`\n * @memberof PIXI.Runner#\n * @method run\n * @see PIXI.Runner#emit\n */\nRunner.prototype.run = Runner.prototype.emit;\n","import { settings } from '@pixi/settings';\n\n/**\n * Target frames per millisecond.\n *\n * @static\n * @name TARGET_FPMS\n * @memberof PIXI.settings\n * @type {number}\n * @default 0.06\n */\nsettings.TARGET_FPMS = 0.06;\n\nexport { settings };\n","/**\n * Represents the update priorities used by internal PIXI classes when registered with\n * the {@link PIXI.Ticker} object. Higher priority items are updated first and lower\n * priority items, such as render, should go later.\n *\n * @static\n * @constant\n * @name UPDATE_PRIORITY\n * @memberof PIXI\n * @type {object}\n * @property {number} INTERACTION=50 Highest priority, used for {@link PIXI.interaction.InteractionManager}\n * @property {number} HIGH=25 High priority updating, {@link PIXI.VideoBaseTexture} and {@link PIXI.AnimatedSprite}\n * @property {number} NORMAL=0 Default priority for ticker events, see {@link PIXI.Ticker#add}.\n * @property {number} LOW=-25 Low priority used for {@link PIXI.Application} rendering.\n * @property {number} UTILITY=-50 Lowest priority used for {@link PIXI.prepare.BasePrepare} utility.\n */\nexport const UPDATE_PRIORITY = {\n    INTERACTION: 50,\n    HIGH: 25,\n    NORMAL: 0,\n    LOW: -25,\n    UTILITY: -50,\n};\n","/**\n * Internal class for handling the priority sorting of ticker handlers.\n *\n * @private\n * @class\n * @memberof PIXI\n */\nexport default class TickerListener\n{\n    /**\n     * Constructor\n     * @private\n     * @param {Function} fn - The listener function to be added for one update\n     * @param {*} [context=null] - The listener context\n     * @param {number} [priority=0] - The priority for emitting\n     * @param {boolean} [once=false] - If the handler should fire once\n     */\n    constructor(fn, context = null, priority = 0, once = false)\n    {\n        /**\n         * The handler function to execute.\n         * @private\n         * @member {Function}\n         */\n        this.fn = fn;\n\n        /**\n         * The calling to execute.\n         * @private\n         * @member {*}\n         */\n        this.context = context;\n\n        /**\n         * The current priority.\n         * @private\n         * @member {number}\n         */\n        this.priority = priority;\n\n        /**\n         * If this should only execute once.\n         * @private\n         * @member {boolean}\n         */\n        this.once = once;\n\n        /**\n         * The next item in chain.\n         * @private\n         * @member {TickerListener}\n         */\n        this.next = null;\n\n        /**\n         * The previous item in chain.\n         * @private\n         * @member {TickerListener}\n         */\n        this.previous = null;\n\n        /**\n         * `true` if this listener has been destroyed already.\n         * @member {boolean}\n         * @private\n         */\n        this._destroyed = false;\n    }\n\n    /**\n     * Simple compare function to figure out if a function and context match.\n     * @private\n     * @param {Function} fn - The listener function to be added for one update\n     * @param {Function} context - The listener context\n     * @return {boolean} `true` if the listener match the arguments\n     */\n    match(fn, context)\n    {\n        context = context || null;\n\n        return this.fn === fn && this.context === context;\n    }\n\n    /**\n     * Emit by calling the current function.\n     * @private\n     * @param {number} deltaTime - time since the last emit.\n     * @return {TickerListener} Next ticker\n     */\n    emit(deltaTime)\n    {\n        if (this.fn)\n        {\n            if (this.context)\n            {\n                this.fn.call(this.context, deltaTime);\n            }\n            else\n            {\n                this.fn(deltaTime);\n            }\n        }\n\n        const redirect = this.next;\n\n        if (this.once)\n        {\n            this.destroy(true);\n        }\n\n        // Soft-destroying should remove\n        // the next reference\n        if (this._destroyed)\n        {\n            this.next = null;\n        }\n\n        return redirect;\n    }\n\n    /**\n     * Connect to the list.\n     * @private\n     * @param {TickerListener} previous - Input node, previous listener\n     */\n    connect(previous)\n    {\n        this.previous = previous;\n        if (previous.next)\n        {\n            previous.next.previous = this;\n        }\n        this.next = previous.next;\n        previous.next = this;\n    }\n\n    /**\n     * Destroy and don't use after this.\n     * @private\n     * @param {boolean} [hard = false] `true` to remove the `next` reference, this\n     *        is considered a hard destroy. Soft destroy maintains the next reference.\n     * @return {TickerListener} The listener to redirect while emitting or removing.\n     */\n    destroy(hard = false)\n    {\n        this._destroyed = true;\n        this.fn = null;\n        this.context = null;\n\n        // Disconnect, hook up next and previous\n        if (this.previous)\n        {\n            this.previous.next = this.next;\n        }\n\n        if (this.next)\n        {\n            this.next.previous = this.previous;\n        }\n\n        // Redirect to the next item\n        const redirect = this.next;\n\n        // Remove references\n        this.next = hard ? null : redirect;\n        this.previous = null;\n\n        return redirect;\n    }\n}\n","import { settings } from './settings';\nimport { UPDATE_PRIORITY } from './const';\nimport TickerListener from './TickerListener';\n\n/**\n * A Ticker class that runs an update loop that other objects listen to.\n *\n * This class is composed around listeners meant for execution on the next requested animation frame.\n * Animation frames are requested only when necessary, e.g. When the ticker is started and the emitter has listeners.\n *\n * @class\n * @memberof PIXI\n */\nexport default class Ticker\n{\n    constructor()\n    {\n        /**\n         * The first listener. All new listeners added are chained on this.\n         * @private\n         * @type {TickerListener}\n         */\n        this._head = new TickerListener(null, null, Infinity);\n\n        /**\n         * Internal current frame request ID\n         * @type {?number}\n         * @private\n         */\n        this._requestId = null;\n\n        /**\n         * Internal value managed by minFPS property setter and getter.\n         * This is the maximum allowed milliseconds between updates.\n         * @type {number}\n         * @private\n         */\n        this._maxElapsedMS = 100;\n\n        /**\n         * Internal value managed by maxFPS property setter and getter.\n         * This is the minimum allowed milliseconds between updates.\n         * @private\n         */\n        this._minElapsedMS = 0;\n\n        /**\n         * Whether or not this ticker should invoke the method\n         * {@link PIXI.Ticker#start} automatically\n         * when a listener is added.\n         *\n         * @member {boolean}\n         * @default false\n         */\n        this.autoStart = false;\n\n        /**\n         * Scalar time value from last frame to this frame.\n         * This value is capped by setting {@link PIXI.Ticker#minFPS}\n         * and is scaled with {@link PIXI.Ticker#speed}.\n         * **Note:** The cap may be exceeded by scaling.\n         *\n         * @member {number}\n         * @default 1\n         */\n        this.deltaTime = 1;\n\n        /**\n         * Scaler time elapsed in milliseconds from last frame to this frame.\n         * This value is capped by setting {@link PIXI.Ticker#minFPS}\n         * and is scaled with {@link PIXI.Ticker#speed}.\n         * **Note:** The cap may be exceeded by scaling.\n         * If the platform supports DOMHighResTimeStamp,\n         * this value will have a precision of 1 µs.\n         * Defaults to target frame time\n         *\n         * @member {number}\n         * @default 16.66\n         */\n        this.deltaMS = 1 / settings.TARGET_FPMS;\n\n        /**\n         * Time elapsed in milliseconds from last frame to this frame.\n         * Opposed to what the scalar {@link PIXI.Ticker#deltaTime}\n         * is based, this value is neither capped nor scaled.\n         * If the platform supports DOMHighResTimeStamp,\n         * this value will have a precision of 1 µs.\n         * Defaults to target frame time\n         *\n         * @member {number}\n         * @default 16.66\n         */\n        this.elapsedMS = 1 / settings.TARGET_FPMS;\n\n        /**\n         * The last time {@link PIXI.Ticker#update} was invoked.\n         * This value is also reset internally outside of invoking\n         * update, but only when a new animation frame is requested.\n         * If the platform supports DOMHighResTimeStamp,\n         * this value will have a precision of 1 µs.\n         *\n         * @member {number}\n         * @default -1\n         */\n        this.lastTime = -1;\n\n        /**\n         * Factor of current {@link PIXI.Ticker#deltaTime}.\n         * @example\n         * // Scales ticker.deltaTime to what would be\n         * // the equivalent of approximately 120 FPS\n         * ticker.speed = 2;\n         *\n         * @member {number}\n         * @default 1\n         */\n        this.speed = 1;\n\n        /**\n         * Whether or not this ticker has been started.\n         * `true` if {@link PIXI.Ticker#start} has been called.\n         * `false` if {@link PIXI.Ticker#stop} has been called.\n         * While `false`, this value may change to `true` in the\n         * event of {@link PIXI.Ticker#autoStart} being `true`\n         * and a listener is added.\n         *\n         * @member {boolean}\n         * @default false\n         */\n        this.started = false;\n\n        /**\n         * If enabled, deleting is disabled.\n         * @member {boolean}\n         * @default false\n         * @private\n         */\n        this._protected = false;\n\n        /**\n         * The last time keyframe was executed.\n         * Maintains a relatively fixed interval with the previous value.\n         * @member {number}\n         * @default -1\n         * @private\n         */\n        this._lastFrame = -1;\n\n        /**\n         * Internal tick method bound to ticker instance.\n         * This is because in early 2015, Function.bind\n         * is still 60% slower in high performance scenarios.\n         * Also separating frame requests from update method\n         * so listeners may be called at any time and with\n         * any animation API, just invoke ticker.update(time).\n         *\n         * @private\n         * @param {number} time - Time since last tick.\n         */\n        this._tick = (time) =>\n        {\n            this._requestId = null;\n\n            if (this.started)\n            {\n                // Invoke listeners now\n                this.update(time);\n                // Listener side effects may have modified ticker state.\n                if (this.started && this._requestId === null && this._head.next)\n                {\n                    this._requestId = requestAnimationFrame(this._tick);\n                }\n            }\n        };\n    }\n\n    /**\n     * Conditionally requests a new animation frame.\n     * If a frame has not already been requested, and if the internal\n     * emitter has listeners, a new frame is requested.\n     *\n     * @private\n     */\n    _requestIfNeeded()\n    {\n        if (this._requestId === null && this._head.next)\n        {\n            // ensure callbacks get correct delta\n            this.lastTime = performance.now();\n            this._lastFrame = this.lastTime;\n            this._requestId = requestAnimationFrame(this._tick);\n        }\n    }\n\n    /**\n     * Conditionally cancels a pending animation frame.\n     *\n     * @private\n     */\n    _cancelIfNeeded()\n    {\n        if (this._requestId !== null)\n        {\n            cancelAnimationFrame(this._requestId);\n            this._requestId = null;\n        }\n    }\n\n    /**\n     * Conditionally requests a new animation frame.\n     * If the ticker has been started it checks if a frame has not already\n     * been requested, and if the internal emitter has listeners. If these\n     * conditions are met, a new frame is requested. If the ticker has not\n     * been started, but autoStart is `true`, then the ticker starts now,\n     * and continues with the previous conditions to request a new frame.\n     *\n     * @private\n     */\n    _startIfPossible()\n    {\n        if (this.started)\n        {\n            this._requestIfNeeded();\n        }\n        else if (this.autoStart)\n        {\n            this.start();\n        }\n    }\n\n    /**\n     * Register a handler for tick events. Calls continuously unless\n     * it is removed or the ticker is stopped.\n     *\n     * @param {Function} fn - The listener function to be added for updates\n     * @param {*} [context] - The listener context\n     * @param {number} [priority=PIXI.UPDATE_PRIORITY.NORMAL] - The priority for emitting\n     * @returns {PIXI.Ticker} This instance of a ticker\n     */\n    add(fn, context, priority = UPDATE_PRIORITY.NORMAL)\n    {\n        return this._addListener(new TickerListener(fn, context, priority));\n    }\n\n    /**\n     * Add a handler for the tick event which is only execute once.\n     *\n     * @param {Function} fn - The listener function to be added for one update\n     * @param {*} [context] - The listener context\n     * @param {number} [priority=PIXI.UPDATE_PRIORITY.NORMAL] - The priority for emitting\n     * @returns {PIXI.Ticker} This instance of a ticker\n     */\n    addOnce(fn, context, priority = UPDATE_PRIORITY.NORMAL)\n    {\n        return this._addListener(new TickerListener(fn, context, priority, true));\n    }\n\n    /**\n     * Internally adds the event handler so that it can be sorted by priority.\n     * Priority allows certain handler (user, AnimatedSprite, Interaction) to be run\n     * before the rendering.\n     *\n     * @private\n     * @param {TickerListener} listener - Current listener being added.\n     * @returns {PIXI.Ticker} This instance of a ticker\n     */\n    _addListener(listener)\n    {\n        // For attaching to head\n        let current = this._head.next;\n        let previous = this._head;\n\n        // Add the first item\n        if (!current)\n        {\n            listener.connect(previous);\n        }\n        else\n        {\n            // Go from highest to lowest priority\n            while (current)\n            {\n                if (listener.priority > current.priority)\n                {\n                    listener.connect(previous);\n                    break;\n                }\n                previous = current;\n                current = current.next;\n            }\n\n            // Not yet connected\n            if (!listener.previous)\n            {\n                listener.connect(previous);\n            }\n        }\n\n        this._startIfPossible();\n\n        return this;\n    }\n\n    /**\n     * Removes any handlers matching the function and context parameters.\n     * If no handlers are left after removing, then it cancels the animation frame.\n     *\n     * @param {Function} fn - The listener function to be removed\n     * @param {*} [context] - The listener context to be removed\n     * @returns {PIXI.Ticker} This instance of a ticker\n     */\n    remove(fn, context)\n    {\n        let listener = this._head.next;\n\n        while (listener)\n        {\n            // We found a match, lets remove it\n            // no break to delete all possible matches\n            // incase a listener was added 2+ times\n            if (listener.match(fn, context))\n            {\n                listener = listener.destroy();\n            }\n            else\n            {\n                listener = listener.next;\n            }\n        }\n\n        if (!this._head.next)\n        {\n            this._cancelIfNeeded();\n        }\n\n        return this;\n    }\n\n    /**\n     * Starts the ticker. If the ticker has listeners\n     * a new animation frame is requested at this point.\n     */\n    start()\n    {\n        if (!this.started)\n        {\n            this.started = true;\n            this._requestIfNeeded();\n        }\n    }\n\n    /**\n     * Stops the ticker. If the ticker has requested\n     * an animation frame it is canceled at this point.\n     */\n    stop()\n    {\n        if (this.started)\n        {\n            this.started = false;\n            this._cancelIfNeeded();\n        }\n    }\n\n    /**\n     * Destroy the ticker and don't use after this. Calling\n     * this method removes all references to internal events.\n     */\n    destroy()\n    {\n        if (!this._protected)\n        {\n            this.stop();\n\n            let listener = this._head.next;\n\n            while (listener)\n            {\n                listener = listener.destroy(true);\n            }\n\n            this._head.destroy();\n            this._head = null;\n        }\n    }\n\n    /**\n     * Triggers an update. An update entails setting the\n     * current {@link PIXI.Ticker#elapsedMS},\n     * the current {@link PIXI.Ticker#deltaTime},\n     * invoking all listeners with current deltaTime,\n     * and then finally setting {@link PIXI.Ticker#lastTime}\n     * with the value of currentTime that was provided.\n     * This method will be called automatically by animation\n     * frame callbacks if the ticker instance has been started\n     * and listeners are added.\n     *\n     * @param {number} [currentTime=performance.now()] - the current time of execution\n     */\n    update(currentTime = performance.now())\n    {\n        let elapsedMS;\n\n        // If the difference in time is zero or negative, we ignore most of the work done here.\n        // If there is no valid difference, then should be no reason to let anyone know about it.\n        // A zero delta, is exactly that, nothing should update.\n        //\n        // The difference in time can be negative, and no this does not mean time traveling.\n        // This can be the result of a race condition between when an animation frame is requested\n        // on the current JavaScript engine event loop, and when the ticker's start method is invoked\n        // (which invokes the internal _requestIfNeeded method). If a frame is requested before\n        // _requestIfNeeded is invoked, then the callback for the animation frame the ticker requests,\n        // can receive a time argument that can be less than the lastTime value that was set within\n        // _requestIfNeeded. This difference is in microseconds, but this is enough to cause problems.\n        //\n        // This check covers this browser engine timing issue, as well as if consumers pass an invalid\n        // currentTime value. This may happen if consumers opt-out of the autoStart, and update themselves.\n\n        if (currentTime > this.lastTime)\n        {\n            // Save uncapped elapsedMS for measurement\n            elapsedMS = this.elapsedMS = currentTime - this.lastTime;\n\n            // cap the milliseconds elapsed used for deltaTime\n            if (elapsedMS > this._maxElapsedMS)\n            {\n                elapsedMS = this._maxElapsedMS;\n            }\n\n            elapsedMS *= this.speed;\n\n            // If not enough time has passed, exit the function.\n            // Get ready for next frame by setting _lastFrame, but based on _minElapsedMS\n            // adjustment to ensure a relatively stable interval.\n            if (this._minElapsedMS)\n            {\n                const delta = currentTime - this._lastFrame | 0;\n\n                if (delta < this._minElapsedMS)\n                {\n                    return;\n                }\n\n                this._lastFrame = currentTime - (delta % this._minElapsedMS);\n            }\n\n            this.deltaMS = elapsedMS;\n            this.deltaTime = this.deltaMS * settings.TARGET_FPMS;\n\n            // Cache a local reference, in-case ticker is destroyed\n            // during the emit, we can still check for head.next\n            const head = this._head;\n\n            // Invoke listeners added to internal emitter\n            let listener = head.next;\n\n            while (listener)\n            {\n                listener = listener.emit(this.deltaTime);\n            }\n\n            if (!head.next)\n            {\n                this._cancelIfNeeded();\n            }\n        }\n        else\n        {\n            this.deltaTime = this.deltaMS = this.elapsedMS = 0;\n        }\n\n        this.lastTime = currentTime;\n    }\n\n    /**\n     * The frames per second at which this ticker is running.\n     * The default is approximately 60 in most modern browsers.\n     * **Note:** This does not factor in the value of\n     * {@link PIXI.Ticker#speed}, which is specific\n     * to scaling {@link PIXI.Ticker#deltaTime}.\n     *\n     * @member {number}\n     * @readonly\n     */\n    get FPS()\n    {\n        return 1000 / this.elapsedMS;\n    }\n\n    /**\n     * Manages the maximum amount of milliseconds allowed to\n     * elapse between invoking {@link PIXI.Ticker#update}.\n     * This value is used to cap {@link PIXI.Ticker#deltaTime},\n     * but does not effect the measured value of {@link PIXI.Ticker#FPS}.\n     * When setting this property it is clamped to a value between\n     * `0` and `PIXI.settings.TARGET_FPMS * 1000`.\n     *\n     * @member {number}\n     * @default 10\n     */\n    get minFPS()\n    {\n        return 1000 / this._maxElapsedMS;\n    }\n\n    set minFPS(fps) // eslint-disable-line require-jsdoc\n    {\n        // Minimum must be below the maxFPS\n        const minFPS = Math.min(this.maxFPS, fps);\n\n        // Must be at least 0, but below 1 / settings.TARGET_FPMS\n        const minFPMS = Math.min(Math.max(0, minFPS) / 1000, settings.TARGET_FPMS);\n\n        this._maxElapsedMS = 1 / minFPMS;\n    }\n\n    /**\n     * Manages the minimum amount of milliseconds required to\n     * elapse between invoking {@link PIXI.Ticker#update}.\n     * This will effect the measured value of {@link PIXI.Ticker#FPS}.\n     * If it is set to `0`, then there is no limit; PixiJS will render as many frames as it can.\n     * Otherwise it will be at least `minFPS`\n     *\n     * @member {number}\n     * @default 0\n     */\n    get maxFPS()\n    {\n        if (this._minElapsedMS)\n        {\n            return Math.round(1000 / this._minElapsedMS);\n        }\n\n        return 0;\n    }\n\n    set maxFPS(fps)\n    {\n        if (fps === 0)\n        {\n            this._minElapsedMS = 0;\n        }\n        else\n        {\n            // Max must be at least the minFPS\n            const maxFPS = Math.max(this.minFPS, fps);\n\n            this._minElapsedMS = 1 / (maxFPS / 1000);\n        }\n    }\n\n    /**\n     * The shared ticker instance used by {@link PIXI.AnimatedSprite} and by\n     * {@link PIXI.VideoResource} to update animation frames / video textures.\n     *\n     * It may also be used by {@link PIXI.Application} if created with the `sharedTicker` option property set to true.\n     *\n     * The property {@link PIXI.Ticker#autoStart} is set to `true` for this instance.\n     * Please follow the examples for usage, including how to opt-out of auto-starting the shared ticker.\n     *\n     * @example\n     * let ticker = PIXI.Ticker.shared;\n     * // Set this to prevent starting this ticker when listeners are added.\n     * // By default this is true only for the PIXI.Ticker.shared instance.\n     * ticker.autoStart = false;\n     * // FYI, call this to ensure the ticker is stopped. It should be stopped\n     * // if you have not attempted to render anything yet.\n     * ticker.stop();\n     * // Call this when you are ready for a running shared ticker.\n     * ticker.start();\n     *\n     * @example\n     * // You may use the shared ticker to render...\n     * let renderer = PIXI.autoDetectRenderer();\n     * let stage = new PIXI.Container();\n     * document.body.appendChild(renderer.view);\n     * ticker.add(function (time) {\n     *     renderer.render(stage);\n     * });\n     *\n     * @example\n     * // Or you can just update it manually.\n     * ticker.autoStart = false;\n     * ticker.stop();\n     * function animate(time) {\n     *     ticker.update(time);\n     *     renderer.render(stage);\n     *     requestAnimationFrame(animate);\n     * }\n     * animate(performance.now());\n     *\n     * @member {PIXI.Ticker}\n     * @static\n     */\n    static get shared()\n    {\n        if (!Ticker._shared)\n        {\n            const shared = Ticker._shared = new Ticker();\n\n            shared.autoStart = true;\n            shared._protected = true;\n        }\n\n        return Ticker._shared;\n    }\n\n    /**\n     * The system ticker instance used by {@link PIXI.interaction.InteractionManager} and by\n     * {@link PIXI.BasePrepare} for core timing functionality that shouldn't usually need to be paused,\n     * unlike the `shared` ticker which drives visual animations and rendering which may want to be paused.\n     *\n     * The property {@link PIXI.Ticker#autoStart} is set to `true` for this instance.\n     *\n     * @member {PIXI.Ticker}\n     * @static\n     */\n    static get system()\n    {\n        if (!Ticker._system)\n        {\n            const system = Ticker._system = new Ticker();\n\n            system.autoStart = true;\n            system._protected = true;\n        }\n\n        return Ticker._system;\n    }\n}\n","import Ticker from './Ticker';\nimport { UPDATE_PRIORITY } from './const';\n\n/**\n * Middleware for for Application Ticker.\n *\n * @example\n * import {TickerPlugin} from '@pixi/ticker';\n * import {Application} from '@pixi/app';\n * Application.registerPlugin(TickerPlugin);\n *\n * @class\n * @memberof PIXI\n */\nexport default class TickerPlugin\n{\n    /**\n     * Initialize the plugin with scope of application instance\n     *\n     * @static\n     * @private\n     * @param {object} [options] - See application options\n     */\n    static init(options)\n    {\n        // Set default\n        options = Object.assign({\n            autoStart: true,\n            sharedTicker: false,\n        }, options);\n\n        // Create ticker setter\n        Object.defineProperty(this, 'ticker',\n            {\n                set(ticker)\n                {\n                    if (this._ticker)\n                    {\n                        this._ticker.remove(this.render, this);\n                    }\n                    this._ticker = ticker;\n                    if (ticker)\n                    {\n                        ticker.add(this.render, this, UPDATE_PRIORITY.LOW);\n                    }\n                },\n                get()\n                {\n                    return this._ticker;\n                },\n            });\n\n        /**\n         * Convenience method for stopping the render.\n         *\n         * @method PIXI.Application#stop\n         */\n        this.stop = () =>\n        {\n            this._ticker.stop();\n        };\n\n        /**\n         * Convenience method for starting the render.\n         *\n         * @method PIXI.Application#start\n         */\n        this.start = () =>\n        {\n            this._ticker.start();\n        };\n\n        /**\n         * Internal reference to the ticker.\n         *\n         * @type {PIXI.Ticker}\n         * @name _ticker\n         * @memberof PIXI.Application#\n         * @private\n         */\n        this._ticker = null;\n\n        /**\n         * Ticker for doing render updates.\n         *\n         * @type {PIXI.Ticker}\n         * @name ticker\n         * @memberof PIXI.Application#\n         * @default PIXI.Ticker.shared\n         */\n        this.ticker = options.sharedTicker ? Ticker.shared : new Ticker();\n\n        // Start the rendering\n        if (options.autoStart)\n        {\n            this.start();\n        }\n    }\n\n    /**\n     * Clean up the ticker, scoped to application.\n     *\n     * @static\n     * @private\n     */\n    static destroy()\n    {\n        if (this._ticker)\n        {\n            const oldTicker = this._ticker;\n\n            this.ticker = null;\n            oldTicker.destroy();\n        }\n    }\n}\n","import { Runner } from '@pixi/runner';\n\n/**\n * Base resource class for textures that manages validation and uploading, depending on its type.\n *\n * Uploading of a base texture to the GPU is required.\n *\n * @class\n * @memberof PIXI.resources\n */\nexport default class Resource\n{\n    /**\n     * @param {number} [width=0] Width of the resource\n     * @param {number} [height=0] Height of the resource\n     */\n    constructor(width = 0, height = 0)\n    {\n        /**\n         * Internal width of the resource\n         * @member {number}\n         * @protected\n         */\n        this._width = width;\n\n        /**\n         * Internal height of the resource\n         * @member {number}\n         * @protected\n         */\n        this._height = height;\n\n        /**\n         * If resource has been destroyed\n         * @member {boolean}\n         * @readonly\n         * @default false\n         */\n        this.destroyed = false;\n\n        /**\n         * `true` if resource is created by BaseTexture\n         * useful for doing cleanup with BaseTexture destroy\n         * and not cleaning up resources that were created\n         * externally.\n         * @member {boolean}\n         * @protected\n         */\n        this.internal = false;\n\n        /**\n         * Mini-runner for handling resize events\n         *\n         * @member {Runner}\n         * @private\n         */\n        this.onResize = new Runner('setRealSize', 2);\n\n        /**\n         * Mini-runner for handling update events\n         *\n         * @member {Runner}\n         * @private\n         */\n        this.onUpdate = new Runner('update');\n\n        /**\n         * Handle internal errors, such as loading errors\n         *\n         * @member {Runner}\n         * @private\n         */\n        this.onError = new Runner('onError', 1);\n    }\n\n    /**\n     * Bind to a parent BaseTexture\n     *\n     * @param {PIXI.BaseTexture} baseTexture - Parent texture\n     */\n    bind(baseTexture)\n    {\n        this.onResize.add(baseTexture);\n        this.onUpdate.add(baseTexture);\n        this.onError.add(baseTexture);\n\n        // Call a resize immediate if we already\n        // have the width and height of the resource\n        if (this._width || this._height)\n        {\n            this.onResize.run(this._width, this._height);\n        }\n    }\n\n    /**\n     * Unbind to a parent BaseTexture\n     *\n     * @param {PIXI.BaseTexture} baseTexture - Parent texture\n     */\n    unbind(baseTexture)\n    {\n        this.onResize.remove(baseTexture);\n        this.onUpdate.remove(baseTexture);\n        this.onError.remove(baseTexture);\n    }\n\n    /**\n     * Trigger a resize event\n     * @param {number} width X dimension\n     * @param {number} height Y dimension\n     */\n    resize(width, height)\n    {\n        if (width !== this._width || height !== this._height)\n        {\n            this._width = width;\n            this._height = height;\n            this.onResize.run(width, height);\n        }\n    }\n\n    /**\n     * Has been validated\n     * @readonly\n     * @member {boolean}\n     */\n    get valid()\n    {\n        return !!this._width && !!this._height;\n    }\n\n    /**\n     * Has been updated trigger event\n     */\n    update()\n    {\n        if (!this.destroyed)\n        {\n            this.onUpdate.run();\n        }\n    }\n\n    /**\n     * This can be overridden to start preloading a resource\n     * or do any other prepare step.\n     * @protected\n     * @return {Promise<void>} Handle the validate event\n     */\n    load()\n    {\n        return Promise.resolve();\n    }\n\n    /**\n     * The width of the resource.\n     *\n     * @member {number}\n     * @readonly\n     */\n    get width()\n    {\n        return this._width;\n    }\n\n    /**\n     * The height of the resource.\n     *\n     * @member {number}\n     * @readonly\n     */\n    get height()\n    {\n        return this._height;\n    }\n\n    /**\n     * Uploads the texture or returns false if it cant for some reason. Override this.\n     *\n     * @param {PIXI.Renderer} renderer - yeah, renderer!\n     * @param {PIXI.BaseTexture} baseTexture - the texture\n     * @param {PIXI.GLTexture} glTexture - texture instance for this webgl context\n     * @returns {boolean} true is success\n     */\n    upload(renderer, baseTexture, glTexture) // eslint-disable-line no-unused-vars\n    {\n        return false;\n    }\n\n    /**\n     * Set the style, optional to override\n     *\n     * @param {PIXI.Renderer} renderer - yeah, renderer!\n     * @param {PIXI.BaseTexture} baseTexture - the texture\n     * @param {PIXI.GLTexture} glTexture - texture instance for this webgl context\n     * @returns {boolean} `true` is success\n     */\n    style(renderer, baseTexture, glTexture) // eslint-disable-line no-unused-vars\n    {\n        return false;\n    }\n\n    /**\n     * Clean up anything, this happens when destroying is ready.\n     *\n     * @protected\n     */\n    dispose()\n    {\n        // override\n    }\n\n    /**\n     * Call when destroying resource, unbind any BaseTexture object\n     * before calling this method, as reference counts are maintained\n     * internally.\n     */\n    destroy()\n    {\n        if (!this.destroyed)\n        {\n            this.destroyed = true;\n            this.dispose();\n            this.onError.removeAll();\n            this.onError = null;\n            this.onResize.removeAll();\n            this.onResize = null;\n            this.onUpdate.removeAll();\n            this.onUpdate = null;\n        }\n    }\n}\n","import Resource from './Resource';\nimport { determineCrossOrigin } from '@pixi/utils';\n\n/**\n * Base for all the image/canvas resources\n * @class\n * @extends PIXI.resources.Resource\n * @memberof PIXI.resources\n */\nexport default class BaseImageResource extends Resource\n{\n    /**\n     * @param {HTMLImageElement|HTMLCanvasElement|HTMLVideoElement|SVGElement} source\n     */\n    constructor(source)\n    {\n        const width = source.naturalWidth || source.videoWidth || source.width;\n        const height = source.naturalHeight || source.videoHeight || source.height;\n\n        super(width, height);\n\n        /**\n         * The source element\n         * @member {HTMLImageElement|HTMLCanvasElement|HTMLVideoElement|SVGElement}\n         * @readonly\n         */\n        this.source = source;\n\n        /**\n         * If set to `true`, will force `texImage2D` over `texSubImage2D` for uploading.\n         * Certain types of media (e.g. video) using `texImage2D` is more performant.\n         * @member {boolean}\n         * @default false\n         * @private\n         */\n        this.noSubImage = false;\n    }\n\n    /**\n     * Set cross origin based detecting the url and the crossorigin\n     * @protected\n     * @param {HTMLElement} element - Element to apply crossOrigin\n     * @param {string} url - URL to check\n     * @param {boolean|string} [crossorigin=true] - Cross origin value to use\n     */\n    static crossOrigin(element, url, crossorigin)\n    {\n        if (crossorigin === undefined && url.indexOf('data:') !== 0)\n        {\n            element.crossOrigin = determineCrossOrigin(url);\n        }\n        else if (crossorigin !== false)\n        {\n            element.crossOrigin = typeof crossorigin === 'string' ? crossorigin : 'anonymous';\n        }\n    }\n\n    /**\n     * Upload the texture to the GPU.\n     * @param {PIXI.Renderer} renderer Upload to the renderer\n     * @param {PIXI.BaseTexture} baseTexture Reference to parent texture\n     * @param {PIXI.GLTexture} glTexture\n     * @param {HTMLImageElement|HTMLCanvasElement|HTMLVideoElement|SVGElement} [source] (optional)\n     * @returns {boolean} true is success\n     */\n    upload(renderer, baseTexture, glTexture, source)\n    {\n        const gl = renderer.gl;\n        const width = baseTexture.realWidth;\n        const height = baseTexture.realHeight;\n\n        source = source || this.source;\n\n        gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, baseTexture.premultiplyAlpha);\n\n        if (!this.noSubImage\n            && baseTexture.target === gl.TEXTURE_2D\n            && glTexture.width === width\n            && glTexture.height === height)\n        {\n            gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, baseTexture.format, baseTexture.type, source);\n        }\n        else\n        {\n            glTexture.width = width;\n            glTexture.height = height;\n\n            gl.texImage2D(baseTexture.target, 0, baseTexture.format, baseTexture.format, baseTexture.type, source);\n        }\n\n        return true;\n    }\n\n    /**\n     * Checks if source width/height was changed, resize can cause extra baseTexture update.\n     * Triggers one update in any case.\n     */\n    update()\n    {\n        if (this.destroyed)\n        {\n            return;\n        }\n\n        const width = this.source.naturalWidth || this.source.videoWidth || this.source.width;\n        const height = this.source.naturalHeight || this.source.videoHeight || this.source.height;\n\n        this.resize(width, height);\n\n        super.update();\n    }\n\n    /**\n     * Destroy this BaseImageResource\n     * @override\n     * @param {PIXI.BaseTexture} [fromTexture] Optional base texture\n     * @return {boolean} Destroy was successful\n     */\n    dispose()\n    {\n        this.source = null;\n    }\n}\n","import BaseImageResource from './BaseImageResource';\nimport { settings } from '@pixi/settings';\n\n/**\n * Resource type for HTMLImageElement.\n * @class\n * @extends PIXI.resources.BaseImageResource\n * @memberof PIXI.resources\n */\nexport default class ImageResource extends BaseImageResource\n{\n    /**\n     * @param {HTMLImageElement|string} source - image source or URL\n     * @param {boolean} [options.autoLoad=true] start loading process\n     * @param {boolean} [options.createBitmap=PIXI.settings.CREATE_IMAGE_BITMAP] whether its required to create\n     *        a bitmap before upload\n     * @param {boolean} [options.crossorigin=true] - Load image using cross origin\n     * @param {boolean} [options.premultiplyAlpha=true] - Premultiply image alpha in bitmap\n     */\n    constructor(source, options)\n    {\n        options = options || {};\n\n        if (!(source instanceof HTMLImageElement))\n        {\n            const imageElement = new Image();\n\n            BaseImageResource.crossOrigin(imageElement, source, options.crossorigin);\n\n            imageElement.src = source;\n            source = imageElement;\n        }\n\n        super(source);\n\n        // FireFox 68, and possibly other versions, seems like setting the HTMLImageElement#width and #height\n        // to non-zero values before its loading completes if images are in a cache.\n        // Because of this, need to set the `_width` and the `_height` to zero to avoid uploading incomplete images.\n        // Please refer to the issue #5968 (https://github.com/pixijs/pixi.js/issues/5968).\n        if (!source.complete && !!this._width && !!this._height)\n        {\n            this._width = 0;\n            this._height = 0;\n        }\n\n        /**\n         * URL of the image source\n         * @member {string}\n         */\n        this.url = source.src;\n\n        /**\n         * When process is completed\n         * @member {Promise<void>}\n         * @private\n         */\n        this._process = null;\n\n        /**\n         * If the image should be disposed after upload\n         * @member {boolean}\n         * @default false\n         */\n        this.preserveBitmap = false;\n\n        /**\n         * If capable, convert the image using createImageBitmap API\n         * @member {boolean}\n         * @default PIXI.settings.CREATE_IMAGE_BITMAP\n         */\n        this.createBitmap = (options.createBitmap !== undefined\n            ? options.createBitmap : settings.CREATE_IMAGE_BITMAP) && !!window.createImageBitmap;\n\n        /**\n         * Controls texture premultiplyAlpha field\n         * Copies from options\n         * @member {boolean|null}\n         * @readonly\n         */\n        this.premultiplyAlpha = options.premultiplyAlpha !== false;\n\n        /**\n         * The ImageBitmap element created for HTMLImageElement\n         * @member {ImageBitmap}\n         * @default null\n         */\n        this.bitmap = null;\n\n        /**\n         * Promise when loading\n         * @member {Promise<void>}\n         * @private\n         * @default null\n         */\n        this._load = null;\n\n        if (options.autoLoad !== false)\n        {\n            this.load();\n        }\n    }\n\n    /**\n     * returns a promise when image will be loaded and processed\n     *\n     * @param {boolean} [createBitmap=true] whether process image into bitmap\n     * @returns {Promise<void>}\n     */\n    load(createBitmap)\n    {\n        if (createBitmap !== undefined)\n        {\n            this.createBitmap = createBitmap;\n        }\n\n        if (this._load)\n        {\n            return this._load;\n        }\n\n        this._load = new Promise((resolve) =>\n        {\n            this.url = this.source.src;\n            const { source } = this;\n\n            const completed = () =>\n            {\n                if (this.destroyed)\n                {\n                    return;\n                }\n                source.onload = null;\n                source.onerror = null;\n\n                this.resize(source.width, source.height);\n                this._load = null;\n\n                if (this.createBitmap)\n                {\n                    resolve(this.process());\n                }\n                else\n                {\n                    resolve(this);\n                }\n            };\n\n            if (source.complete && source.src)\n            {\n                completed();\n            }\n            else\n            {\n                source.onload = completed;\n                source.onerror = (event) => this.onError.run(event);\n            }\n        });\n\n        return this._load;\n    }\n\n    /**\n     * Called when we need to convert image into BitmapImage.\n     * Can be called multiple times, real promise is cached inside.\n     *\n     * @returns {Promise<void>} cached promise to fill that bitmap\n     */\n    process()\n    {\n        if (this._process !== null)\n        {\n            return this._process;\n        }\n        if (this.bitmap !== null || !window.createImageBitmap)\n        {\n            return Promise.resolve(this);\n        }\n\n        this._process = window.createImageBitmap(this.source,\n            0, 0, this.source.width, this.source.height,\n            {\n                premultiplyAlpha: this.premultiplyAlpha ? 'premultiply' : 'none',\n            })\n            .then((bitmap) =>\n            {\n                if (this.destroyed)\n                {\n                    return Promise.reject();\n                }\n                this.bitmap = bitmap;\n                this.update();\n                this._process = null;\n\n                return Promise.resolve(this);\n            });\n\n        return this._process;\n    }\n\n    /**\n     * Upload the image resource to GPU.\n     *\n     * @param {PIXI.Renderer} renderer - Renderer to upload to\n     * @param {PIXI.BaseTexture} baseTexture - BaseTexture for this resource\n     * @param {PIXI.GLTexture} glTexture - GLTexture to use\n     * @returns {boolean} true is success\n     */\n    upload(renderer, baseTexture, glTexture)\n    {\n        baseTexture.premultiplyAlpha = this.premultiplyAlpha;\n\n        if (!this.createBitmap)\n        {\n            return super.upload(renderer, baseTexture, glTexture);\n        }\n        if (!this.bitmap)\n        {\n            // yeah, ignore the output\n            this.process();\n            if (!this.bitmap)\n            {\n                return false;\n            }\n        }\n\n        super.upload(renderer, baseTexture, glTexture, this.bitmap);\n\n        if (!this.preserveBitmap)\n        {\n            // checks if there are other renderers that possibly need this bitmap\n\n            let flag = true;\n\n            for (const key in baseTexture._glTextures)\n            {\n                const otherTex = baseTexture._glTextures[key];\n\n                if (otherTex !== glTexture && otherTex.dirtyId !== baseTexture.dirtyId)\n                {\n                    flag = false;\n                    break;\n                }\n            }\n\n            if (flag)\n            {\n                if (this.bitmap.close)\n                {\n                    this.bitmap.close();\n                }\n\n                this.bitmap = null;\n            }\n        }\n\n        return true;\n    }\n\n    /**\n     * Destroys this texture\n     * @override\n     */\n    dispose()\n    {\n        this.source.onload = null;\n        this.source.onerror = null;\n\n        super.dispose();\n\n        if (this.bitmap)\n        {\n            this.bitmap.close();\n            this.bitmap = null;\n        }\n        this._process = null;\n        this._load = null;\n    }\n}\n","import ImageResource from './ImageResource';\n\n/**\n * Collection of installed resource types, class must extend {@link PIXI.resources.Resource}.\n * @example\n * class CustomResource extends PIXI.resources.Resource {\n *   // MUST have source, options constructor signature\n *   // for auto-detected resources to be created.\n *   constructor(source, options) {\n *     super();\n *   }\n *   upload(renderer, baseTexture, glTexture) {\n *     // upload with GL\n *     return true;\n *   }\n *   // used to auto-detect resource\n *   static test(source, extension) {\n *     return extension === 'xyz'|| source instanceof SomeClass;\n *   }\n * }\n * // Install the new resource type\n * PIXI.resources.INSTALLED.push(CustomResource);\n *\n * @name PIXI.resources.INSTALLED\n * @type {Array<*>}\n * @static\n * @readonly\n */\nexport const INSTALLED = [];\n\n/**\n * Create a resource element from a single source element. This\n * auto-detects which type of resource to create. All resources that\n * are auto-detectable must have a static `test` method and a constructor\n * with the arguments `(source, options?)`. Currently, the supported\n * resources for auto-detection include:\n *  - {@link PIXI.resources.ImageResource}\n *  - {@link PIXI.resources.CanvasResource}\n *  - {@link PIXI.resources.VideoResource}\n *  - {@link PIXI.resources.SVGResource}\n *  - {@link PIXI.resources.BufferResource}\n * @static\n * @function PIXI.resources.autoDetectResource\n * @param {string|*} source - Resource source, this can be the URL to the resource,\n *        a typed-array (for BufferResource), HTMLVideoElement, SVG data-uri\n *        or any other resource that can be auto-detected. If not resource is\n *        detected, it's assumed to be an ImageResource.\n * @param {object} [options] - Pass-through options to use for Resource\n * @param {number} [options.width] - Width of BufferResource or SVG rasterization\n * @param {number} [options.height] - Height of BufferResource or SVG rasterization\n * @param {boolean} [options.autoLoad=true] - Image, SVG and Video flag to start loading\n * @param {number} [options.scale=1] - SVG source scale. Overridden by width, height\n * @param {boolean} [options.createBitmap=PIXI.settings.CREATE_IMAGE_BITMAP] - Image option to create Bitmap object\n * @param {boolean} [options.crossorigin=true] - Image and Video option to set crossOrigin\n * @param {boolean} [options.autoPlay=true] - Video option to start playing video immediately\n * @param {number} [options.updateFPS=0] - Video option to update how many times a second the\n *        texture should be updated from the video. Leave at 0 to update at every render\n * @return {PIXI.resources.Resource} The created resource.\n */\nexport function autoDetectResource(source, options)\n{\n    if (!source)\n    {\n        return null;\n    }\n\n    let extension = '';\n\n    if (typeof source === 'string')\n    {\n        // search for file extension: period, 3-4 chars, then ?, # or EOL\n        const result = (/\\.(\\w{3,4})(?:$|\\?|#)/i).exec(source);\n\n        if (result)\n        {\n            extension = result[1].toLowerCase();\n        }\n    }\n\n    for (let i = INSTALLED.length - 1; i >= 0; --i)\n    {\n        const ResourcePlugin = INSTALLED[i];\n\n        if (ResourcePlugin.test && ResourcePlugin.test(source, extension))\n        {\n            return new ResourcePlugin(source, options);\n        }\n    }\n\n    // When in doubt: probably an image\n    // might be appropriate to throw an error or return null\n    return new ImageResource(source, options);\n}\n","import Resource from './Resource';\n\n/**\n * @interface SharedArrayBuffer\n */\n\n/**\n * Buffer resource with data of typed array.\n * @class\n * @extends PIXI.resources.Resource\n * @memberof PIXI.resources\n */\nexport default class BufferResource extends Resource\n{\n    /**\n     * @param {Float32Array|Uint8Array|Uint32Array} source - Source buffer\n     * @param {object} options - Options\n     * @param {number} options.width - Width of the texture\n     * @param {number} options.height - Height of the texture\n     */\n    constructor(source, options)\n    {\n        const { width, height } = options || {};\n\n        if (!width || !height)\n        {\n            throw new Error('BufferResource width or height invalid');\n        }\n\n        super(width, height);\n\n        /**\n         * Source array\n         * Cannot be ClampedUint8Array because it cant be uploaded to WebGL\n         *\n         * @member {Float32Array|Uint8Array|Uint32Array}\n         */\n        this.data = source;\n    }\n\n    /**\n     * Upload the texture to the GPU.\n     * @param {PIXI.Renderer} renderer Upload to the renderer\n     * @param {PIXI.BaseTexture} baseTexture Reference to parent texture\n     * @param {PIXI.GLTexture} glTexture glTexture\n     * @returns {boolean} true is success\n     */\n    upload(renderer, baseTexture, glTexture)\n    {\n        const gl = renderer.gl;\n\n        gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, baseTexture.premultiplyAlpha);\n\n        if (glTexture.width === baseTexture.width && glTexture.height === baseTexture.height)\n        {\n            gl.texSubImage2D(\n                baseTexture.target,\n                0,\n                0,\n                0,\n                baseTexture.width,\n                baseTexture.height,\n                baseTexture.format,\n                baseTexture.type,\n                this.data\n            );\n        }\n        else\n        {\n            glTexture.width = baseTexture.width;\n            glTexture.height = baseTexture.height;\n\n            gl.texImage2D(\n                baseTexture.target,\n                0,\n                glTexture.internalFormat,\n                baseTexture.width,\n                baseTexture.height,\n                0,\n                baseTexture.format,\n                glTexture.type,\n                this.data\n            );\n        }\n\n        return true;\n    }\n\n    /**\n     * Destroy and don't use after this\n     * @override\n     */\n    dispose()\n    {\n        this.data = null;\n    }\n\n    /**\n     * Used to auto-detect the type of resource.\n     *\n     * @static\n     * @param {*} source - The source object\n     * @return {boolean} `true` if <canvas>\n     */\n    static test(source)\n    {\n        return source instanceof Float32Array\n            || source instanceof Uint8Array\n            || source instanceof Uint32Array;\n    }\n}\n","import { BaseTextureCache, EventEmitter, isPow2, TextureCache, uid } from '@pixi/utils';\nimport { FORMATS, SCALE_MODES, TARGETS, TYPES } from '@pixi/constants';\n\nimport Resource from './resources/Resource';\nimport BufferResource from './resources/BufferResource';\nimport { autoDetectResource } from './resources/autoDetectResource';\n\nimport { settings } from '@pixi/settings';\n\nconst defaultBufferOptions = {\n    scaleMode: SCALE_MODES.NEAREST,\n    format: FORMATS.RGBA,\n    premultiplyAlpha: false,\n};\n\n/**\n * A Texture stores the information that represents an image.\n * All textures have a base texture, which contains information about the source.\n * Therefore you can have many textures all using a single BaseTexture\n *\n * @class\n * @extends PIXI.utils.EventEmitter\n * @memberof PIXI\n * @param {PIXI.resources.Resource|string|HTMLImageElement|HTMLCanvasElement|HTMLVideoElement} [resource=null]\n *        The current resource to use, for things that aren't Resource objects, will be converted\n *        into a Resource.\n * @param {Object} [options] - Collection of options\n * @param {PIXI.MIPMAP_MODES} [options.mipmap=PIXI.settings.MIPMAP_TEXTURES] - If mipmapping is enabled for texture\n * @param {number} [options.anisotropicLevel=PIXI.settings.ANISOTROPIC_LEVEL] - Anisotropic filtering level of texture\n * @param {PIXI.WRAP_MODES} [options.wrapMode=PIXI.settings.WRAP_MODE] - Wrap mode for textures\n * @param {PIXI.SCALE_MODES} [options.scaleMode=PIXI.settings.SCALE_MODE] - Default scale mode, linear, nearest\n * @param {PIXI.FORMATS} [options.format=PIXI.FORMATS.RGBA] - GL format type\n * @param {PIXI.TYPES} [options.type=PIXI.TYPES.UNSIGNED_BYTE] - GL data type\n * @param {PIXI.TARGETS} [options.target=PIXI.TARGETS.TEXTURE_2D] - GL texture target\n * @param {boolean} [options.premultiplyAlpha=true] - Pre multiply the image alpha\n * @param {number} [options.width=0] - Width of the texture\n * @param {number} [options.height=0] - Height of the texture\n * @param {number} [options.resolution] - Resolution of the base texture\n * @param {object} [options.resourceOptions] - Optional resource options,\n *        see {@link PIXI.resources.autoDetectResource autoDetectResource}\n */\nexport default class BaseTexture extends EventEmitter\n{\n    constructor(resource = null, options = null)\n    {\n        super();\n\n        options = options || {};\n\n        const { premultiplyAlpha, mipmap, anisotropicLevel, scaleMode, width, height,\n            wrapMode, format, type, target, resolution, resourceOptions } = options;\n\n        // Convert the resource to a Resource object\n        if (resource && !(resource instanceof Resource))\n        {\n            resource = autoDetectResource(resource, resourceOptions);\n            resource.internal = true;\n        }\n\n        /**\n         * The width of the base texture set when the image has loaded\n         *\n         * @readonly\n         * @member {number}\n         */\n        this.width = width || 0;\n\n        /**\n         * The height of the base texture set when the image has loaded\n         *\n         * @readonly\n         * @member {number}\n         */\n        this.height = height || 0;\n\n        /**\n         * The resolution / device pixel ratio of the texture\n         *\n         * @member {number}\n         * @default PIXI.settings.RESOLUTION\n         */\n        this.resolution = resolution || settings.RESOLUTION;\n\n        /**\n         * Mipmap mode of the texture, affects downscaled images\n         *\n         * @member {PIXI.MIPMAP_MODES}\n         * @default PIXI.settings.MIPMAP_TEXTURES\n         */\n        this.mipmap = mipmap !== undefined ? mipmap : settings.MIPMAP_TEXTURES;\n\n        /**\n         * Anisotropic filtering level of texture\n         *\n         * @member {number}\n         * @default PIXI.settings.ANISOTROPIC_LEVEL\n         */\n        this.anisotropicLevel = anisotropicLevel !== undefined ? anisotropicLevel : settings.ANISOTROPIC_LEVEL;\n\n        /**\n         * How the texture wraps\n         * @member {number}\n         */\n        this.wrapMode = wrapMode || settings.WRAP_MODE;\n\n        /**\n         * The scale mode to apply when scaling this texture\n         *\n         * @member {PIXI.SCALE_MODES}\n         * @default PIXI.settings.SCALE_MODE\n         */\n        this.scaleMode = scaleMode !== undefined ? scaleMode : settings.SCALE_MODE;\n\n        /**\n         * The pixel format of the texture\n         *\n         * @member {PIXI.FORMATS}\n         * @default PIXI.FORMATS.RGBA\n         */\n        this.format = format || FORMATS.RGBA;\n\n        /**\n         * The type of resource data\n         *\n         * @member {PIXI.TYPES}\n         * @default PIXI.TYPES.UNSIGNED_BYTE\n         */\n        this.type = type || TYPES.UNSIGNED_BYTE;\n\n        /**\n         * The target type\n         *\n         * @member {PIXI.TARGETS}\n         * @default PIXI.TARGETS.TEXTURE_2D\n         */\n        this.target = target || TARGETS.TEXTURE_2D;\n\n        /**\n         * Set to true to enable pre-multiplied alpha\n         *\n         * @member {boolean}\n         * @default true\n         */\n        this.premultiplyAlpha = premultiplyAlpha !== false;\n\n        /**\n         * Global unique identifier for this BaseTexture\n         *\n         * @member {string}\n         * @protected\n         */\n        this.uid = uid();\n\n        /**\n         * Used by automatic texture Garbage Collection, stores last GC tick when it was bound\n         *\n         * @member {number}\n         * @protected\n         */\n        this.touched = 0;\n\n        /**\n         * Whether or not the texture is a power of two, try to use power of two textures as much\n         * as you can\n         *\n         * @readonly\n         * @member {boolean}\n         * @default false\n         */\n        this.isPowerOfTwo = false;\n        this._refreshPOT();\n\n        /**\n         * The map of render context textures where this is bound\n         *\n         * @member {Object}\n         * @private\n         */\n        this._glTextures = {};\n\n        /**\n         * Used by TextureSystem to only update texture to the GPU when needed.\n         * Please call `update()` to increment it.\n         *\n         * @readonly\n         * @member {number}\n         */\n        this.dirtyId = 0;\n\n        /**\n         * Used by TextureSystem to only update texture style when needed.\n         *\n         * @protected\n         * @member {number}\n         */\n        this.dirtyStyleId = 0;\n\n        /**\n         * Currently default cache ID.\n         *\n         * @member {string}\n         */\n        this.cacheId = null;\n\n        /**\n         * Generally speaking means when resource is loaded.\n         * @readonly\n         * @member {boolean}\n         */\n        this.valid = width > 0 && height > 0;\n\n        /**\n         * The collection of alternative cache ids, since some BaseTextures\n         * can have more than one ID, short name and longer full URL\n         *\n         * @member {Array<string>}\n         * @readonly\n         */\n        this.textureCacheIds = [];\n\n        /**\n         * Flag if BaseTexture has been destroyed.\n         *\n         * @member {boolean}\n         * @readonly\n         */\n        this.destroyed = false;\n\n        /**\n         * The resource used by this BaseTexture, there can only\n         * be one resource per BaseTexture, but textures can share\n         * resources.\n         *\n         * @member {PIXI.resources.Resource}\n         * @readonly\n         */\n        this.resource = null;\n\n        /**\n         * Number of the texture batch, used by multi-texture renderers\n         *\n         * @member {number}\n         */\n        this._batchEnabled = 0;\n\n        /**\n         * Fired when a not-immediately-available source finishes loading.\n         *\n         * @protected\n         * @event PIXI.BaseTexture#loaded\n         * @param {PIXI.BaseTexture} baseTexture - Resource loaded.\n         */\n\n        /**\n         * Fired when a not-immediately-available source fails to load.\n         *\n         * @protected\n         * @event PIXI.BaseTexture#error\n         * @param {PIXI.BaseTexture} baseTexture - Resource errored.\n         * @param {ErrorEvent} event - Load error event.\n         */\n\n        /**\n         * Fired when BaseTexture is updated.\n         *\n         * @protected\n         * @event PIXI.BaseTexture#loaded\n         * @param {PIXI.BaseTexture} baseTexture - Resource loaded.\n         */\n\n        /**\n         * Fired when BaseTexture is updated.\n         *\n         * @protected\n         * @event PIXI.BaseTexture#update\n         * @param {PIXI.BaseTexture} baseTexture - Instance of texture being updated.\n         */\n\n        /**\n         * Fired when BaseTexture is destroyed.\n         *\n         * @protected\n         * @event PIXI.BaseTexture#dispose\n         * @param {PIXI.BaseTexture} baseTexture - Instance of texture being destroyed.\n         */\n\n        // Set the resource\n        this.setResource(resource);\n    }\n\n    /**\n     * Pixel width of the source of this texture\n     *\n     * @readonly\n     * @member {number}\n     */\n    get realWidth()\n    {\n        return Math.ceil((this.width * this.resolution) - 1e-4);\n    }\n\n    /**\n     * Pixel height of the source of this texture\n     *\n     * @readonly\n     * @member {number}\n     */\n    get realHeight()\n    {\n        return Math.ceil((this.height * this.resolution) - 1e-4);\n    }\n\n    /**\n     * Changes style options of BaseTexture\n     *\n     * @param {PIXI.SCALE_MODES} [scaleMode] - Pixi scalemode\n     * @param {PIXI.MIPMAP_MODES} [mipmap] - enable mipmaps\n     * @returns {PIXI.BaseTexture} this\n     */\n    setStyle(scaleMode, mipmap)\n    {\n        let dirty;\n\n        if (scaleMode !== undefined && scaleMode !== this.scaleMode)\n        {\n            this.scaleMode = scaleMode;\n            dirty = true;\n        }\n\n        if (mipmap !== undefined && mipmap !== this.mipmap)\n        {\n            this.mipmap = mipmap;\n            dirty = true;\n        }\n\n        if (dirty)\n        {\n            this.dirtyStyleId++;\n        }\n\n        return this;\n    }\n\n    /**\n     * Changes w/h/resolution. Texture becomes valid if width and height are greater than zero.\n     *\n     * @param {number} width Visual width\n     * @param {number} height Visual height\n     * @param {number} [resolution] Optionally set resolution\n     * @returns {PIXI.BaseTexture} this\n     */\n    setSize(width, height, resolution)\n    {\n        this.resolution = resolution || this.resolution;\n        this.width = width;\n        this.height = height;\n        this._refreshPOT();\n        this.update();\n\n        return this;\n    }\n\n    /**\n     * Sets real size of baseTexture, preserves current resolution.\n     *\n     * @param {number} realWidth Full rendered width\n     * @param {number} realHeight Full rendered height\n     * @param {number} [resolution] Optionally set resolution\n     * @returns {PIXI.BaseTexture} this\n     */\n    setRealSize(realWidth, realHeight, resolution)\n    {\n        this.resolution = resolution || this.resolution;\n        this.width = realWidth / this.resolution;\n        this.height = realHeight / this.resolution;\n        this._refreshPOT();\n        this.update();\n\n        return this;\n    }\n\n    /**\n     * Refresh check for isPowerOfTwo texture based on size\n     *\n     * @private\n     */\n    _refreshPOT()\n    {\n        this.isPowerOfTwo = isPow2(this.realWidth) && isPow2(this.realHeight);\n    }\n\n    /**\n     * Changes resolution\n     *\n     * @param {number} [resolution] res\n     * @returns {PIXI.BaseTexture} this\n     */\n    setResolution(resolution)\n    {\n        const oldResolution = this.resolution;\n\n        if (oldResolution === resolution)\n        {\n            return this;\n        }\n\n        this.resolution = resolution;\n\n        if (this.valid)\n        {\n            this.width = this.width * oldResolution / resolution;\n            this.height = this.height * oldResolution / resolution;\n            this.emit('update', this);\n        }\n\n        this._refreshPOT();\n\n        return this;\n    }\n\n    /**\n     * Sets the resource if it wasn't set. Throws error if resource already present\n     *\n     * @param {PIXI.resources.Resource} resource - that is managing this BaseTexture\n     * @returns {PIXI.BaseTexture} this\n     */\n    setResource(resource)\n    {\n        if (this.resource === resource)\n        {\n            return this;\n        }\n\n        if (this.resource)\n        {\n            throw new Error('Resource can be set only once');\n        }\n\n        resource.bind(this);\n\n        this.resource = resource;\n\n        return this;\n    }\n\n    /**\n     * Invalidates the object. Texture becomes valid if width and height are greater than zero.\n     */\n    update()\n    {\n        if (!this.valid)\n        {\n            if (this.width > 0 && this.height > 0)\n            {\n                this.valid = true;\n                this.emit('loaded', this);\n                this.emit('update', this);\n            }\n        }\n        else\n        {\n            this.dirtyId++;\n            this.dirtyStyleId++;\n            this.emit('update', this);\n        }\n    }\n\n    /**\n     * Handle errors with resources.\n     * @private\n     * @param {ErrorEvent} event - Error event emitted.\n     */\n    onError(event)\n    {\n        this.emit('error', this, event);\n    }\n\n    /**\n     * Destroys this base texture.\n     * The method stops if resource doesn't want this texture to be destroyed.\n     * Removes texture from all caches.\n     */\n    destroy()\n    {\n        // remove and destroy the resource\n        if (this.resource)\n        {\n            this.resource.unbind(this);\n            // only destroy resourced created internally\n            if (this.resource.internal)\n            {\n                this.resource.destroy();\n            }\n            this.resource = null;\n        }\n\n        if (this.cacheId)\n        {\n            delete BaseTextureCache[this.cacheId];\n            delete TextureCache[this.cacheId];\n\n            this.cacheId = null;\n        }\n\n        // finally let the WebGL renderer know..\n        this.dispose();\n\n        BaseTexture.removeFromCache(this);\n        this.textureCacheIds = null;\n\n        this.destroyed = true;\n    }\n\n    /**\n     * Frees the texture from WebGL memory without destroying this texture object.\n     * This means you can still use the texture later which will upload it to GPU\n     * memory again.\n     *\n     * @fires PIXI.BaseTexture#dispose\n     */\n    dispose()\n    {\n        this.emit('dispose', this);\n    }\n\n    /**\n     * Helper function that creates a base texture based on the source you provide.\n     * The source can be - image url, image element, canvas element. If the\n     * source is an image url or an image element and not in the base texture\n     * cache, it will be created and loaded.\n     *\n     * @static\n     * @param {string|HTMLImageElement|HTMLCanvasElement|SVGElement|HTMLVideoElement} source - The\n     *        source to create base texture from.\n     * @param {object} [options] See {@link PIXI.BaseTexture}'s constructor for options.\n     * @returns {PIXI.BaseTexture} The new base texture.\n     */\n    static from(source, options)\n    {\n        let cacheId = null;\n\n        if (typeof source === 'string')\n        {\n            cacheId = source;\n        }\n        else\n        {\n            if (!source._pixiId)\n            {\n                source._pixiId = `pixiid_${uid()}`;\n            }\n\n            cacheId = source._pixiId;\n        }\n\n        let baseTexture = BaseTextureCache[cacheId];\n\n        if (!baseTexture)\n        {\n            baseTexture = new BaseTexture(source, options);\n            baseTexture.cacheId = cacheId;\n            BaseTexture.addToCache(baseTexture, cacheId);\n        }\n\n        return baseTexture;\n    }\n\n    /**\n     * Create a new BaseTexture with a BufferResource from a Float32Array.\n     * RGBA values are floats from 0 to 1.\n     * @static\n     * @param {Float32Array|Uint8Array} buffer The optional array to use, if no data\n     *        is provided, a new Float32Array is created.\n     * @param {number} width - Width of the resource\n     * @param {number} height - Height of the resource\n     * @param {object} [options] See {@link PIXI.BaseTexture}'s constructor for options.\n     * @return {PIXI.BaseTexture} The resulting new BaseTexture\n     */\n    static fromBuffer(buffer, width, height, options)\n    {\n        buffer = buffer || new Float32Array(width * height * 4);\n\n        const resource = new BufferResource(buffer, { width, height });\n        const type = buffer instanceof Float32Array ? TYPES.FLOAT : TYPES.UNSIGNED_BYTE;\n\n        return new BaseTexture(resource, Object.assign(defaultBufferOptions, options || { width, height, type }));\n    }\n\n    /**\n     * Adds a BaseTexture to the global BaseTextureCache. This cache is shared across the whole PIXI object.\n     *\n     * @static\n     * @param {PIXI.BaseTexture} baseTexture - The BaseTexture to add to the cache.\n     * @param {string} id - The id that the BaseTexture will be stored against.\n     */\n    static addToCache(baseTexture, id)\n    {\n        if (id)\n        {\n            if (baseTexture.textureCacheIds.indexOf(id) === -1)\n            {\n                baseTexture.textureCacheIds.push(id);\n            }\n\n            if (BaseTextureCache[id])\n            {\n                // eslint-disable-next-line no-console\n                console.warn(`BaseTexture added to the cache with an id [${id}] that already had an entry`);\n            }\n\n            BaseTextureCache[id] = baseTexture;\n        }\n    }\n\n    /**\n     * Remove a BaseTexture from the global BaseTextureCache.\n     *\n     * @static\n     * @param {string|PIXI.BaseTexture} baseTexture - id of a BaseTexture to be removed, or a BaseTexture instance itself.\n     * @return {PIXI.BaseTexture|null} The BaseTexture that was removed.\n     */\n    static removeFromCache(baseTexture)\n    {\n        if (typeof baseTexture === 'string')\n        {\n            const baseTextureFromCache = BaseTextureCache[baseTexture];\n\n            if (baseTextureFromCache)\n            {\n                const index = baseTextureFromCache.textureCacheIds.indexOf(baseTexture);\n\n                if (index > -1)\n                {\n                    baseTextureFromCache.textureCacheIds.splice(index, 1);\n                }\n\n                delete BaseTextureCache[baseTexture];\n\n                return baseTextureFromCache;\n            }\n        }\n        else if (baseTexture && baseTexture.textureCacheIds)\n        {\n            for (let i = 0; i < baseTexture.textureCacheIds.length; ++i)\n            {\n                delete BaseTextureCache[baseTexture.textureCacheIds[i]];\n            }\n\n            baseTexture.textureCacheIds.length = 0;\n\n            return baseTexture;\n        }\n\n        return null;\n    }\n}\n\n/**\n * Global number of the texture batch, used by multi-texture renderers\n *\n * @static\n * @member {number}\n */\nBaseTexture._globalBatch = 0;\n","import Resource from './Resource';\nimport BaseTexture from '../BaseTexture';\nimport { TARGETS } from '@pixi/constants';\nimport { autoDetectResource } from './autoDetectResource';\n\n/**\n * A resource that contains a number of sources.\n *\n * @class\n * @extends PIXI.resources.Resource\n * @memberof PIXI.resources\n * @param {number|Array<*>} source - Number of items in array or the collection\n *        of image URLs to use. Can also be resources, image elements, canvas, etc.\n * @param {object} [options] Options to apply to {@link PIXI.resources.autoDetectResource}\n * @param {number} [options.width] - Width of the resource\n * @param {number} [options.height] - Height of the resource\n */\nexport default class ArrayResource extends Resource\n{\n    constructor(source, options)\n    {\n        options = options || {};\n\n        let urls;\n        let length = source;\n\n        if (Array.isArray(source))\n        {\n            urls = source;\n            length = source.length;\n        }\n\n        super(options.width, options.height);\n\n        /**\n         * Collection of resources.\n         * @member {Array<PIXI.BaseTexture>}\n         * @readonly\n         */\n        this.items = [];\n\n        /**\n         * Dirty IDs for each part\n         * @member {Array<number>}\n         * @readonly\n         */\n        this.itemDirtyIds = [];\n\n        for (let i = 0; i < length; i++)\n        {\n            const partTexture = new BaseTexture();\n\n            this.items.push(partTexture);\n            this.itemDirtyIds.push(-1);\n        }\n\n        /**\n         * Number of elements in array\n         *\n         * @member {number}\n         * @readonly\n         */\n        this.length = length;\n\n        /**\n         * Promise when loading\n         * @member {Promise}\n         * @private\n         * @default null\n         */\n        this._load = null;\n\n        if (urls)\n        {\n            for (let i = 0; i < length; i++)\n            {\n                this.addResourceAt(autoDetectResource(urls[i], options), i);\n            }\n        }\n    }\n\n    /**\n     * Destroy this BaseImageResource\n     * @override\n     */\n    dispose()\n    {\n        for (let i = 0, len = this.length; i < len; i++)\n        {\n            this.items[i].destroy();\n        }\n        this.items = null;\n        this.itemDirtyIds = null;\n        this._load = null;\n    }\n\n    /**\n     * Set a resource by ID\n     *\n     * @param {PIXI.resources.Resource} resource\n     * @param {number} index - Zero-based index of resource to set\n     * @return {PIXI.resources.ArrayResource} Instance for chaining\n     */\n    addResourceAt(resource, index)\n    {\n        const baseTexture = this.items[index];\n\n        if (!baseTexture)\n        {\n            throw new Error(`Index ${index} is out of bounds`);\n        }\n\n        // Inherit the first resource dimensions\n        if (resource.valid && !this.valid)\n        {\n            this.resize(resource.width, resource.height);\n        }\n\n        this.items[index].setResource(resource);\n\n        return this;\n    }\n\n    /**\n     * Set the parent base texture\n     * @member {PIXI.BaseTexture}\n     * @override\n     */\n    bind(baseTexture)\n    {\n        super.bind(baseTexture);\n\n        baseTexture.target = TARGETS.TEXTURE_2D_ARRAY;\n\n        for (let i = 0; i < this.length; i++)\n        {\n            this.items[i].on('update', baseTexture.update, baseTexture);\n        }\n    }\n\n    /**\n     * Unset the parent base texture\n     * @member {PIXI.BaseTexture}\n     * @override\n     */\n    unbind(baseTexture)\n    {\n        super.unbind(baseTexture);\n\n        for (let i = 0; i < this.length; i++)\n        {\n            this.items[i].off('update', baseTexture.update, baseTexture);\n        }\n    }\n\n    /**\n     * Load all the resources simultaneously\n     * @override\n     * @return {Promise<void>} When load is resolved\n     */\n    load()\n    {\n        if (this._load)\n        {\n            return this._load;\n        }\n\n        const resources = this.items.map((item) => item.resource);\n\n        // TODO: also implement load part-by-part strategy\n        const promises = resources.map((item) => item.load());\n\n        this._load = Promise.all(promises)\n            .then(() =>\n            {\n                const { width, height } = resources[0];\n\n                this.resize(width, height);\n\n                return Promise.resolve(this);\n            }\n            );\n\n        return this._load;\n    }\n\n    /**\n     * Upload the resources to the GPU.\n     * @param {PIXI.Renderer} renderer\n     * @param {PIXI.BaseTexture} texture\n     * @param {PIXI.GLTexture} glTexture\n     * @returns {boolean} whether texture was uploaded\n     */\n    upload(renderer, texture, glTexture)\n    {\n        const { length, itemDirtyIds, items } = this;\n        const { gl } = renderer;\n\n        if (glTexture.dirtyId < 0)\n        {\n            gl.texImage3D(\n                gl.TEXTURE_2D_ARRAY,\n                0,\n                texture.format,\n                this._width,\n                this._height,\n                length,\n                0,\n                texture.format,\n                texture.type,\n                null\n            );\n        }\n\n        for (let i = 0; i < length; i++)\n        {\n            const item = items[i];\n\n            if (itemDirtyIds[i] < item.dirtyId)\n            {\n                itemDirtyIds[i] = item.dirtyId;\n                if (item.valid)\n                {\n                    gl.texSubImage3D(\n                        gl.TEXTURE_2D_ARRAY,\n                        0,\n                        0, // xoffset\n                        0, // yoffset\n                        i, // zoffset\n                        item.resource.width,\n                        item.resource.height,\n                        1,\n                        texture.format,\n                        texture.type,\n                        item.resource.source\n                    );\n                }\n            }\n        }\n\n        return true;\n    }\n}\n","import BaseImageResource from './BaseImageResource';\n\n/**\n * @interface OffscreenCanvas\n */\n\n/**\n * Resource type for HTMLCanvasElement.\n * @class\n * @extends PIXI.resources.BaseImageResource\n * @memberof PIXI.resources\n * @param {HTMLCanvasElement} source - Canvas element to use\n */\nexport default class CanvasResource extends BaseImageResource\n{\n    /**\n     * Used to auto-detect the type of resource.\n     *\n     * @static\n     * @param {HTMLCanvasElement|OffscreenCanvas} source - The source object\n     * @return {boolean} `true` if source is HTMLCanvasElement or OffscreenCanvas\n     */\n    static test(source)\n    {\n        const { OffscreenCanvas } = window;\n\n        // Check for browsers that don't yet support OffscreenCanvas\n        if (OffscreenCanvas && source instanceof OffscreenCanvas)\n        {\n            return true;\n        }\n\n        return source instanceof HTMLCanvasElement;\n    }\n}\n","import ArrayResource from './ArrayResource';\nimport { TARGETS } from '@pixi/constants';\n\n/**\n * Resource for a CubeTexture which contains six resources.\n *\n * @class\n * @extends PIXI.resources.ArrayResource\n * @memberof PIXI.resources\n * @param {Array<string|PIXI.resources.Resource>} [source] Collection of URLs or resources\n *        to use as the sides of the cube.\n * @param {object} [options] - ImageResource options\n * @param {number} [options.width] - Width of resource\n * @param {number} [options.height] - Height of resource\n */\nexport default class CubeResource extends ArrayResource\n{\n    constructor(source, options)\n    {\n        options = options || {};\n\n        super(source, options);\n\n        if (this.length !== CubeResource.SIDES)\n        {\n            throw new Error(`Invalid length. Got ${this.length}, expected 6`);\n        }\n\n        for (let i = 0; i < CubeResource.SIDES; i++)\n        {\n            this.items[i].target = TARGETS.TEXTURE_CUBE_MAP_POSITIVE_X + i;\n        }\n\n        if (options.autoLoad !== false)\n        {\n            this.load();\n        }\n    }\n\n    /**\n     * Add binding\n     *\n     * @override\n     * @param {PIXI.BaseTexture} baseTexture - parent base texture\n     */\n    bind(baseTexture)\n    {\n        super.bind(baseTexture);\n\n        baseTexture.target = TARGETS.TEXTURE_CUBE_MAP;\n    }\n\n    /**\n     * Upload the resource\n     *\n     * @returns {boolean} true is success\n     */\n    upload(renderer, baseTexture, glTexture)\n    {\n        const dirty = this.itemDirtyIds;\n\n        for (let i = 0; i < CubeResource.SIDES; i++)\n        {\n            const side = this.items[i];\n\n            if (dirty[i] < side.dirtyId)\n            {\n                dirty[i] = side.dirtyId;\n                if (side.valid)\n                {\n                    side.resource.upload(renderer, side, glTexture);\n                }\n                else\n                {\n                    // TODO: upload zero buffer\n                }\n            }\n        }\n\n        return true;\n    }\n}\n\n/**\n * Number of texture sides to store for CubeResources\n *\n * @name PIXI.resources.CubeResource.SIDES\n * @static\n * @member {number}\n * @default 6\n */\nCubeResource.SIDES = 6;\n","import { uid } from '@pixi/utils';\nimport BaseImageResource from './BaseImageResource';\n\n/**\n * Resource type for SVG elements and graphics.\n * @class\n * @extends PIXI.resources.BaseImageResource\n * @memberof PIXI.resources\n * @param {string} source - Base64 encoded SVG element or URL for SVG file.\n * @param {object} [options] - Options to use\n * @param {number} [options.scale=1] Scale to apply to SVG. Overridden by...\n * @param {number} [options.width] Rasterize SVG this wide. Aspect ratio preserved if height not specified.\n * @param {number} [options.height] Rasterize SVG this high. Aspect ratio preserved if width not specified.\n * @param {boolean} [options.autoLoad=true] Start loading right away.\n */\nexport default class SVGResource extends BaseImageResource\n{\n    constructor(source, options)\n    {\n        options = options || {};\n\n        super(document.createElement('canvas'));\n        this._width = 0;\n        this._height = 0;\n\n        /**\n         * Base64 encoded SVG element or URL for SVG file\n         * @readonly\n         * @member {string}\n         */\n        this.svg = source;\n\n        /**\n         * The source scale to apply when rasterizing on load\n         * @readonly\n         * @member {number}\n         */\n        this.scale = options.scale || 1;\n\n        /**\n         * A width override for rasterization on load\n         * @readonly\n         * @member {number}\n         */\n        this._overrideWidth = options.width;\n\n        /**\n         * A height override for rasterization on load\n         * @readonly\n         * @member {number}\n         */\n        this._overrideHeight = options.height;\n\n        /**\n         * Call when completely loaded\n         * @private\n         * @member {function}\n         */\n        this._resolve = null;\n\n        /**\n         * Cross origin value to use\n         * @private\n         * @member {boolean|string}\n         */\n        this._crossorigin = options.crossorigin;\n\n        /**\n         * Promise when loading\n         * @member {Promise<void>}\n         * @private\n         * @default null\n         */\n        this._load = null;\n\n        if (options.autoLoad !== false)\n        {\n            this.load();\n        }\n    }\n\n    load()\n    {\n        if (this._load)\n        {\n            return this._load;\n        }\n\n        this._load = new Promise((resolve) =>\n        {\n            // Save this until after load is finished\n            this._resolve = () =>\n            {\n                this.resize(this.source.width, this.source.height);\n                resolve(this);\n            };\n\n            // Convert SVG inline string to data-uri\n            if ((/^\\<svg/).test(this.svg.trim()))\n            {\n                if (!btoa)\n                {\n                    throw new Error('Your browser doesn\\'t support base64 conversions.');\n                }\n                this.svg = `data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(this.svg)))}`;\n            }\n\n            this._loadSvg();\n        });\n\n        return this._load;\n    }\n\n    /**\n     * Loads an SVG image from `imageUrl` or `data URL`.\n     *\n     * @private\n     */\n    _loadSvg()\n    {\n        const tempImage = new Image();\n\n        BaseImageResource.crossOrigin(tempImage, this.svg, this._crossorigin);\n        tempImage.src = this.svg;\n\n        tempImage.onerror = (event) =>\n        {\n            tempImage.onerror = null;\n            this.onError.run(event);\n        };\n\n        tempImage.onload = () =>\n        {\n            const svgWidth = tempImage.width;\n            const svgHeight = tempImage.height;\n\n            if (!svgWidth || !svgHeight)\n            {\n                throw new Error('The SVG image must have width and height defined (in pixels), canvas API needs them.');\n            }\n\n            // Set render size\n            let width = svgWidth * this.scale;\n            let height = svgHeight * this.scale;\n\n            if (this._overrideWidth || this._overrideHeight)\n            {\n                width = this._overrideWidth || this._overrideHeight / svgHeight * svgWidth;\n                height = this._overrideHeight || this._overrideWidth / svgWidth * svgHeight;\n            }\n            width = Math.round(width);\n            height = Math.round(height);\n\n            // Create a canvas element\n            const canvas = this.source;\n\n            canvas.width = width;\n            canvas.height = height;\n            canvas._pixiId = `canvas_${uid()}`;\n\n            // Draw the Svg to the canvas\n            canvas\n                .getContext('2d')\n                .drawImage(tempImage, 0, 0, svgWidth, svgHeight, 0, 0, width, height);\n\n            this._resolve();\n            this._resolve = null;\n        };\n    }\n\n    /**\n     * Get size from an svg string using regexp.\n     *\n     * @method\n     * @param {string} svgString - a serialized svg element\n     * @return {PIXI.ISize} image extension\n     */\n    static getSize(svgString)\n    {\n        const sizeMatch = SVGResource.SVG_SIZE.exec(svgString);\n        const size = {};\n\n        if (sizeMatch)\n        {\n            size[sizeMatch[1]] = Math.round(parseFloat(sizeMatch[3]));\n            size[sizeMatch[5]] = Math.round(parseFloat(sizeMatch[7]));\n        }\n\n        return size;\n    }\n\n    /**\n     * Destroys this texture\n     * @override\n     */\n    dispose()\n    {\n        super.dispose();\n        this._resolve = null;\n        this._crossorigin = null;\n    }\n\n    /**\n     * Used to auto-detect the type of resource.\n     *\n     * @static\n     * @param {*} source - The source object\n     * @param {string} extension - The extension of source, if set\n     */\n    static test(source, extension)\n    {\n        // url file extension is SVG\n        return extension === 'svg'\n            // source is SVG data-uri\n            || (typeof source === 'string' && source.indexOf('data:image/svg+xml;base64') === 0)\n            // source is SVG inline\n            || (typeof source === 'string' && source.indexOf('<svg') === 0);\n    }\n}\n\n/**\n * RegExp for SVG size.\n *\n * @static\n * @constant {RegExp|string} SVG_SIZE\n * @memberof PIXI.resources.SVGResource\n * @example &lt;svg width=\"100\" height=\"100\"&gt;&lt;/svg&gt;\n */\nSVGResource.SVG_SIZE = /<svg[^>]*(?:\\s(width|height)=('|\")(\\d*(?:\\.\\d+)?)(?:px)?('|\"))[^>]*(?:\\s(width|height)=('|\")(\\d*(?:\\.\\d+)?)(?:px)?('|\"))[^>]*>/i; // eslint-disable-line max-len\n","import BaseImageResource from './BaseImageResource';\nimport { Ticker } from '@pixi/ticker';\n\n/**\n * Resource type for HTMLVideoElement.\n * @class\n * @extends PIXI.resources.BaseImageResource\n * @memberof PIXI.resources\n * @param {HTMLVideoElement|object|string|Array<string|object>} source - Video element to use.\n * @param {object} [options] - Options to use\n * @param {boolean} [options.autoLoad=true] - Start loading the video immediately\n * @param {boolean} [options.autoPlay=true] - Start playing video immediately\n * @param {number} [options.updateFPS=0] - How many times a second to update the texture from the video.\n * Leave at 0 to update at every render.\n * @param {boolean} [options.crossorigin=true] - Load image using cross origin\n */\nexport default class VideoResource extends BaseImageResource\n{\n    constructor(source, options)\n    {\n        options = options || {};\n\n        if (!(source instanceof HTMLVideoElement))\n        {\n            const videoElement = document.createElement('video');\n\n            // workaround for https://github.com/pixijs/pixi.js/issues/5996\n            videoElement.setAttribute('preload', 'auto');\n            videoElement.setAttribute('webkit-playsinline', '');\n            videoElement.setAttribute('playsinline', '');\n\n            if (typeof source === 'string')\n            {\n                source = [source];\n            }\n\n            BaseImageResource.crossOrigin(videoElement, (source[0].src || source[0]), options.crossorigin);\n\n            // array of objects or strings\n            for (let i = 0; i < source.length; ++i)\n            {\n                const sourceElement = document.createElement('source');\n\n                let { src, mime } = source[i];\n\n                src = src || source[i];\n\n                const baseSrc = src.split('?').shift().toLowerCase();\n                const ext = baseSrc.substr(baseSrc.lastIndexOf('.') + 1);\n\n                mime = mime || `video/${ext}`;\n\n                sourceElement.src = src;\n                sourceElement.type = mime;\n\n                videoElement.appendChild(sourceElement);\n            }\n\n            // Override the source\n            source = videoElement;\n        }\n\n        super(source);\n\n        this.noSubImage = true;\n        this._autoUpdate = true;\n        this._isAutoUpdating = false;\n        this._updateFPS = options.updateFPS || 0;\n        this._msToNextUpdate = 0;\n\n        /**\n         * When set to true will automatically play videos used by this texture once\n         * they are loaded. If false, it will not modify the playing state.\n         *\n         * @member {boolean}\n         * @default true\n         */\n        this.autoPlay = options.autoPlay !== false;\n\n        /**\n         * Promise when loading\n         * @member {Promise<void>}\n         * @private\n         * @default null\n         */\n        this._load = null;\n\n        /**\n         * Callback when completed with load.\n         * @member {function}\n         * @private\n         */\n        this._resolve = null;\n\n        // Bind for listeners\n        this._onCanPlay = this._onCanPlay.bind(this);\n        this._onError = this._onError.bind(this);\n\n        if (options.autoLoad !== false)\n        {\n            this.load();\n        }\n    }\n\n    /**\n     * Trigger updating of the texture\n     *\n     * @param {number} [deltaTime=0] - time delta since last tick\n     */\n    update(deltaTime = 0)\n    {\n        if (!this.destroyed)\n        {\n            // account for if video has had its playbackRate changed\n            const elapsedMS = Ticker.shared.elapsedMS * this.source.playbackRate;\n\n            this._msToNextUpdate = Math.floor(this._msToNextUpdate - elapsedMS);\n            if (!this._updateFPS || this._msToNextUpdate <= 0)\n            {\n                super.update(deltaTime);\n                this._msToNextUpdate = this._updateFPS ? Math.floor(1000 / this._updateFPS) : 0;\n            }\n        }\n    }\n\n    /**\n     * Start preloading the video resource.\n     *\n     * @protected\n     * @return {Promise<void>} Handle the validate event\n     */\n    load()\n    {\n        if (this._load)\n        {\n            return this._load;\n        }\n\n        const source = this.source;\n\n        if ((source.readyState === source.HAVE_ENOUGH_DATA || source.readyState === source.HAVE_FUTURE_DATA)\n            && source.width && source.height)\n        {\n            source.complete = true;\n        }\n\n        source.addEventListener('play', this._onPlayStart.bind(this));\n        source.addEventListener('pause', this._onPlayStop.bind(this));\n\n        if (!this._isSourceReady())\n        {\n            source.addEventListener('canplay', this._onCanPlay);\n            source.addEventListener('canplaythrough', this._onCanPlay);\n            source.addEventListener('error', this._onError, true);\n        }\n        else\n        {\n            this._onCanPlay();\n        }\n\n        this._load = new Promise((resolve) =>\n        {\n            if (this.valid)\n            {\n                resolve(this);\n            }\n            else\n            {\n                this._resolve = resolve;\n\n                source.load();\n            }\n        });\n\n        return this._load;\n    }\n\n    /**\n     * Handle video error events.\n     *\n     * @private\n     */\n    _onError()\n    {\n        this.source.removeEventListener('error', this._onError, true);\n        this.onError.run(event);\n    }\n\n    /**\n     * Returns true if the underlying source is playing.\n     *\n     * @private\n     * @return {boolean} True if playing.\n     */\n    _isSourcePlaying()\n    {\n        const source = this.source;\n\n        return (source.currentTime > 0 && source.paused === false && source.ended === false && source.readyState > 2);\n    }\n\n    /**\n     * Returns true if the underlying source is ready for playing.\n     *\n     * @private\n     * @return {boolean} True if ready.\n     */\n    _isSourceReady()\n    {\n        return this.source.readyState === 3 || this.source.readyState === 4;\n    }\n\n    /**\n     * Runs the update loop when the video is ready to play\n     *\n     * @private\n     */\n    _onPlayStart()\n    {\n        // Just in case the video has not received its can play even yet..\n        if (!this.valid)\n        {\n            this._onCanPlay();\n        }\n\n        if (!this._isAutoUpdating && this.autoUpdate)\n        {\n            Ticker.shared.add(this.update, this);\n            this._isAutoUpdating = true;\n        }\n    }\n\n    /**\n     * Fired when a pause event is triggered, stops the update loop\n     *\n     * @private\n     */\n    _onPlayStop()\n    {\n        if (this._isAutoUpdating)\n        {\n            Ticker.shared.remove(this.update, this);\n            this._isAutoUpdating = false;\n        }\n    }\n\n    /**\n     * Fired when the video is loaded and ready to play\n     *\n     * @private\n     */\n    _onCanPlay()\n    {\n        const { source } = this;\n\n        source.removeEventListener('canplay', this._onCanPlay);\n        source.removeEventListener('canplaythrough', this._onCanPlay);\n\n        const valid = this.valid;\n\n        this.resize(source.videoWidth, source.videoHeight);\n\n        // prevent multiple loaded dispatches..\n        if (!valid && this._resolve)\n        {\n            this._resolve(this);\n            this._resolve = null;\n        }\n\n        if (this._isSourcePlaying())\n        {\n            this._onPlayStart();\n        }\n        else if (this.autoPlay)\n        {\n            source.play();\n        }\n    }\n\n    /**\n     * Destroys this texture\n     * @override\n     */\n    dispose()\n    {\n        if (this._isAutoUpdating)\n        {\n            Ticker.shared.remove(this.update, this);\n        }\n\n        if (this.source)\n        {\n            this.source.removeEventListener('error', this._onError, true);\n            this.source.pause();\n            this.source.src = '';\n            this.source.load();\n        }\n        super.dispose();\n    }\n\n    /**\n     * Should the base texture automatically update itself, set to true by default\n     *\n     * @member {boolean}\n     */\n    get autoUpdate()\n    {\n        return this._autoUpdate;\n    }\n\n    set autoUpdate(value) // eslint-disable-line require-jsdoc\n    {\n        if (value !== this._autoUpdate)\n        {\n            this._autoUpdate = value;\n\n            if (!this._autoUpdate && this._isAutoUpdating)\n            {\n                Ticker.shared.remove(this.update, this);\n                this._isAutoUpdating = false;\n            }\n            else if (this._autoUpdate && !this._isAutoUpdating)\n            {\n                Ticker.shared.add(this.update, this);\n                this._isAutoUpdating = true;\n            }\n        }\n    }\n\n    /**\n     * How many times a second to update the texture from the video. Leave at 0 to update at every render.\n     * A lower fps can help performance, as updating the texture at 60fps on a 30ps video may not be efficient.\n     *\n     * @member {number}\n     */\n    get updateFPS()\n    {\n        return this._updateFPS;\n    }\n\n    set updateFPS(value) // eslint-disable-line require-jsdoc\n    {\n        if (value !== this._updateFPS)\n        {\n            this._updateFPS = value;\n        }\n    }\n\n    /**\n     * Used to auto-detect the type of resource.\n     *\n     * @static\n     * @param {*} source - The source object\n     * @param {string} extension - The extension of source, if set\n     * @return {boolean} `true` if video source\n     */\n    static test(source, extension)\n    {\n        return (source instanceof HTMLVideoElement)\n            || VideoResource.TYPES.indexOf(extension) > -1;\n    }\n}\n\n/**\n * List of common video file extensions supported by VideoResource.\n * @constant\n * @member {Array<string>}\n * @static\n * @readonly\n */\nVideoResource.TYPES = ['mp4', 'm4v', 'webm', 'ogg', 'ogv', 'h264', 'avi', 'mov'];\n","import BaseImageResource from './BaseImageResource';\n\n/**\n * Resource type for ImageBitmap.\n * @class\n * @extends PIXI.resources.BaseImageResource\n * @memberof PIXI.resources\n * @param {ImageBitmap} source - Image element to use\n */\nexport default class ImageBitmapResource extends BaseImageResource\n{\n    /**\n     * Used to auto-detect the type of resource.\n     *\n     * @static\n     * @param {ImageBitmap} source - The source object\n     * @return {boolean} `true` if source is an ImageBitmap\n     */\n    static test(source)\n    {\n        return !!window.createImageBitmap && source instanceof ImageBitmap;\n    }\n}\n","import { INSTALLED, autoDetectResource } from './autoDetectResource';\nimport ArrayResource from './ArrayResource';\nimport BufferResource from './BufferResource';\nimport CanvasResource from './CanvasResource';\nimport CubeResource from './CubeResource';\nimport ImageResource from './ImageResource';\nimport SVGResource from './SVGResource';\nimport VideoResource from './VideoResource';\nimport ImageBitmapResource from './ImageBitmapResource';\n\n/**\n * Collection of base resource types supported by PixiJS.\n *\n * Resources are used by {@link PIXI.BaseTexture} to handle different media types\n * such as images, video, SVG graphics, etc. In most use-cases, you should not\n * instantiate the resources directly. The easy thing is to use\n * {@link PIXI.BaseTexture.from}.\n * @example\n * const baseTexture = PIXI.BaseTexture.from('path/to/image.jpg');\n * @namespace PIXI.resources\n */\nexport { default as Resource } from './Resource';\nexport { default as BaseImageResource } from './BaseImageResource';\n\nINSTALLED.push(\n    ImageResource,\n    ImageBitmapResource,\n    CanvasResource,\n    VideoResource,\n    SVGResource,\n    BufferResource,\n    CubeResource,\n    ArrayResource\n);\n\nexport {\n    INSTALLED,\n    autoDetectResource,\n    ArrayResource,\n    BufferResource,\n    CanvasResource,\n    CubeResource,\n    ImageResource,\n    ImageBitmapResource,\n    SVGResource,\n    VideoResource };\n","/**\n * System is a base class used for extending systems used by the {@link PIXI.Renderer}\n *\n * @see PIXI.Renderer#addSystem\n * @class\n * @memberof PIXI\n */\nexport default class System\n{\n    /**\n     * @param {PIXI.Renderer} renderer - The renderer this manager works for.\n     */\n    constructor(renderer)\n    {\n        /**\n         * The renderer this manager works for.\n         *\n         * @member {PIXI.Renderer}\n         */\n        this.renderer = renderer;\n    }\n\n    /**\n     * Generic destroy methods to be overridden by the subclass\n     */\n    destroy()\n    {\n        this.renderer = null;\n    }\n}\n","import BufferResource from './BufferResource';\n\n/**\n * Resource type for DepthTexture.\n * @class\n * @extends PIXI.resources.BufferResource\n * @memberof PIXI.resources\n */\nexport default class DepthResource extends BufferResource\n{\n    /**\n     * Upload the texture to the GPU.\n     * @param {PIXI.Renderer} renderer Upload to the renderer\n     * @param {PIXI.BaseTexture} baseTexture Reference to parent texture\n     * @param {PIXI.GLTexture} glTexture glTexture\n     * @returns {boolean} true is success\n     */\n    upload(renderer, baseTexture, glTexture)\n    {\n        const gl = renderer.gl;\n\n        gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, baseTexture.premultiplyAlpha);\n\n        if (glTexture.width === baseTexture.width && glTexture.height === baseTexture.height)\n        {\n            gl.texSubImage2D(\n                baseTexture.target,\n                0,\n                0,\n                0,\n                baseTexture.width,\n                baseTexture.height,\n                baseTexture.format,\n                baseTexture.type,\n                this.data\n            );\n        }\n        else\n        {\n            glTexture.width = baseTexture.width;\n            glTexture.height = baseTexture.height;\n\n            gl.texImage2D(\n                baseTexture.target,\n                0,\n                gl.DEPTH_COMPONENT16, // Needed for depth to render properly in webgl2.0\n                baseTexture.width,\n                baseTexture.height,\n                0,\n                baseTexture.format,\n                baseTexture.type,\n                this.data\n            );\n        }\n\n        return true;\n    }\n}\n","import { Runner } from '@pixi/runner';\nimport Texture from '../textures/BaseTexture';\nimport DepthResource from '../textures/resources/DepthResource';\nimport { FORMATS, TYPES } from '@pixi/constants';\n\n/**\n * Frame buffer used by the BaseRenderTexture\n *\n * @class\n * @memberof PIXI\n */\nexport default class Framebuffer\n{\n    /**\n     * @param {number} width - Width of the frame buffer\n     * @param {number} height - Height of the frame buffer\n     */\n    constructor(width, height)\n    {\n        this.width = Math.ceil(width || 100);\n        this.height = Math.ceil(height || 100);\n\n        this.stencil = false;\n        this.depth = false;\n\n        this.dirtyId = 0;\n        this.dirtyFormat = 0;\n        this.dirtySize = 0;\n\n        this.depthTexture = null;\n        this.colorTextures = [];\n\n        this.glFramebuffers = {};\n\n        this.disposeRunner = new Runner('disposeFramebuffer', 2);\n    }\n\n    /**\n     * Reference to the colorTexture.\n     *\n     * @member {PIXI.Texture[]}\n     * @readonly\n     */\n    get colorTexture()\n    {\n        return this.colorTextures[0];\n    }\n\n    /**\n     * Add texture to the colorTexture array\n     *\n     * @param {number} [index=0] - Index of the array to add the texture to\n     * @param {PIXI.Texture} [texture] - Texture to add to the array\n     */\n    addColorTexture(index = 0, texture)\n    {\n        // TODO add some validation to the texture - same width / height etc?\n        this.colorTextures[index] = texture || new Texture(null, { scaleMode: 0,\n            resolution: 1,\n            mipmap: false,\n            width: this.width,\n            height: this.height });// || new Texture();\n\n        this.dirtyId++;\n        this.dirtyFormat++;\n\n        return this;\n    }\n\n    /**\n     * Add a depth texture to the frame buffer\n     *\n     * @param {PIXI.Texture} [texture] - Texture to add\n     */\n    addDepthTexture(texture)\n    {\n        /* eslint-disable max-len */\n        this.depthTexture = texture || new Texture(new DepthResource(null, { width: this.width, height: this.height }), { scaleMode: 0,\n            resolution: 1,\n            width: this.width,\n            height: this.height,\n            mipmap: false,\n            format: FORMATS.DEPTH_COMPONENT,\n            type: TYPES.UNSIGNED_SHORT });// UNSIGNED_SHORT;\n        /* eslint-disable max-len */\n        this.dirtyId++;\n        this.dirtyFormat++;\n\n        return this;\n    }\n\n    /**\n     * Enable depth on the frame buffer\n     */\n    enableDepth()\n    {\n        this.depth = true;\n\n        this.dirtyId++;\n        this.dirtyFormat++;\n\n        return this;\n    }\n\n    /**\n     * Enable stencil on the frame buffer\n     */\n    enableStencil()\n    {\n        this.stencil = true;\n\n        this.dirtyId++;\n        this.dirtyFormat++;\n\n        return this;\n    }\n\n    /**\n     * Resize the frame buffer\n     *\n     * @param {number} width - Width of the frame buffer to resize to\n     * @param {number} height - Height of the frame buffer to resize to\n     */\n    resize(width, height)\n    {\n        width = Math.ceil(width);\n        height = Math.ceil(height);\n\n        if (width === this.width && height === this.height) return;\n\n        this.width = width;\n        this.height = height;\n\n        this.dirtyId++;\n        this.dirtySize++;\n\n        for (let i = 0; i < this.colorTextures.length; i++)\n        {\n            const texture = this.colorTextures[i];\n            const resolution = texture.resolution;\n\n            // take into acount the fact the texture may have a different resolution..\n            texture.setSize(width / resolution, height / resolution);\n        }\n\n        if (this.depthTexture)\n        {\n            const resolution = this.depthTexture.resolution;\n\n            this.depthTexture.setSize(width / resolution, height / resolution);\n        }\n    }\n\n    /**\n     * disposes WebGL resources that are connected to this geometry\n     */\n    dispose()\n    {\n        this.disposeRunner.run(this, false);\n    }\n}\n","import BaseTexture from '../textures/BaseTexture';\nimport Framebuffer from '../framebuffer/Framebuffer';\n\n/**\n * A BaseRenderTexture is a special texture that allows any PixiJS display object to be rendered to it.\n *\n * __Hint__: All DisplayObjects (i.e. Sprites) that render to a BaseRenderTexture should be preloaded\n * otherwise black rectangles will be drawn instead.\n *\n * A BaseRenderTexture takes a snapshot of any Display Object given to its render method. The position\n * and rotation of the given Display Objects is ignored. For example:\n *\n * ```js\n * let renderer = PIXI.autoDetectRenderer();\n * let baseRenderTexture = new PIXI.BaseRenderTexture({ width: 800, height: 600 });\n * let renderTexture = new PIXI.RenderTexture(baseRenderTexture);\n * let sprite = PIXI.Sprite.from(\"spinObj_01.png\");\n *\n * sprite.position.x = 800/2;\n * sprite.position.y = 600/2;\n * sprite.anchor.x = 0.5;\n * sprite.anchor.y = 0.5;\n *\n * renderer.render(sprite, renderTexture);\n * ```\n *\n * The Sprite in this case will be rendered using its local transform. To render this sprite at 0,0\n * you can clear the transform\n *\n * ```js\n *\n * sprite.setTransform()\n *\n * let baseRenderTexture = new PIXI.BaseRenderTexture({ width: 100, height: 100 });\n * let renderTexture = new PIXI.RenderTexture(baseRenderTexture);\n *\n * renderer.render(sprite, renderTexture);  // Renders to center of RenderTexture\n * ```\n *\n * @class\n * @extends PIXI.BaseTexture\n * @memberof PIXI\n */\nexport default class BaseRenderTexture extends BaseTexture\n{\n    /**\n     * @param {object} [options]\n     * @param {number} [options.width=100] - The width of the base render texture.\n     * @param {number} [options.height=100] - The height of the base render texture.\n     * @param {PIXI.SCALE_MODES} [options.scaleMode] - See {@link PIXI.SCALE_MODES} for possible values.\n     * @param {number} [options.resolution=1] - The resolution / device pixel ratio of the texture being generated.\n     */\n    constructor(options)\n    {\n        if (typeof options === 'number')\n        {\n            /* eslint-disable prefer-rest-params */\n            // Backward compatibility of signature\n            const width = arguments[0];\n            const height = arguments[1];\n            const scaleMode = arguments[2];\n            const resolution = arguments[3];\n\n            options = { width, height, scaleMode, resolution };\n            /* eslint-enable prefer-rest-params */\n        }\n\n        super(null, options);\n\n        const { width, height } = options || {};\n\n        // Set defaults\n        this.mipmap = false;\n        this.width = Math.ceil(width) || 100;\n        this.height = Math.ceil(height) || 100;\n        this.valid = true;\n\n        /**\n         * A reference to the canvas render target (we only need one as this can be shared across renderers)\n         *\n         * @protected\n         * @member {object}\n         */\n        this._canvasRenderTarget = null;\n\n        this.clearColor = [0, 0, 0, 0];\n\n        this.framebuffer = new Framebuffer(this.width * this.resolution, this.height * this.resolution)\n            .addColorTexture(0, this);\n\n        // TODO - could this be added the systems?\n\n        /**\n         * The data structure for the stencil masks.\n         *\n         * @member {PIXI.Graphics[]}\n         */\n        this.stencilMaskStack = [];\n\n        /**\n         * The data structure for the filters.\n         *\n         * @member {PIXI.Graphics[]}\n         */\n        this.filterStack = [{}];\n    }\n\n    /**\n     * Resizes the BaseRenderTexture.\n     *\n     * @param {number} width - The width to resize to.\n     * @param {number} height - The height to resize to.\n     */\n    resize(width, height)\n    {\n        width = Math.ceil(width);\n        height = Math.ceil(height);\n        this.framebuffer.resize(width * this.resolution, height * this.resolution);\n    }\n\n    /**\n     * Frees the texture and framebuffer from WebGL memory without destroying this texture object.\n     * This means you can still use the texture later which will upload it to GPU\n     * memory again.\n     *\n     * @fires PIXI.BaseTexture#dispose\n     */\n    dispose()\n    {\n        this.framebuffer.dispose();\n\n        super.dispose();\n    }\n\n    /**\n     * Destroys this texture.\n     *\n     */\n    destroy()\n    {\n        super.destroy(true);\n\n        this.framebuffer = null;\n    }\n}\n","import { GroupD8 } from '@pixi/math';\n\n/**\n * Stores a texture's frame in UV coordinates, in\n * which everything lies in the rectangle `[(0,0), (1,0),\n * (1,1), (0,1)]`.\n *\n * | Corner       | Coordinates |\n * |--------------|-------------|\n * | Top-Left     | `(x0,y0)`   |\n * | Top-Right    | `(x1,y1)`   |\n * | Bottom-Right | `(x2,y2)`   |\n * | Bottom-Left  | `(x3,y3)`   |\n *\n * @class\n * @protected\n * @memberof PIXI\n */\nexport default class TextureUvs\n{\n    constructor()\n    {\n        /**\n         * X-component of top-left corner `(x0,y0)`.\n         *\n         * @member {number}\n         */\n        this.x0 = 0;\n\n        /**\n         * Y-component of top-left corner `(x0,y0)`.\n         *\n         * @member {number}\n         */\n        this.y0 = 0;\n\n        /**\n         * X-component of top-right corner `(x1,y1)`.\n         *\n         * @member {number}\n         */\n        this.x1 = 1;\n\n        /**\n         * Y-component of top-right corner `(x1,y1)`.\n         *\n         * @member {number}\n         */\n        this.y1 = 0;\n\n        /**\n         * X-component of bottom-right corner `(x2,y2)`.\n         *\n         * @member {number}\n         */\n        this.x2 = 1;\n\n        /**\n         * Y-component of bottom-right corner `(x2,y2)`.\n         *\n         * @member {number}\n         */\n        this.y2 = 1;\n\n        /**\n         * X-component of bottom-left corner `(x3,y3)`.\n         *\n         * @member {number}\n         */\n        this.x3 = 0;\n\n        /**\n         * Y-component of bottom-right corner `(x3,y3)`.\n         *\n         * @member {number}\n         */\n        this.y3 = 1;\n\n        this.uvsFloat32 = new Float32Array(8);\n    }\n\n    /**\n     * Sets the texture Uvs based on the given frame information.\n     *\n     * @protected\n     * @param {PIXI.Rectangle} frame - The frame of the texture\n     * @param {PIXI.Rectangle} baseFrame - The base frame of the texture\n     * @param {number} rotate - Rotation of frame, see {@link PIXI.GroupD8}\n     */\n    set(frame, baseFrame, rotate)\n    {\n        const tw = baseFrame.width;\n        const th = baseFrame.height;\n\n        if (rotate)\n        {\n            // width and height div 2 div baseFrame size\n            const w2 = frame.width / 2 / tw;\n            const h2 = frame.height / 2 / th;\n\n            // coordinates of center\n            const cX = (frame.x / tw) + w2;\n            const cY = (frame.y / th) + h2;\n\n            rotate = GroupD8.add(rotate, GroupD8.NW); // NW is top-left corner\n            this.x0 = cX + (w2 * GroupD8.uX(rotate));\n            this.y0 = cY + (h2 * GroupD8.uY(rotate));\n\n            rotate = GroupD8.add(rotate, 2); // rotate 90 degrees clockwise\n            this.x1 = cX + (w2 * GroupD8.uX(rotate));\n            this.y1 = cY + (h2 * GroupD8.uY(rotate));\n\n            rotate = GroupD8.add(rotate, 2);\n            this.x2 = cX + (w2 * GroupD8.uX(rotate));\n            this.y2 = cY + (h2 * GroupD8.uY(rotate));\n\n            rotate = GroupD8.add(rotate, 2);\n            this.x3 = cX + (w2 * GroupD8.uX(rotate));\n            this.y3 = cY + (h2 * GroupD8.uY(rotate));\n        }\n        else\n        {\n            this.x0 = frame.x / tw;\n            this.y0 = frame.y / th;\n\n            this.x1 = (frame.x + frame.width) / tw;\n            this.y1 = frame.y / th;\n\n            this.x2 = (frame.x + frame.width) / tw;\n            this.y2 = (frame.y + frame.height) / th;\n\n            this.x3 = frame.x / tw;\n            this.y3 = (frame.y + frame.height) / th;\n        }\n\n        this.uvsFloat32[0] = this.x0;\n        this.uvsFloat32[1] = this.y0;\n        this.uvsFloat32[2] = this.x1;\n        this.uvsFloat32[3] = this.y1;\n        this.uvsFloat32[4] = this.x2;\n        this.uvsFloat32[5] = this.y2;\n        this.uvsFloat32[6] = this.x3;\n        this.uvsFloat32[7] = this.y3;\n    }\n}\n","import BaseTexture from './BaseTexture';\nimport ImageResource from './resources/ImageResource';\nimport CanvasResource from './resources/CanvasResource';\nimport TextureUvs from './TextureUvs';\nimport { settings } from '@pixi/settings';\nimport { Rectangle, Point } from '@pixi/math';\nimport { uid, TextureCache, getResolutionOfUrl, EventEmitter } from '@pixi/utils';\n\nconst DEFAULT_UVS = new TextureUvs();\n\n/**\n * A texture stores the information that represents an image or part of an image.\n *\n * It cannot be added to the display list directly; instead use it as the texture for a Sprite.\n * If no frame is provided for a texture, then the whole image is used.\n *\n * You can directly create a texture from an image and then reuse it multiple times like this :\n *\n * ```js\n * let texture = PIXI.Texture.from('assets/image.png');\n * let sprite1 = new PIXI.Sprite(texture);\n * let sprite2 = new PIXI.Sprite(texture);\n * ```\n *\n * If you didnt pass the texture frame to constructor, it enables `noFrame` mode:\n * it subscribes on baseTexture events, it automatically resizes at the same time as baseTexture.\n *\n * Textures made from SVGs, loaded or not, cannot be used before the file finishes processing.\n * You can check for this by checking the sprite's _textureID property.\n * ```js\n * var texture = PIXI.Texture.from('assets/image.svg');\n * var sprite1 = new PIXI.Sprite(texture);\n * //sprite1._textureID should not be undefined if the texture has finished processing the SVG file\n * ```\n * You can use a ticker or rAF to ensure your sprites load the finished textures after processing. See issue #3068.\n *\n * @class\n * @extends PIXI.utils.EventEmitter\n * @memberof PIXI\n */\nexport default class Texture extends EventEmitter\n{\n    /**\n     * @param {PIXI.BaseTexture} baseTexture - The base texture source to create the texture from\n     * @param {PIXI.Rectangle} [frame] - The rectangle frame of the texture to show\n     * @param {PIXI.Rectangle} [orig] - The area of original texture\n     * @param {PIXI.Rectangle} [trim] - Trimmed rectangle of original texture\n     * @param {number} [rotate] - indicates how the texture was rotated by texture packer. See {@link PIXI.GroupD8}\n     * @param {PIXI.Point} [anchor] - Default anchor point used for sprite placement / rotation\n     */\n    constructor(baseTexture, frame, orig, trim, rotate, anchor)\n    {\n        super();\n\n        /**\n         * Does this Texture have any frame data assigned to it?\n         *\n         * This mode is enabled automatically if no frame was passed inside constructor.\n         *\n         * In this mode texture is subscribed to baseTexture events, and fires `update` on any change.\n         *\n         * Beware, after loading or resize of baseTexture event can fired two times!\n         * If you want more control, subscribe on baseTexture itself.\n         *\n         * ```js\n         * texture.on('update', () => {});\n         * ```\n         *\n         * Any assignment of `frame` switches off `noFrame` mode.\n         *\n         * @member {boolean}\n         */\n        this.noFrame = false;\n\n        if (!frame)\n        {\n            this.noFrame = true;\n            frame = new Rectangle(0, 0, 1, 1);\n        }\n\n        if (baseTexture instanceof Texture)\n        {\n            baseTexture = baseTexture.baseTexture;\n        }\n\n        /**\n         * The base texture that this texture uses.\n         *\n         * @member {PIXI.BaseTexture}\n         */\n        this.baseTexture = baseTexture;\n\n        /**\n         * This is the area of the BaseTexture image to actually copy to the Canvas / WebGL when rendering,\n         * irrespective of the actual frame size or placement (which can be influenced by trimmed texture atlases)\n         *\n         * @member {PIXI.Rectangle}\n         */\n        this._frame = frame;\n\n        /**\n         * This is the trimmed area of original texture, before it was put in atlas\n         * Please call `updateUvs()` after you change coordinates of `trim` manually.\n         *\n         * @member {PIXI.Rectangle}\n         */\n        this.trim = trim;\n\n        /**\n         * This will let the renderer know if the texture is valid. If it's not then it cannot be rendered.\n         *\n         * @member {boolean}\n         */\n        this.valid = false;\n\n        /**\n         * This will let a renderer know that a texture has been updated (used mainly for WebGL uv updates)\n         *\n         * @member {boolean}\n         */\n        this.requiresUpdate = false;\n\n        /**\n         * The WebGL UV data cache. Can be used as quad UV\n         *\n         * @member {PIXI.TextureUvs}\n         * @protected\n         */\n        this._uvs = DEFAULT_UVS;\n\n        /**\n         * Default TextureMatrix instance for this texture\n         * By default that object is not created because its heavy\n         *\n         * @member {PIXI.TextureMatrix}\n         */\n        this.uvMatrix = null;\n\n        /**\n         * This is the area of original texture, before it was put in atlas\n         *\n         * @member {PIXI.Rectangle}\n         */\n        this.orig = orig || frame;// new Rectangle(0, 0, 1, 1);\n\n        this._rotate = Number(rotate || 0);\n\n        if (rotate === true)\n        {\n            // this is old texturepacker legacy, some games/libraries are passing \"true\" for rotated textures\n            this._rotate = 2;\n        }\n        else if (this._rotate % 2 !== 0)\n        {\n            throw new Error('attempt to use diamond-shaped UVs. If you are sure, set rotation manually');\n        }\n\n        /**\n         * Anchor point that is used as default if sprite is created with this texture.\n         * Changing the `defaultAnchor` at a later point of time will not update Sprite's anchor point.\n         * @member {PIXI.Point}\n         * @default {0,0}\n         */\n        this.defaultAnchor = anchor ? new Point(anchor.x, anchor.y) : new Point(0, 0);\n\n        /**\n         * Update ID is observed by sprites and TextureMatrix instances.\n         * Call updateUvs() to increment it.\n         *\n         * @member {number}\n         * @protected\n         */\n\n        this._updateID = 0;\n\n        /**\n         * The ids under which this Texture has been added to the texture cache. This is\n         * automatically set as long as Texture.addToCache is used, but may not be set if a\n         * Texture is added directly to the TextureCache array.\n         *\n         * @member {string[]}\n         */\n        this.textureCacheIds = [];\n\n        if (!baseTexture.valid)\n        {\n            baseTexture.once('loaded', this.onBaseTextureUpdated, this);\n        }\n        else if (this.noFrame)\n        {\n            // if there is no frame we should monitor for any base texture changes..\n            if (baseTexture.valid)\n            {\n                this.onBaseTextureUpdated(baseTexture);\n            }\n        }\n        else\n        {\n            this.frame = frame;\n        }\n\n        if (this.noFrame)\n        {\n            baseTexture.on('update', this.onBaseTextureUpdated, this);\n        }\n    }\n\n    /**\n     * Updates this texture on the gpu.\n     *\n     * Calls the TextureResource update.\n     *\n     * If you adjusted `frame` manually, please call `updateUvs()` instead.\n     *\n     */\n    update()\n    {\n        if (this.baseTexture.resource)\n        {\n            this.baseTexture.resource.update();\n        }\n    }\n\n    /**\n     * Called when the base texture is updated\n     *\n     * @protected\n     * @param {PIXI.BaseTexture} baseTexture - The base texture.\n     */\n    onBaseTextureUpdated(baseTexture)\n    {\n        if (this.noFrame)\n        {\n            if (!this.baseTexture.valid)\n            {\n                return;\n            }\n\n            this._frame.width = baseTexture.width;\n            this._frame.height = baseTexture.height;\n            this.valid = true;\n            this.updateUvs();\n        }\n        else\n        {\n            // TODO this code looks confusing.. boo to abusing getters and setters!\n            // if user gave us frame that has bigger size than resized texture it can be a problem\n            this.frame = this._frame;\n        }\n\n        this.emit('update', this);\n    }\n\n    /**\n     * Destroys this texture\n     *\n     * @param {boolean} [destroyBase=false] Whether to destroy the base texture as well\n     */\n    destroy(destroyBase)\n    {\n        if (this.baseTexture)\n        {\n            if (destroyBase)\n            {\n                const { resource } = this.baseTexture;\n\n                // delete the texture if it exists in the texture cache..\n                // this only needs to be removed if the base texture is actually destroyed too..\n                if (resource && TextureCache[resource.url])\n                {\n                    Texture.removeFromCache(resource.url);\n                }\n\n                this.baseTexture.destroy();\n            }\n\n            this.baseTexture.off('update', this.onBaseTextureUpdated, this);\n\n            this.baseTexture = null;\n        }\n\n        this._frame = null;\n        this._uvs = null;\n        this.trim = null;\n        this.orig = null;\n\n        this.valid = false;\n\n        Texture.removeFromCache(this);\n        this.textureCacheIds = null;\n    }\n\n    /**\n     * Creates a new texture object that acts the same as this one.\n     *\n     * @return {PIXI.Texture} The new texture\n     */\n    clone()\n    {\n        return new Texture(this.baseTexture, this.frame, this.orig, this.trim, this.rotate, this.defaultAnchor);\n    }\n\n    /**\n     * Updates the internal WebGL UV cache. Use it after you change `frame` or `trim` of the texture.\n     * Call it after changing the frame\n     */\n    updateUvs()\n    {\n        if (this._uvs === DEFAULT_UVS)\n        {\n            this._uvs = new TextureUvs();\n        }\n\n        this._uvs.set(this._frame, this.baseTexture, this.rotate);\n\n        this._updateID++;\n    }\n\n    /**\n     * Helper function that creates a new Texture based on the source you provide.\n     * The source can be - frame id, image url, video url, canvas element, video element, base texture\n     *\n     * @static\n     * @param {number|string|HTMLImageElement|HTMLCanvasElement|HTMLVideoElement|PIXI.BaseTexture} source\n     *        Source to create texture from\n     * @param {object} [options] See {@link PIXI.BaseTexture}'s constructor for options.\n     * @return {PIXI.Texture} The newly created texture\n     */\n    static from(source, options = {})\n    {\n        let cacheId = null;\n\n        if (typeof source === 'string')\n        {\n            cacheId = source;\n        }\n        else\n        {\n            if (!source._pixiId)\n            {\n                source._pixiId = `pixiid_${uid()}`;\n            }\n\n            cacheId = source._pixiId;\n        }\n\n        let texture = TextureCache[cacheId];\n\n        if (!texture)\n        {\n            if (!options.resolution)\n            {\n                options.resolution = getResolutionOfUrl(source);\n            }\n\n            texture = new Texture(new BaseTexture(source, options));\n            texture.baseTexture.cacheId = cacheId;\n\n            BaseTexture.addToCache(texture.baseTexture, cacheId);\n            Texture.addToCache(texture, cacheId);\n        }\n\n        // lets assume its a base texture!\n        return texture;\n    }\n\n    /**\n     * Create a new Texture with a BufferResource from a Float32Array.\n     * RGBA values are floats from 0 to 1.\n     * @static\n     * @param {Float32Array|Uint8Array} buffer The optional array to use, if no data\n     *        is provided, a new Float32Array is created.\n     * @param {number} width - Width of the resource\n     * @param {number} height - Height of the resource\n     * @param {object} [options] See {@link PIXI.BaseTexture}'s constructor for options.\n     * @return {PIXI.Texture} The resulting new BaseTexture\n     */\n    static fromBuffer(buffer, width, height, options)\n    {\n        return new Texture(BaseTexture.fromBuffer(buffer, width, height, options));\n    }\n\n    /**\n     * Create a texture from a source and add to the cache.\n     *\n     * @static\n     * @param {HTMLImageElement|HTMLCanvasElement} source - The input source.\n     * @param {String} imageUrl - File name of texture, for cache and resolving resolution.\n     * @param {String} [name] - Human readable name for the texture cache. If no name is\n     *        specified, only `imageUrl` will be used as the cache ID.\n     * @return {PIXI.Texture} Output texture\n     */\n    static fromLoader(source, imageUrl, name)\n    {\n        const resource = new ImageResource(source);\n\n        resource.url = imageUrl;\n\n        const baseTexture = new BaseTexture(resource, {\n            scaleMode: settings.SCALE_MODE,\n            resolution: getResolutionOfUrl(imageUrl),\n        });\n\n        const texture = new Texture(baseTexture);\n\n        // No name, use imageUrl instead\n        if (!name)\n        {\n            name = imageUrl;\n        }\n\n        // lets also add the frame to pixi's global cache for 'fromLoader' function\n        BaseTexture.addToCache(texture.baseTexture, name);\n        Texture.addToCache(texture, name);\n\n        // also add references by url if they are different.\n        if (name !== imageUrl)\n        {\n            BaseTexture.addToCache(texture.baseTexture, imageUrl);\n            Texture.addToCache(texture, imageUrl);\n        }\n\n        return texture;\n    }\n\n    /**\n     * Adds a Texture to the global TextureCache. This cache is shared across the whole PIXI object.\n     *\n     * @static\n     * @param {PIXI.Texture} texture - The Texture to add to the cache.\n     * @param {string} id - The id that the Texture will be stored against.\n     */\n    static addToCache(texture, id)\n    {\n        if (id)\n        {\n            if (texture.textureCacheIds.indexOf(id) === -1)\n            {\n                texture.textureCacheIds.push(id);\n            }\n\n            if (TextureCache[id])\n            {\n                // eslint-disable-next-line no-console\n                console.warn(`Texture added to the cache with an id [${id}] that already had an entry`);\n            }\n\n            TextureCache[id] = texture;\n        }\n    }\n\n    /**\n     * Remove a Texture from the global TextureCache.\n     *\n     * @static\n     * @param {string|PIXI.Texture} texture - id of a Texture to be removed, or a Texture instance itself\n     * @return {PIXI.Texture|null} The Texture that was removed\n     */\n    static removeFromCache(texture)\n    {\n        if (typeof texture === 'string')\n        {\n            const textureFromCache = TextureCache[texture];\n\n            if (textureFromCache)\n            {\n                const index = textureFromCache.textureCacheIds.indexOf(texture);\n\n                if (index > -1)\n                {\n                    textureFromCache.textureCacheIds.splice(index, 1);\n                }\n\n                delete TextureCache[texture];\n\n                return textureFromCache;\n            }\n        }\n        else if (texture && texture.textureCacheIds)\n        {\n            for (let i = 0; i < texture.textureCacheIds.length; ++i)\n            {\n                // Check that texture matches the one being passed in before deleting it from the cache.\n                if (TextureCache[texture.textureCacheIds[i]] === texture)\n                {\n                    delete TextureCache[texture.textureCacheIds[i]];\n                }\n            }\n\n            texture.textureCacheIds.length = 0;\n\n            return texture;\n        }\n\n        return null;\n    }\n\n    /**\n     * Returns resolution of baseTexture\n     *\n     * @member {number}\n     * @readonly\n     */\n    get resolution()\n    {\n        return this.baseTexture.resolution;\n    }\n\n    /**\n     * The frame specifies the region of the base texture that this texture uses.\n     * Please call `updateUvs()` after you change coordinates of `frame` manually.\n     *\n     * @member {PIXI.Rectangle}\n     */\n    get frame()\n    {\n        return this._frame;\n    }\n\n    set frame(frame) // eslint-disable-line require-jsdoc\n    {\n        this._frame = frame;\n\n        this.noFrame = false;\n\n        const { x, y, width, height } = frame;\n        const xNotFit = x + width > this.baseTexture.width;\n        const yNotFit = y + height > this.baseTexture.height;\n\n        if (xNotFit || yNotFit)\n        {\n            const relationship = xNotFit && yNotFit ? 'and' : 'or';\n            const errorX = `X: ${x} + ${width} = ${x + width} > ${this.baseTexture.width}`;\n            const errorY = `Y: ${y} + ${height} = ${y + height} > ${this.baseTexture.height}`;\n\n            throw new Error('Texture Error: frame does not fit inside the base Texture dimensions: '\n                + `${errorX} ${relationship} ${errorY}`);\n        }\n\n        this.valid = width && height && this.baseTexture.valid;\n\n        if (!this.trim && !this.rotate)\n        {\n            this.orig = frame;\n        }\n\n        if (this.valid)\n        {\n            this.updateUvs();\n        }\n    }\n\n    /**\n     * Indicates whether the texture is rotated inside the atlas\n     * set to 2 to compensate for texture packer rotation\n     * set to 6 to compensate for spine packer rotation\n     * can be used to rotate or mirror sprites\n     * See {@link PIXI.GroupD8} for explanation\n     *\n     * @member {number}\n     */\n    get rotate()\n    {\n        return this._rotate;\n    }\n\n    set rotate(rotate) // eslint-disable-line require-jsdoc\n    {\n        this._rotate = rotate;\n        if (this.valid)\n        {\n            this.updateUvs();\n        }\n    }\n\n    /**\n     * The width of the Texture in pixels.\n     *\n     * @member {number}\n     */\n    get width()\n    {\n        return this.orig.width;\n    }\n\n    /**\n     * The height of the Texture in pixels.\n     *\n     * @member {number}\n     */\n    get height()\n    {\n        return this.orig.height;\n    }\n}\n\nfunction createWhiteTexture()\n{\n    const canvas = document.createElement('canvas');\n\n    canvas.width = 16;\n    canvas.height = 16;\n\n    const context = canvas.getContext('2d');\n\n    context.fillStyle = 'white';\n    context.fillRect(0, 0, 16, 16);\n\n    return new Texture(new BaseTexture(new CanvasResource(canvas)));\n}\n\nfunction removeAllHandlers(tex)\n{\n    tex.destroy = function _emptyDestroy() { /* empty */ };\n    tex.on = function _emptyOn() { /* empty */ };\n    tex.once = function _emptyOnce() { /* empty */ };\n    tex.emit = function _emptyEmit() { /* empty */ };\n}\n\n/**\n * An empty texture, used often to not have to create multiple empty textures.\n * Can not be destroyed.\n *\n * @static\n * @constant\n * @member {PIXI.Texture}\n */\nTexture.EMPTY = new Texture(new BaseTexture());\nremoveAllHandlers(Texture.EMPTY);\nremoveAllHandlers(Texture.EMPTY.baseTexture);\n\n/**\n * A white texture of 16x16 size, used for graphics and other things\n * Can not be destroyed.\n *\n * @static\n * @constant\n * @member {PIXI.Texture}\n */\nTexture.WHITE = createWhiteTexture();\nremoveAllHandlers(Texture.WHITE);\nremoveAllHandlers(Texture.WHITE.baseTexture);\n","import BaseRenderTexture from './BaseRenderTexture';\nimport Texture from '../textures/Texture';\n\n/**\n * A RenderTexture is a special texture that allows any PixiJS display object to be rendered to it.\n *\n * __Hint__: All DisplayObjects (i.e. Sprites) that render to a RenderTexture should be preloaded\n * otherwise black rectangles will be drawn instead.\n *\n * __Hint-2__: The actual memory allocation will happen on first render.\n * You shouldn't create renderTextures each frame just to delete them after, try to reuse them.\n *\n * A RenderTexture takes a snapshot of any Display Object given to its render method. For example:\n *\n * ```js\n * let renderer = PIXI.autoDetectRenderer();\n * let renderTexture = PIXI.RenderTexture.create(800, 600);\n * let sprite = PIXI.Sprite.from(\"spinObj_01.png\");\n *\n * sprite.position.x = 800/2;\n * sprite.position.y = 600/2;\n * sprite.anchor.x = 0.5;\n * sprite.anchor.y = 0.5;\n *\n * renderer.render(sprite, renderTexture);\n * ```\n *\n * The Sprite in this case will be rendered using its local transform. To render this sprite at 0,0\n * you can clear the transform\n *\n * ```js\n *\n * sprite.setTransform()\n *\n * let renderTexture = new PIXI.RenderTexture.create(100, 100);\n *\n * renderer.render(sprite, renderTexture);  // Renders to center of RenderTexture\n * ```\n *\n * @class\n * @extends PIXI.Texture\n * @memberof PIXI\n */\nexport default class RenderTexture extends Texture\n{\n    /**\n     * @param {PIXI.BaseRenderTexture} baseRenderTexture - The base texture object that this texture uses\n     * @param {PIXI.Rectangle} [frame] - The rectangle frame of the texture to show\n     */\n    constructor(baseRenderTexture, frame)\n    {\n        // support for legacy..\n        let _legacyRenderer = null;\n\n        if (!(baseRenderTexture instanceof BaseRenderTexture))\n        {\n            /* eslint-disable prefer-rest-params, no-console */\n            const width = arguments[1];\n            const height = arguments[2];\n            const scaleMode = arguments[3];\n            const resolution = arguments[4];\n\n            // we have an old render texture..\n            console.warn(`Please use RenderTexture.create(${width}, ${height}) instead of the ctor directly.`);\n            _legacyRenderer = arguments[0];\n            /* eslint-enable prefer-rest-params, no-console */\n\n            frame = null;\n            baseRenderTexture = new BaseRenderTexture({\n                width,\n                height,\n                scaleMode,\n                resolution,\n            });\n        }\n\n        /**\n         * The base texture object that this texture uses\n         *\n         * @member {PIXI.BaseTexture}\n         */\n        super(baseRenderTexture, frame);\n\n        this.legacyRenderer = _legacyRenderer;\n\n        /**\n         * This will let the renderer know if the texture is valid. If it's not then it cannot be rendered.\n         *\n         * @member {boolean}\n         */\n        this.valid = true;\n\n        /**\n         * Stores `sourceFrame` when this texture is inside current filter stack.\n         * You can read it inside filters.\n         *\n         * @readonly\n         * @member {PIXI.Rectangle}\n         */\n        this.filterFrame = null;\n\n        /**\n         * The key for pooled texture of FilterSystem\n         * @protected\n         * @member {string}\n         */\n        this.filterPoolKey = null;\n\n        this.updateUvs();\n    }\n\n    /**\n     * Resizes the RenderTexture.\n     *\n     * @param {number} width - The width to resize to.\n     * @param {number} height - The height to resize to.\n     * @param {boolean} [resizeBaseTexture=true] - Should the baseTexture.width and height values be resized as well?\n     */\n    resize(width, height, resizeBaseTexture = true)\n    {\n        width = Math.ceil(width);\n        height = Math.ceil(height);\n\n        // TODO - could be not required..\n        this.valid = (width > 0 && height > 0);\n\n        this._frame.width = this.orig.width = width;\n        this._frame.height = this.orig.height = height;\n\n        if (resizeBaseTexture)\n        {\n            this.baseTexture.resize(width, height);\n        }\n\n        this.updateUvs();\n    }\n\n    /**\n     * Changes the resolution of baseTexture, but does not change framebuffer size.\n     *\n     * @param {number} resolution - The new resolution to apply to RenderTexture\n     */\n    setResolution(resolution)\n    {\n        const { baseTexture } = this;\n\n        if (baseTexture.resolution === resolution)\n        {\n            return;\n        }\n\n        baseTexture.setResolution(resolution);\n        this.resize(baseTexture.width, baseTexture.height, false);\n    }\n\n    /**\n     * A short hand way of creating a render texture.\n     *\n     * @param {object} [options] - Options\n     * @param {number} [options.width=100] - The width of the render texture\n     * @param {number} [options.height=100] - The height of the render texture\n     * @param {number} [options.scaleMode=PIXI.settings.SCALE_MODE] - See {@link PIXI.SCALE_MODES} for possible values\n     * @param {number} [options.resolution=1] - The resolution / device pixel ratio of the texture being generated\n     * @return {PIXI.RenderTexture} The new render texture\n     */\n    static create(options)\n    {\n        // fallback, old-style: create(width, height, scaleMode, resolution)\n        if (typeof options === 'number')\n        {\n            /* eslint-disable prefer-rest-params */\n            options = {\n                width: options,\n                height: arguments[1],\n                scaleMode: arguments[2],\n                resolution: arguments[3],\n            };\n            /* eslint-enable prefer-rest-params */\n        }\n\n        return new RenderTexture(new BaseRenderTexture(options));\n    }\n}\n","import RenderTexture from './RenderTexture';\nimport BaseRenderTexture from './BaseRenderTexture';\nimport { nextPow2 } from '@pixi/utils';\n\n/**\n * Experimental!\n *\n * Texture pool, used by FilterSystem and plugins\n * Stores collection of temporary pow2 or screen-sized renderTextures\n *\n * If you use custom RenderTexturePool for your filters, you can use methods\n * `getFilterTexture` and `returnFilterTexture` same as in\n *\n * @class\n * @memberof PIXI\n */\nexport default class RenderTexturePool\n{\n    /**\n     * @param {object} [textureOptions] - options that will be passed to BaseRenderTexture constructor\n     * @param {PIXI.SCALE_MODES} [textureOptions.scaleMode] - See {@link PIXI.SCALE_MODES} for possible values.\n     */\n    constructor(textureOptions)\n    {\n        this.texturePool = {};\n        this.textureOptions = textureOptions || {};\n        /**\n         * Allow renderTextures of the same size as screen, not just pow2\n         *\n         * Automatically sets to true after `setScreenSize`\n         *\n         * @member {boolean}\n         * @default false\n         */\n        this.enableFullScreen = false;\n\n        this._pixelsWidth = 0;\n        this._pixelsHeight = 0;\n    }\n\n    /**\n     * creates of texture with params that were specified in pool constructor\n     *\n     * @param {number} realWidth width of texture in pixels\n     * @param {number} realHeight height of texture in pixels\n     * @returns {RenderTexture}\n     */\n    createTexture(realWidth, realHeight)\n    {\n        const baseRenderTexture = new BaseRenderTexture(Object.assign({\n            width: realWidth,\n            height: realHeight,\n            resolution: 1,\n        }, this.textureOptions));\n\n        return new RenderTexture(baseRenderTexture);\n    }\n\n    /**\n     * Gets a Power-of-Two render texture or fullScreen texture\n     *\n     * @protected\n     * @param {number} minWidth - The minimum width of the render texture in real pixels.\n     * @param {number} minHeight - The minimum height of the render texture in real pixels.\n     * @param {number} [resolution=1] - The resolution of the render texture.\n     * @return {PIXI.RenderTexture} The new render texture.\n     */\n    getOptimalTexture(minWidth, minHeight, resolution = 1)\n    {\n        let key = RenderTexturePool.SCREEN_KEY;\n\n        minWidth *= resolution;\n        minHeight *= resolution;\n\n        if (!this.enableFullScreen || minWidth !== this._pixelsWidth || minHeight !== this._pixelsHeight)\n        {\n            minWidth = nextPow2(minWidth);\n            minHeight = nextPow2(minHeight);\n            key = ((minWidth & 0xFFFF) << 16) | (minHeight & 0xFFFF);\n        }\n\n        if (!this.texturePool[key])\n        {\n            this.texturePool[key] = [];\n        }\n\n        let renderTexture = this.texturePool[key].pop();\n\n        if (!renderTexture)\n        {\n            renderTexture = this.createTexture(minWidth, minHeight);\n        }\n\n        renderTexture.filterPoolKey = key;\n        renderTexture.setResolution(resolution);\n\n        return renderTexture;\n    }\n\n    /**\n     * Gets extra texture of the same size as input renderTexture\n     *\n     * `getFilterTexture(input, 0.5)` or `getFilterTexture(0.5, input)`\n     *\n     * @param {PIXI.RenderTexture} input renderTexture from which size and resolution will be copied\n     * @param {number} [resolution] override resolution of the renderTexture\n     *  It overrides, it does not multiply\n     * @returns {PIXI.RenderTexture}\n     */\n    getFilterTexture(input, resolution)\n    {\n        const filterTexture = this.getOptimalTexture(input.width, input.height, resolution || input.resolution);\n\n        filterTexture.filterFrame = input.filterFrame;\n\n        return filterTexture;\n    }\n\n    /**\n     * Place a render texture back into the pool.\n     * @param {PIXI.RenderTexture} renderTexture - The renderTexture to free\n     */\n    returnTexture(renderTexture)\n    {\n        const key = renderTexture.filterPoolKey;\n\n        renderTexture.filterFrame = null;\n        this.texturePool[key].push(renderTexture);\n    }\n\n    /**\n     * Alias for returnTexture, to be compliant with FilterSystem interface\n     * @param {PIXI.RenderTexture} renderTexture - The renderTexture to free\n     */\n    returnFilterTexture(renderTexture)\n    {\n        this.returnTexture(renderTexture);\n    }\n\n    /**\n     * Clears the pool\n     *\n     * @param {boolean} [destroyTextures=true] destroy all stored textures\n     */\n    clear(destroyTextures)\n    {\n        destroyTextures = destroyTextures !== false;\n        if (destroyTextures)\n        {\n            for (const i in this.texturePool)\n            {\n                const textures = this.texturePool[i];\n\n                if (textures)\n                {\n                    for (let j = 0; j < textures.length; j++)\n                    {\n                        textures[j].destroy(true);\n                    }\n                }\n            }\n        }\n\n        this.texturePool = {};\n    }\n\n    /**\n     * If screen size was changed, drops all screen-sized textures,\n     * sets new screen size, sets `enableFullScreen` to true\n     *\n     * Size is measured in pixels, `renderer.view` can be passed here, not `renderer.screen`\n     *\n     * @param {PIXI.ISize} size - Initial size of screen\n     */\n    setScreenSize(size)\n    {\n        if (size.width === this._pixelsWidth\n            && size.height === this._pixelsHeight)\n        {\n            return;\n        }\n\n        const screenKey = RenderTexturePool.SCREEN_KEY;\n        const textures = this.texturePool[screenKey];\n\n        this.enableFullScreen = size.width > 0 && size.height > 0;\n\n        if (textures)\n        {\n            for (let j = 0; j < textures.length; j++)\n            {\n                textures[j].destroy(true);\n            }\n        }\n        this.texturePool[screenKey] = [];\n\n        this._pixelsWidth = size.width;\n        this._pixelsHeight = size.height;\n    }\n}\n\n/**\n * Key that is used to store fullscreen renderTextures in a pool\n *\n * @static\n * @const {string}\n */\nRenderTexturePool.SCREEN_KEY = 'screen';\n","/* eslint-disable max-len */\n\n/**\n * Holds the information for a single attribute structure required to render geometry.\n *\n * This does not contain the actual data, but instead has a buffer id that maps to a {@link PIXI.Buffer}\n * This can include anything from positions, uvs, normals, colors etc.\n *\n * @class\n * @memberof PIXI\n */\nexport default class Attribute\n{\n    /**\n     * @param {string} buffer  the id of the buffer that this attribute will look for\n     * @param {Number} [size=0] the size of the attribute. If you have 2 floats per vertex (eg position x and y) this would be 2.\n     * @param {Boolean} [normalized=false] should the data be normalized.\n     * @param {Number} [type=PIXI.TYPES.FLOAT] what type of number is the attribute. Check {PIXI.TYPES} to see the ones available\n     * @param {Number} [stride=0] How far apart (in floats) the start of each value is. (used for interleaving data)\n     * @param {Number} [start=0] How far into the array to start reading values (used for interleaving data)\n     */\n    constructor(buffer, size, normalized = false, type = 5126, stride, start, instance)\n    {\n        this.buffer = buffer;\n        this.size = size;\n        this.normalized = normalized;\n        this.type = type;\n        this.stride = stride;\n        this.start = start;\n        this.instance = instance;\n    }\n\n    /**\n     * Destroys the Attribute.\n     */\n    destroy()\n    {\n        this.buffer = null;\n    }\n\n    /**\n     * Helper function that creates an Attribute based on the information provided\n     *\n     * @static\n     * @param {string} buffer  the id of the buffer that this attribute will look for\n     * @param {Number} [size=2] the size of the attribute. If you have 2 floats per vertex (eg position x and y) this would be 2\n     * @param {Number} [stride=0] How far apart (in floats) the start of each value is. (used for interleaving data)\n     * @param {Number} [start=0] How far into the array to start reading values (used for interleaving data)\n     * @param {Boolean} [normalized=false] should the data be normalized.\n     *\n     * @returns {PIXI.Attribute} A new {@link PIXI.Attribute} based on the information provided\n     */\n    static from(buffer, size, normalized, type, stride)\n    {\n        return new Attribute(buffer, size, normalized, type, stride);\n    }\n}\n","import { Runner } from '@pixi/runner';\n\nlet UID = 0;\n/* eslint-disable max-len */\n\n/**\n * A wrapper for data so that it can be used and uploaded by WebGL\n *\n * @class\n * @memberof PIXI\n */\nexport default class Buffer\n{\n    /**\n     * @param {ArrayBuffer| SharedArrayBuffer|ArrayBufferView} data the data to store in the buffer.\n     * @param {boolean} [_static=true] `true` for static buffer\n     * @param {boolean} [index=false] `true` for index buffer\n     */\n    constructor(data, _static = true, index = false)\n    {\n        /**\n         * The data in the buffer, as a typed array\n         *\n         * @member {ArrayBuffer| SharedArrayBuffer|ArrayBufferView}\n         */\n        this.data = data || new Float32Array(1);\n\n        /**\n         * A map of renderer IDs to webgl buffer\n         *\n         * @private\n         * @member {object<number, GLBuffer>}\n         */\n        this._glBuffers = {};\n\n        this._updateID = 0;\n\n        this.index = index;\n\n        this.static = _static;\n\n        this.id = UID++;\n\n        this.disposeRunner = new Runner('disposeBuffer', 2);\n    }\n\n    // TODO could explore flagging only a partial upload?\n    /**\n     * flags this buffer as requiring an upload to the GPU\n     * @param {ArrayBuffer|SharedArrayBuffer|ArrayBufferView} [data] the data to update in the buffer.\n     */\n    update(data)\n    {\n        this.data = data || this.data;\n        this._updateID++;\n    }\n\n    /**\n     * disposes WebGL resources that are connected to this geometry\n     */\n    dispose()\n    {\n        this.disposeRunner.run(this, false);\n    }\n\n    /**\n     * Destroys the buffer\n     */\n    destroy()\n    {\n        this.dispose();\n\n        this.data = null;\n    }\n\n    /**\n     * Helper function that creates a buffer based on an array or TypedArray\n     *\n     * @static\n     * @param {ArrayBufferView | number[]} data the TypedArray that the buffer will store. If this is a regular Array it will be converted to a Float32Array.\n     * @return {PIXI.Buffer} A new Buffer based on the data provided.\n     */\n    static from(data)\n    {\n        if (data instanceof Array)\n        {\n            data = new Float32Array(data);\n        }\n\n        return new Buffer(data);\n    }\n}\n","export default function getBufferType(array)\n{\n    if (array.BYTES_PER_ELEMENT === 4)\n    {\n        if (array instanceof Float32Array)\n        {\n            return 'Float32Array';\n        }\n        else if (array instanceof Uint32Array)\n        {\n            return 'Uint32Array';\n        }\n\n        return 'Int32Array';\n    }\n    else if (array.BYTES_PER_ELEMENT === 2)\n    {\n        if (array instanceof Uint16Array)\n        {\n            return 'Uint16Array';\n        }\n    }\n    else if (array.BYTES_PER_ELEMENT === 1)\n    {\n        if (array instanceof Uint8Array)\n        {\n            return 'Uint8Array';\n        }\n    }\n\n    // TODO map out the rest of the array elements!\n    return null;\n}\n","import getBufferType from './getBufferType';\n\n/* eslint-disable object-shorthand */\nconst map = {\n    Float32Array: Float32Array,\n    Uint32Array: Uint32Array,\n    Int32Array: Int32Array,\n    Uint8Array: Uint8Array,\n};\n\nexport default function interleaveTypedArrays(arrays, sizes)\n{\n    let outSize = 0;\n    let stride = 0;\n    const views = {};\n\n    for (let i = 0; i < arrays.length; i++)\n    {\n        stride += sizes[i];\n        outSize += arrays[i].length;\n    }\n\n    const buffer = new ArrayBuffer(outSize * 4);\n\n    let out = null;\n    let littleOffset = 0;\n\n    for (let i = 0; i < arrays.length; i++)\n    {\n        const size = sizes[i];\n        const array = arrays[i];\n\n        const type = getBufferType(array);\n\n        if (!views[type])\n        {\n            views[type] = new map[type](buffer);\n        }\n\n        out = views[type];\n\n        for (let j = 0; j < array.length; j++)\n        {\n            const indexStart = ((j / size | 0) * stride) + littleOffset;\n            const index = j % size;\n\n            out[indexStart + index] = array[j];\n        }\n\n        littleOffset += size;\n    }\n\n    return new Float32Array(buffer);\n}\n","import Attribute from './Attribute';\nimport Buffer from './Buffer';\nimport interleaveTypedArrays from './utils/interleaveTypedArrays';\nimport getBufferType from './utils/getBufferType';\nimport { Runner } from '@pixi/runner';\n\nconst byteSizeMap = { 5126: 4, 5123: 2, 5121: 1 };\nlet UID = 0;\n\n/* eslint-disable object-shorthand */\nconst map = {\n    Float32Array: Float32Array,\n    Uint32Array: Uint32Array,\n    Int32Array: Int32Array,\n    Uint8Array: Uint8Array,\n    Uint16Array: Uint16Array,\n};\n\n/* eslint-disable max-len */\n\n/**\n * The Geometry represents a model. It consists of two components:\n * - GeometryStyle - The structure of the model such as the attributes layout\n * - GeometryData - the data of the model - this consists of buffers.\n * This can include anything from positions, uvs, normals, colors etc.\n *\n * Geometry can be defined without passing in a style or data if required (thats how I prefer!)\n *\n * ```js\n * let geometry = new PIXI.Geometry();\n *\n * geometry.addAttribute('positions', [0, 0, 100, 0, 100, 100, 0, 100], 2);\n * geometry.addAttribute('uvs', [0,0,1,0,1,1,0,1],2)\n * geometry.addIndex([0,1,2,1,3,2])\n *\n * ```\n * @class\n * @memberof PIXI\n */\nexport default class Geometry\n{\n    /**\n     * @param {PIXI.Buffer[]} [buffers]  an array of buffers. optional.\n     * @param {object} [attributes] of the geometry, optional structure of the attributes layout\n     */\n    constructor(buffers = [], attributes = {})\n    {\n        this.buffers = buffers;\n\n        this.indexBuffer = null;\n\n        this.attributes = attributes;\n\n        /**\n         * A map of renderer IDs to webgl VAOs\n         *\n         * @protected\n         * @type {object}\n         */\n        this.glVertexArrayObjects = {};\n\n        this.id = UID++;\n\n        this.instanced = false;\n\n        /**\n         * Number of instances in this geometry, pass it to `GeometrySystem.draw()`\n         * @member {number}\n         * @default 1\n         */\n        this.instanceCount = 1;\n\n        this.disposeRunner = new Runner('disposeGeometry', 2);\n\n        /**\n         * Count of existing (not destroyed) meshes that reference this geometry\n         * @member {number}\n         */\n        this.refCount = 0;\n    }\n\n    /**\n    *\n    * Adds an attribute to the geometry\n    *\n    * @param {String} id - the name of the attribute (matching up to a shader)\n    * @param {PIXI.Buffer} [buffer] the buffer that holds the data of the attribute . You can also provide an Array and a buffer will be created from it.\n    * @param {Number} [size=0] the size of the attribute. If you have 2 floats per vertex (eg position x and y) this would be 2\n    * @param {Boolean} [normalized=false] should the data be normalized.\n    * @param {Number} [type=PIXI.TYPES.FLOAT] what type of number is the attribute. Check {PIXI.TYPES} to see the ones available\n    * @param {Number} [stride=0] How far apart (in floats) the start of each value is. (used for interleaving data)\n    * @param {Number} [start=0] How far into the array to start reading values (used for interleaving data)\n    *\n    * @return {PIXI.Geometry} returns self, useful for chaining.\n    */\n    addAttribute(id, buffer, size, normalized = false, type, stride, start, instance = false)\n    {\n        if (!buffer)\n        {\n            throw new Error('You must pass a buffer when creating an attribute');\n        }\n\n        // check if this is a buffer!\n        if (!buffer.data)\n        {\n            // its an array!\n            if (buffer instanceof Array)\n            {\n                buffer = new Float32Array(buffer);\n            }\n\n            buffer = new Buffer(buffer);\n        }\n\n        const ids = id.split('|');\n\n        if (ids.length > 1)\n        {\n            for (let i = 0; i < ids.length; i++)\n            {\n                this.addAttribute(ids[i], buffer, size, normalized, type);\n            }\n\n            return this;\n        }\n\n        let bufferIndex = this.buffers.indexOf(buffer);\n\n        if (bufferIndex === -1)\n        {\n            this.buffers.push(buffer);\n            bufferIndex = this.buffers.length - 1;\n        }\n\n        this.attributes[id] = new Attribute(bufferIndex, size, normalized, type, stride, start, instance);\n\n        // assuming that if there is instanced data then this will be drawn with instancing!\n        this.instanced = this.instanced || instance;\n\n        return this;\n    }\n\n    /**\n     * returns the requested attribute\n     *\n     * @param {String} id  the name of the attribute required\n     * @return {PIXI.Attribute} the attribute requested.\n     */\n    getAttribute(id)\n    {\n        return this.attributes[id];\n    }\n\n    /**\n     * returns the requested buffer\n     *\n     * @param {String} id  the name of the buffer required\n     * @return {PIXI.Buffer} the buffer requested.\n     */\n    getBuffer(id)\n    {\n        return this.buffers[this.getAttribute(id).buffer];\n    }\n\n    /**\n    *\n    * Adds an index buffer to the geometry\n    * The index buffer contains integers, three for each triangle in the geometry, which reference the various attribute buffers (position, colour, UV coordinates, other UV coordinates, normal, …). There is only ONE index buffer.\n    *\n    * @param {PIXI.Buffer} [buffer] the buffer that holds the data of the index buffer. You can also provide an Array and a buffer will be created from it.\n    * @return {PIXI.Geometry} returns self, useful for chaining.\n    */\n    addIndex(buffer)\n    {\n        if (!buffer.data)\n        {\n            // its an array!\n            if (buffer instanceof Array)\n            {\n                buffer = new Uint16Array(buffer);\n            }\n\n            buffer = new Buffer(buffer);\n        }\n\n        buffer.index = true;\n        this.indexBuffer = buffer;\n\n        if (this.buffers.indexOf(buffer) === -1)\n        {\n            this.buffers.push(buffer);\n        }\n\n        return this;\n    }\n\n    /**\n     * returns the index buffer\n     *\n     * @return {PIXI.Buffer} the index buffer.\n     */\n    getIndex()\n    {\n        return this.indexBuffer;\n    }\n\n    /**\n     * this function modifies the structure so that all current attributes become interleaved into a single buffer\n     * This can be useful if your model remains static as it offers a little performance boost\n     *\n     * @return {PIXI.Geometry} returns self, useful for chaining.\n     */\n    interleave()\n    {\n        // a simple check to see if buffers are already interleaved..\n        if (this.buffers.length === 1 || (this.buffers.length === 2 && this.indexBuffer)) return this;\n\n        // assume already that no buffers are interleaved\n        const arrays = [];\n        const sizes = [];\n        const interleavedBuffer = new Buffer();\n        let i;\n\n        for (i in this.attributes)\n        {\n            const attribute = this.attributes[i];\n\n            const buffer = this.buffers[attribute.buffer];\n\n            arrays.push(buffer.data);\n\n            sizes.push((attribute.size * byteSizeMap[attribute.type]) / 4);\n\n            attribute.buffer = 0;\n        }\n\n        interleavedBuffer.data = interleaveTypedArrays(arrays, sizes);\n\n        for (i = 0; i < this.buffers.length; i++)\n        {\n            if (this.buffers[i] !== this.indexBuffer)\n            {\n                this.buffers[i].destroy();\n            }\n        }\n\n        this.buffers = [interleavedBuffer];\n\n        if (this.indexBuffer)\n        {\n            this.buffers.push(this.indexBuffer);\n        }\n\n        return this;\n    }\n\n    getSize()\n    {\n        for (const i in this.attributes)\n        {\n            const attribute = this.attributes[i];\n            const buffer = this.buffers[attribute.buffer];\n\n            return buffer.data.length / ((attribute.stride / 4) || attribute.size);\n        }\n\n        return 0;\n    }\n\n    /**\n     * disposes WebGL resources that are connected to this geometry\n     */\n    dispose()\n    {\n        this.disposeRunner.run(this, false);\n    }\n\n    /**\n     * Destroys the geometry.\n     */\n    destroy()\n    {\n        this.dispose();\n\n        this.buffers = null;\n        this.indexBuffer.destroy();\n\n        this.attributes = null;\n    }\n\n    /**\n     * returns a clone of the geometry\n     *\n     * @returns {PIXI.Geometry} a new clone of this geometry\n     */\n    clone()\n    {\n        const geometry = new Geometry();\n\n        for (let i = 0; i < this.buffers.length; i++)\n        {\n            geometry.buffers[i] = new Buffer(this.buffers[i].data.slice());\n        }\n\n        for (const i in this.attributes)\n        {\n            const attrib = this.attributes[i];\n\n            geometry.attributes[i] = new Attribute(\n                attrib.buffer,\n                attrib.size,\n                attrib.normalized,\n                attrib.type,\n                attrib.stride,\n                attrib.start,\n                attrib.instance\n            );\n        }\n\n        if (this.indexBuffer)\n        {\n            geometry.indexBuffer = geometry.buffers[this.buffers.indexOf(this.indexBuffer)];\n            geometry.indexBuffer.index = true;\n        }\n\n        return geometry;\n    }\n\n    /**\n     * merges an array of geometries into a new single one\n     * geometry attribute styles must match for this operation to work\n     *\n     * @param {PIXI.Geometry[]} geometries array of geometries to merge\n     * @returns {PIXI.Geometry} shiny new geometry!\n     */\n    static merge(geometries)\n    {\n        // todo add a geometry check!\n        // also a size check.. cant be too big!]\n\n        const geometryOut = new Geometry();\n\n        const arrays = [];\n        const sizes = [];\n        const offsets = [];\n\n        let geometry;\n\n        // pass one.. get sizes..\n        for (let i = 0; i < geometries.length; i++)\n        {\n            geometry = geometries[i];\n\n            for (let j = 0; j < geometry.buffers.length; j++)\n            {\n                sizes[j] = sizes[j] || 0;\n                sizes[j] += geometry.buffers[j].data.length;\n                offsets[j] = 0;\n            }\n        }\n\n        // build the correct size arrays..\n        for (let i = 0; i < geometry.buffers.length; i++)\n        {\n            // TODO types!\n            arrays[i] = new map[getBufferType(geometry.buffers[i].data)](sizes[i]);\n            geometryOut.buffers[i] = new Buffer(arrays[i]);\n        }\n\n        // pass to set data..\n        for (let i = 0; i < geometries.length; i++)\n        {\n            geometry = geometries[i];\n\n            for (let j = 0; j < geometry.buffers.length; j++)\n            {\n                arrays[j].set(geometry.buffers[j].data, offsets[j]);\n                offsets[j] += geometry.buffers[j].data.length;\n            }\n        }\n\n        geometryOut.attributes = geometry.attributes;\n\n        if (geometry.indexBuffer)\n        {\n            geometryOut.indexBuffer = geometryOut.buffers[geometry.buffers.indexOf(geometry.indexBuffer)];\n            geometryOut.indexBuffer.index = true;\n\n            let offset = 0;\n            let stride = 0;\n            let offset2 = 0;\n            let bufferIndexToCount = 0;\n\n            // get a buffer\n            for (let i = 0; i < geometry.buffers.length; i++)\n            {\n                if (geometry.buffers[i] !== geometry.indexBuffer)\n                {\n                    bufferIndexToCount = i;\n                    break;\n                }\n            }\n\n            // figure out the stride of one buffer..\n            for (const i in geometry.attributes)\n            {\n                const attribute = geometry.attributes[i];\n\n                if ((attribute.buffer | 0) === bufferIndexToCount)\n                {\n                    stride += ((attribute.size * byteSizeMap[attribute.type]) / 4);\n                }\n            }\n\n            // time to off set all indexes..\n            for (let i = 0; i < geometries.length; i++)\n            {\n                const indexBufferData = geometries[i].indexBuffer.data;\n\n                for (let j = 0; j < indexBufferData.length; j++)\n                {\n                    geometryOut.indexBuffer.data[j + offset2] += offset;\n                }\n\n                offset += geometry.buffers[bufferIndexToCount].data.length / (stride);\n                offset2 += indexBufferData.length;\n            }\n        }\n\n        return geometryOut;\n    }\n}\n","import Geometry from '../geometry/Geometry';\n\n/**\n * Helper class to create a quad\n *\n * @class\n * @memberof PIXI\n */\nexport default class Quad extends Geometry\n{\n    constructor()\n    {\n        super();\n\n        this.addAttribute('aVertexPosition', [\n            0, 0,\n            1, 0,\n            1, 1,\n            0, 1,\n        ])\n            .addIndex([0, 1, 3, 2]);\n    }\n}\n","import Geometry from '../geometry/Geometry';\nimport Buffer from '../geometry/Buffer';\n\n/**\n * Helper class to create a quad with uvs like in v4\n *\n * @class\n * @memberof PIXI\n * @extends PIXI.Geometry\n */\nexport default class QuadUv extends Geometry\n{\n    constructor()\n    {\n        super();\n\n        /**\n         * An array of vertices\n         *\n         * @member {Float32Array}\n         */\n        this.vertices = new Float32Array([\n            -1, -1,\n            1, -1,\n            1, 1,\n            -1, 1,\n        ]);\n\n        /**\n         * The Uvs of the quad\n         *\n         * @member {Float32Array}\n         */\n        this.uvs = new Float32Array([\n            0, 0,\n            1, 0,\n            1, 1,\n            0, 1,\n        ]);\n\n        this.vertexBuffer = new Buffer(this.vertices);\n        this.uvBuffer = new Buffer(this.uvs);\n\n        this.addAttribute('aVertexPosition', this.vertexBuffer)\n            .addAttribute('aTextureCoord', this.uvBuffer)\n            .addIndex([0, 1, 2, 0, 2, 3]);\n    }\n\n    /**\n     * Maps two Rectangle to the quad.\n     *\n     * @param {PIXI.Rectangle} targetTextureFrame - the first rectangle\n     * @param {PIXI.Rectangle} destinationFrame - the second rectangle\n     * @return {PIXI.Quad} Returns itself.\n     */\n    map(targetTextureFrame, destinationFrame)\n    {\n        let x = 0; // destinationFrame.x / targetTextureFrame.width;\n        let y = 0; // destinationFrame.y / targetTextureFrame.height;\n\n        this.uvs[0] = x;\n        this.uvs[1] = y;\n\n        this.uvs[2] = x + (destinationFrame.width / targetTextureFrame.width);\n        this.uvs[3] = y;\n\n        this.uvs[4] = x + (destinationFrame.width / targetTextureFrame.width);\n        this.uvs[5] = y + (destinationFrame.height / targetTextureFrame.height);\n\n        this.uvs[6] = x;\n        this.uvs[7] = y + (destinationFrame.height / targetTextureFrame.height);\n\n        x = destinationFrame.x;\n        y = destinationFrame.y;\n\n        this.vertices[0] = x;\n        this.vertices[1] = y;\n\n        this.vertices[2] = x + destinationFrame.width;\n        this.vertices[3] = y;\n\n        this.vertices[4] = x + destinationFrame.width;\n        this.vertices[5] = y + destinationFrame.height;\n\n        this.vertices[6] = x;\n        this.vertices[7] = y + destinationFrame.height;\n\n        this.invalidate();\n\n        return this;\n    }\n\n    /**\n     * legacy upload method, just marks buffers dirty\n     * @returns {PIXI.QuadUv} Returns itself.\n     */\n    invalidate()\n    {\n        this.vertexBuffer._updateID++;\n        this.uvBuffer._updateID++;\n\n        return this;\n    }\n}\n","let UID = 0;\n\n/**\n * Uniform group holds uniform map and some ID's for work\n *\n * @class\n * @memberof PIXI\n */\nclass UniformGroup\n{\n    /**\n     * @param {object} [uniforms] - Custom uniforms to use to augment the built-in ones.\n     * @param {boolean} [_static] - Uniforms wont be changed after creation\n     */\n    constructor(uniforms, _static)\n    {\n        /**\n         * uniform values\n         * @member {object}\n         * @readonly\n         */\n        this.uniforms = uniforms;\n\n        /**\n         * Its a group and not a single uniforms\n         * @member {boolean}\n         * @readonly\n         * @default true\n         */\n        this.group = true;\n\n        // lets generate this when the shader ?\n        this.syncUniforms = {};\n\n        /**\n         * dirty version\n         * @protected\n         * @member {number}\n         */\n        this.dirtyId = 0;\n\n        /**\n         * unique id\n         * @protected\n         * @member {number}\n         */\n        this.id = UID++;\n\n        /**\n         * Uniforms wont be changed after creation\n         * @member {boolean}\n         */\n        this.static = !!_static;\n    }\n\n    update()\n    {\n        this.dirtyId++;\n    }\n\n    add(name, uniforms, _static)\n    {\n        this.uniforms[name] = new UniformGroup(uniforms, _static);\n    }\n\n    static from(uniforms, _static)\n    {\n        return new UniformGroup(uniforms, _static);\n    }\n}\n\nexport default UniformGroup;\n","import System from '../System';\n\nimport RenderTexturePool from '../renderTexture/RenderTexturePool';\nimport Quad from '../utils/Quad';\nimport QuadUv from '../utils/QuadUv';\nimport { Rectangle, Matrix } from '@pixi/math';\nimport UniformGroup from '../shader/UniformGroup';\nimport { DRAW_MODES } from '@pixi/constants';\n\n/**\n * System plugin to the renderer to manage filter states.\n *\n * @class\n * @private\n */\nclass FilterState\n{\n    constructor()\n    {\n        this.renderTexture = null;\n\n        /**\n         * Target of the filters\n         * We store for case when custom filter wants to know the element it was applied on\n         * @member {PIXI.DisplayObject}\n         * @private\n         */\n        this.target = null;\n\n        /**\n         * Compatibility with PixiJS v4 filters\n         * @member {boolean}\n         * @default false\n         * @private\n         */\n        this.legacy = false;\n\n        /**\n         * Resolution of filters\n         * @member {number}\n         * @default 1\n         * @private\n         */\n        this.resolution = 1;\n\n        // next three fields are created only for root\n        // re-assigned for everything else\n\n        /**\n         * Source frame\n         * @member {PIXI.Rectangle}\n         * @private\n         */\n        this.sourceFrame = new Rectangle();\n\n        /**\n         * Destination frame\n         * @member {PIXI.Rectangle}\n         * @private\n         */\n        this.destinationFrame = new Rectangle();\n\n        /**\n         * Collection of filters\n         * @member {PIXI.Filter[]}\n         * @private\n         */\n        this.filters = [];\n    }\n\n    /**\n     * clears the state\n     * @private\n     */\n    clear()\n    {\n        this.target = null;\n        this.filters = null;\n        this.renderTexture = null;\n    }\n}\n\n/**\n * System plugin to the renderer to manage the filters.\n *\n * @class\n * @memberof PIXI.systems\n * @extends PIXI.System\n */\nexport default class FilterSystem extends System\n{\n    /**\n     * @param {PIXI.Renderer} renderer - The renderer this System works for.\n     */\n    constructor(renderer)\n    {\n        super(renderer);\n\n        /**\n         * List of filters for the FilterSystem\n         * @member {Object[]}\n         * @readonly\n         */\n        this.defaultFilterStack = [{}];\n\n        /**\n         * stores a bunch of PO2 textures used for filtering\n         * @member {Object}\n         */\n        this.texturePool = new RenderTexturePool();\n\n        this.texturePool.setScreenSize(renderer.view);\n\n        /**\n         * a pool for storing filter states, save us creating new ones each tick\n         * @member {Object[]}\n         */\n        this.statePool = [];\n\n        /**\n         * A very simple geometry used when drawing a filter effect to the screen\n         * @member {PIXI.Quad}\n         */\n        this.quad = new Quad();\n\n        /**\n         * Quad UVs\n         * @member {PIXI.QuadUv}\n         */\n        this.quadUv = new QuadUv();\n\n        /**\n         * Temporary rect for maths\n         * @type {PIXI.Rectangle}\n         */\n        this.tempRect = new Rectangle();\n\n        /**\n         * Active state\n         * @member {object}\n         */\n        this.activeState = {};\n\n        /**\n         * This uniform group is attached to filter uniforms when used\n         * @member {PIXI.UniformGroup}\n         * @property {PIXI.Rectangle} outputFrame\n         * @property {Float32Array} inputSize\n         * @property {Float32Array} inputPixel\n         * @property {Float32Array} inputClamp\n         * @property {Number} resolution\n         * @property {Float32Array} filterArea\n         * @property {Fload32Array} filterClamp\n         */\n        this.globalUniforms = new UniformGroup({\n            outputFrame: this.tempRect,\n            inputSize: new Float32Array(4),\n            inputPixel: new Float32Array(4),\n            inputClamp: new Float32Array(4),\n            resolution: 1,\n\n            // legacy variables\n            filterArea: new Float32Array(4),\n            filterClamp: new Float32Array(4),\n        }, true);\n\n        this._pixelsWidth = renderer.view.width;\n        this._pixelsHeight = renderer.view.height;\n    }\n\n    /**\n     * Adds a new filter to the System.\n     *\n     * @param {PIXI.DisplayObject} target - The target of the filter to render.\n     * @param {PIXI.Filter[]} filters - The filters to apply.\n     */\n    push(target, filters)\n    {\n        const renderer = this.renderer;\n        const filterStack = this.defaultFilterStack;\n        const state = this.statePool.pop() || new FilterState();\n\n        let resolution = filters[0].resolution;\n        let padding = filters[0].padding;\n        let autoFit = filters[0].autoFit;\n        let legacy = filters[0].legacy;\n\n        for (let i = 1; i < filters.length; i++)\n        {\n            const filter =  filters[i];\n\n            // lets use the lowest resolution..\n            resolution = Math.min(resolution, filter.resolution);\n            // and the largest amount of padding!\n            padding = Math.max(padding, filter.padding);\n            // only auto fit if all filters are autofit\n            autoFit = autoFit || filter.autoFit;\n\n            legacy = legacy || filter.legacy;\n        }\n\n        if (filterStack.length === 1)\n        {\n            this.defaultFilterStack[0].renderTexture = renderer.renderTexture.current;\n        }\n\n        filterStack.push(state);\n\n        state.resolution = resolution;\n\n        state.legacy = legacy;\n\n        state.target = target;\n\n        state.sourceFrame.copyFrom(target.filterArea || target.getBounds(true));\n\n        state.sourceFrame.pad(padding);\n        if (autoFit)\n        {\n            state.sourceFrame.fit(this.renderer.renderTexture.sourceFrame);\n        }\n\n        // round to whole number based on resolution\n        state.sourceFrame.ceil(resolution);\n\n        state.renderTexture = this.getOptimalFilterTexture(state.sourceFrame.width, state.sourceFrame.height, resolution);\n        state.filters = filters;\n\n        state.destinationFrame.width = state.renderTexture.width;\n        state.destinationFrame.height = state.renderTexture.height;\n\n        state.renderTexture.filterFrame = state.sourceFrame;\n\n        renderer.renderTexture.bind(state.renderTexture, state.sourceFrame);// /, state.destinationFrame);\n        renderer.renderTexture.clear();\n    }\n\n    /**\n     * Pops off the filter and applies it.\n     *\n     */\n    pop()\n    {\n        const filterStack = this.defaultFilterStack;\n        const state = filterStack.pop();\n        const filters = state.filters;\n\n        this.activeState = state;\n\n        const globalUniforms = this.globalUniforms.uniforms;\n\n        globalUniforms.outputFrame = state.sourceFrame;\n        globalUniforms.resolution = state.resolution;\n\n        const inputSize = globalUniforms.inputSize;\n        const inputPixel = globalUniforms.inputPixel;\n        const inputClamp = globalUniforms.inputClamp;\n\n        inputSize[0] = state.destinationFrame.width;\n        inputSize[1] = state.destinationFrame.height;\n        inputSize[2] = 1.0 / inputSize[0];\n        inputSize[3] = 1.0 / inputSize[1];\n\n        inputPixel[0] = inputSize[0] * state.resolution;\n        inputPixel[1] = inputSize[1] * state.resolution;\n        inputPixel[2] = 1.0 / inputPixel[0];\n        inputPixel[3] = 1.0 / inputPixel[1];\n\n        inputClamp[0] = 0.5 * inputPixel[2];\n        inputClamp[1] = 0.5 * inputPixel[3];\n        inputClamp[2] = (state.sourceFrame.width * inputSize[2]) - (0.5 * inputPixel[2]);\n        inputClamp[3] = (state.sourceFrame.height * inputSize[3]) - (0.5 * inputPixel[3]);\n\n        // only update the rect if its legacy..\n        if (state.legacy)\n        {\n            const filterArea = globalUniforms.filterArea;\n\n            filterArea[0] = state.destinationFrame.width;\n            filterArea[1] = state.destinationFrame.height;\n            filterArea[2] = state.sourceFrame.x;\n            filterArea[3] = state.sourceFrame.y;\n\n            globalUniforms.filterClamp = globalUniforms.inputClamp;\n        }\n\n        this.globalUniforms.update();\n\n        const lastState = filterStack[filterStack.length - 1];\n\n        if (filters.length === 1)\n        {\n            filters[0].apply(this, state.renderTexture, lastState.renderTexture, false, state);\n\n            this.returnFilterTexture(state.renderTexture);\n        }\n        else\n        {\n            let flip = state.renderTexture;\n            let flop = this.getOptimalFilterTexture(\n                flip.width,\n                flip.height,\n                state.resolution\n            );\n\n            flop.filterFrame = flip.filterFrame;\n\n            let i = 0;\n\n            for (i = 0; i < filters.length - 1; ++i)\n            {\n                filters[i].apply(this, flip, flop, true, state);\n\n                const t = flip;\n\n                flip = flop;\n                flop = t;\n            }\n\n            filters[i].apply(this, flip, lastState.renderTexture, false, state);\n\n            this.returnFilterTexture(flip);\n            this.returnFilterTexture(flop);\n        }\n\n        state.clear();\n        this.statePool.push(state);\n    }\n\n    /**\n     * Draws a filter.\n     *\n     * @param {PIXI.Filter} filter - The filter to draw.\n     * @param {PIXI.RenderTexture} input - The input render target.\n     * @param {PIXI.RenderTexture} output - The target to output to.\n     * @param {boolean} clear - Should the output be cleared before rendering to it\n     */\n    applyFilter(filter, input, output, clear)\n    {\n        const renderer = this.renderer;\n\n        renderer.renderTexture.bind(output, output ? output.filterFrame : null);\n\n        if (clear)\n        {\n            // gl.disable(gl.SCISSOR_TEST);\n            renderer.renderTexture.clear();\n            // gl.enable(gl.SCISSOR_TEST);\n        }\n\n        // set the uniforms..\n        filter.uniforms.uSampler = input;\n        filter.uniforms.filterGlobals = this.globalUniforms;\n\n        // TODO make it so that the order of this does not matter..\n        // because it does at the moment cos of global uniforms.\n        // they need to get resynced\n\n        renderer.state.set(filter.state);\n        renderer.shader.bind(filter);\n\n        if (filter.legacy)\n        {\n            this.quadUv.map(input._frame, input.filterFrame);\n\n            renderer.geometry.bind(this.quadUv);\n            renderer.geometry.draw(DRAW_MODES.TRIANGLES);\n        }\n        else\n        {\n            renderer.geometry.bind(this.quad);\n            renderer.geometry.draw(DRAW_MODES.TRIANGLE_STRIP);\n        }\n    }\n\n    /**\n     * Multiply _input normalized coordinates_ to this matrix to get _sprite texture normalized coordinates_.\n     *\n     * Use `outputMatrix * vTextureCoord` in the shader.\n     *\n     * @param {PIXI.Matrix} outputMatrix - The matrix to output to.\n     * @param {PIXI.Sprite} sprite - The sprite to map to.\n     * @return {PIXI.Matrix} The mapped matrix.\n     */\n    calculateSpriteMatrix(outputMatrix, sprite)\n    {\n        const { sourceFrame, destinationFrame } = this.activeState;\n        const { orig } = sprite._texture;\n        const mappedMatrix = outputMatrix.set(destinationFrame.width, 0, 0,\n            destinationFrame.height, sourceFrame.x, sourceFrame.y);\n        const worldTransform = sprite.worldTransform.copyTo(Matrix.TEMP_MATRIX);\n\n        worldTransform.invert();\n        mappedMatrix.prepend(worldTransform);\n        mappedMatrix.scale(1.0 / orig.width, 1.0 / orig.height);\n        mappedMatrix.translate(sprite.anchor.x, sprite.anchor.y);\n\n        return mappedMatrix;\n    }\n\n    /**\n     * Destroys this Filter System.\n     */\n    destroy()\n    {\n        // Those textures has to be destroyed by RenderTextureSystem or FramebufferSystem\n        this.texturePool.clear(false);\n    }\n\n    /**\n     * Gets a Power-of-Two render texture or fullScreen texture\n     *\n     * @protected\n     * @param {number} minWidth - The minimum width of the render texture in real pixels.\n     * @param {number} minHeight - The minimum height of the render texture in real pixels.\n     * @param {number} [resolution=1] - The resolution of the render texture.\n     * @return {PIXI.RenderTexture} The new render texture.\n     */\n    getOptimalFilterTexture(minWidth, minHeight, resolution = 1)\n    {\n        return this.texturePool.getOptimalTexture(minWidth, minHeight, resolution);\n    }\n\n    /**\n     * Gets extra render texture to use inside current filter\n     * To be compliant with older filters, you can use params in any order\n     *\n     * @param {PIXI.RenderTexture} [input] renderTexture from which size and resolution will be copied\n     * @param {number} [resolution] override resolution of the renderTexture\n     * @returns {PIXI.RenderTexture}\n     */\n    getFilterTexture(input, resolution)\n    {\n        if (typeof input === 'number')\n        {\n            const swap = input;\n\n            input = resolution;\n            resolution = swap;\n        }\n\n        input = input || this.activeState.renderTexture;\n\n        const filterTexture = this.texturePool.getOptimalTexture(input.width, input.height, resolution || input.resolution);\n\n        filterTexture.filterFrame = input.filterFrame;\n\n        return filterTexture;\n    }\n\n    /**\n     * Frees a render texture back into the pool.\n     *\n     * @param {PIXI.RenderTexture} renderTexture - The renderTarget to free\n     */\n    returnFilterTexture(renderTexture)\n    {\n        this.texturePool.returnTexture(renderTexture);\n    }\n\n    /**\n     * Empties the texture pool.\n     */\n    emptyPool()\n    {\n        this.texturePool.clear(true);\n    }\n\n    /**\n     * calls `texturePool.resize()`, affects fullScreen renderTextures\n     */\n    resize()\n    {\n        this.texturePool.setScreenSize(this.renderer.view);\n    }\n}\n","/**\n * Base for a common object renderer that can be used as a\n * system renderer plugin.\n *\n * @class\n * @extends PIXI.System\n * @memberof PIXI\n */\nexport default class ObjectRenderer\n{\n    /**\n     * @param {PIXI.Renderer} renderer - The renderer this manager works for.\n     */\n    constructor(renderer)\n    {\n        /**\n         * The renderer this manager works for.\n         *\n         * @member {PIXI.Renderer}\n         */\n        this.renderer = renderer;\n    }\n\n    /**\n     * Stub method that should be used to empty the current\n     * batch by rendering objects now.\n     */\n    flush()\n    {\n        // flush!\n    }\n\n    /**\n     * Generic destruction method that frees all resources. This\n     * should be called by subclasses.\n     */\n    destroy()\n    {\n        this.renderer = null;\n    }\n\n    /**\n     * Stub method that initializes any state required before\n     * rendering starts. It is different from the `prerender`\n     * signal, which occurs every frame, in that it is called\n     * whenever an object requests _this_ renderer specifically.\n     */\n    start()\n    {\n        // set the shader..\n    }\n\n    /**\n     * Stops the renderer. It should free up any state and\n     * become dormant.\n     */\n    stop()\n    {\n        this.flush();\n    }\n\n    /**\n     * Keeps the object to render. It doesn't have to be\n     * rendered immediately.\n     *\n     * @param {PIXI.DisplayObject} object - The object to render.\n     */\n    render(object) // eslint-disable-line no-unused-vars\n    {\n        // render the object\n    }\n}\n","import System from '../System';\nimport ObjectRenderer from './ObjectRenderer';\n\n/**\n * System plugin to the renderer to manage batching.\n *\n * @class\n * @extends PIXI.System\n * @memberof PIXI.systems\n */\nexport default class BatchSystem extends System\n{\n    /**\n     * @param {PIXI.Renderer} renderer - The renderer this System works for.\n     */\n    constructor(renderer)\n    {\n        super(renderer);\n\n        /**\n         * An empty renderer.\n         *\n         * @member {PIXI.ObjectRenderer}\n         */\n        this.emptyRenderer = new ObjectRenderer(renderer);\n\n        /**\n         * The currently active ObjectRenderer.\n         *\n         * @member {PIXI.ObjectRenderer}\n         */\n        this.currentRenderer = this.emptyRenderer;\n    }\n\n    /**\n     * Changes the current renderer to the one given in parameter\n     *\n     * @param {PIXI.ObjectRenderer} objectRenderer - The object renderer to use.\n     */\n    setObjectRenderer(objectRenderer)\n    {\n        if (this.currentRenderer === objectRenderer)\n        {\n            return;\n        }\n\n        this.currentRenderer.stop();\n        this.currentRenderer = objectRenderer;\n\n        this.currentRenderer.start();\n    }\n\n    /**\n     * This should be called if you wish to do some custom rendering\n     * It will basically render anything that may be batched up such as sprites\n     */\n    flush()\n    {\n        this.setObjectRenderer(this.emptyRenderer);\n    }\n\n    /**\n     * Reset the system to an empty renderer\n     */\n    reset()\n    {\n        this.setObjectRenderer(this.emptyRenderer);\n    }\n}\n","import { settings } from '@pixi/settings';\nimport { ENV } from '@pixi/constants';\nimport { isMobile } from '@pixi/utils';\n\n/**\n * The maximum support for using WebGL. If a device does not\n * support WebGL version, for instance WebGL 2, it will still\n * attempt to fallback support to WebGL 1. If you want to\n * explicitly remove feature support to target a more stable\n * baseline, prefer a lower environment.\n *\n * Due to {@link https://bugs.chromium.org/p/chromium/issues/detail?id=934823|bug in chromium}\n * we disable webgl2 by default for all non-apple mobile devices.\n *\n * @static\n * @name PREFER_ENV\n * @memberof PIXI.settings\n * @type {number}\n * @default PIXI.ENV.WEBGL2\n */\nsettings.PREFER_ENV = isMobile.any ? ENV.WEBGL : ENV.WEBGL2;\n\nexport { settings };\n","import System from '../System';\nimport { settings } from '../settings';\nimport { ENV } from '@pixi/constants';\n\nlet CONTEXT_UID = 0;\n\n/**\n * System plugin to the renderer to manage the context.\n *\n * @class\n * @extends PIXI.System\n * @memberof PIXI.systems\n */\nexport default class ContextSystem extends System\n{\n    /**\n     * @param {PIXI.Renderer} renderer - The renderer this System works for.\n     */\n    constructor(renderer)\n    {\n        super(renderer);\n\n        /**\n         * Either 1 or 2 to reflect the WebGL version being used\n         * @member {number}\n         * @readonly\n         */\n        this.webGLVersion = 1;\n\n        /**\n         * Extensions being used\n         * @member {object}\n         * @readonly\n         * @property {WEBGL_draw_buffers} drawBuffers - WebGL v1 extension\n         * @property {WEBGL_depth_texture} depthTexture - WebGL v1 extension\n         * @property {OES_texture_float} floatTexture - WebGL v1 extension\n         * @property {WEBGL_lose_context} loseContext - WebGL v1 extension\n         * @property {OES_vertex_array_object} vertexArrayObject - WebGL v1 extension\n         * @property {EXT_texture_filter_anisotropic} anisotropicFiltering - WebGL v1 and v2 extension\n         */\n        this.extensions = {};\n\n        // Bind functions\n        this.handleContextLost = this.handleContextLost.bind(this);\n        this.handleContextRestored = this.handleContextRestored.bind(this);\n\n        renderer.view.addEventListener('webglcontextlost', this.handleContextLost, false);\n        renderer.view.addEventListener('webglcontextrestored', this.handleContextRestored, false);\n    }\n\n    /**\n     * `true` if the context is lost\n     * @member {boolean}\n     * @readonly\n     */\n    get isLost()\n    {\n        return (!this.gl || this.gl.isContextLost());\n    }\n\n    /**\n     * Handle the context change event\n     * @param {WebGLRenderingContext} gl new webgl context\n     */\n    contextChange(gl)\n    {\n        this.gl = gl;\n        this.renderer.gl = gl;\n        this.renderer.CONTEXT_UID = CONTEXT_UID++;\n\n        // restore a context if it was previously lost\n        if (gl.isContextLost() && gl.getExtension('WEBGL_lose_context'))\n        {\n            gl.getExtension('WEBGL_lose_context').restoreContext();\n        }\n    }\n\n    /**\n     * Initialize the context\n     *\n     * @protected\n     * @param {WebGLRenderingContext} gl - WebGL context\n     */\n    initFromContext(gl)\n    {\n        this.gl = gl;\n        this.validateContext(gl);\n        this.renderer.gl = gl;\n        this.renderer.CONTEXT_UID = CONTEXT_UID++;\n        this.renderer.runners.contextChange.run(gl);\n    }\n\n    /**\n     * Initialize from context options\n     *\n     * @protected\n     * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/getContext\n     * @param {object} options - context attributes\n     */\n    initFromOptions(options)\n    {\n        const gl = this.createContext(this.renderer.view, options);\n\n        this.initFromContext(gl);\n    }\n\n    /**\n     * Helper class to create a WebGL Context\n     *\n     * @param canvas {HTMLCanvasElement} the canvas element that we will get the context from\n     * @param options {object} An options object that gets passed in to the canvas element containing the context attributes\n     * @see https://developer.mozilla.org/en/docs/Web/API/HTMLCanvasElement/getContext\n     * @return {WebGLRenderingContext} the WebGL context\n     */\n    createContext(canvas, options)\n    {\n        let gl;\n\n        if (settings.PREFER_ENV >= ENV.WEBGL2)\n        {\n            gl = canvas.getContext('webgl2', options);\n        }\n\n        if (gl)\n        {\n            this.webGLVersion = 2;\n        }\n        else\n        {\n            this.webGLVersion = 1;\n\n            gl = canvas.getContext('webgl', options)\n            || canvas.getContext('experimental-webgl', options);\n\n            if (!gl)\n            {\n                // fail, not able to get a context\n                throw new Error('This browser does not support WebGL. Try using the canvas renderer');\n            }\n        }\n\n        this.gl = gl;\n\n        this.getExtensions();\n\n        return gl;\n    }\n\n    /**\n     * Auto-populate the extensions\n     *\n     * @protected\n     */\n    getExtensions()\n    {\n        // time to set up default extensions that Pixi uses.\n        const { gl } = this;\n\n        if (this.webGLVersion === 1)\n        {\n            Object.assign(this.extensions, {\n                drawBuffers: gl.getExtension('WEBGL_draw_buffers'),\n                depthTexture: gl.getExtension('WEBKIT_WEBGL_depth_texture'),\n                loseContext: gl.getExtension('WEBGL_lose_context'),\n                vertexArrayObject: gl.getExtension('OES_vertex_array_object')\n                    || gl.getExtension('MOZ_OES_vertex_array_object')\n                    || gl.getExtension('WEBKIT_OES_vertex_array_object'),\n                anisotropicFiltering: gl.getExtension('EXT_texture_filter_anisotropic'),\n                uint32ElementIndex: gl.getExtension('OES_element_index_uint'),\n                // Floats and half-floats\n                floatTexture: gl.getExtension('OES_texture_float'),\n                floatTextureLinear: gl.getExtension('OES_texture_float_linear'),\n                textureHalfFloat: gl.getExtension('OES_texture_half_float'),\n                textureHalfFloatLinear: gl.getExtension('OES_texture_half_float_linear'),\n            });\n        }\n        else if (this.webGLVersion === 2)\n        {\n            Object.assign(this.extensions, {\n                anisotropicFiltering: gl.getExtension('EXT_texture_filter_anisotropic'),\n                // Floats and half-floats\n                colorBufferFloat: gl.getExtension('EXT_color_buffer_float'),\n                floatTextureLinear: gl.getExtension('OES_texture_float_linear'),\n            });\n        }\n    }\n\n    /**\n     * Handles a lost webgl context\n     *\n     * @protected\n     * @param {WebGLContextEvent} event - The context lost event.\n     */\n    handleContextLost(event)\n    {\n        event.preventDefault();\n    }\n\n    /**\n     * Handles a restored webgl context\n     *\n     * @protected\n     */\n    handleContextRestored()\n    {\n        this.renderer.runners.contextChange.run(this.gl);\n    }\n\n    destroy()\n    {\n        const view = this.renderer.view;\n\n        // remove listeners\n        view.removeEventListener('webglcontextlost', this.handleContextLost);\n        view.removeEventListener('webglcontextrestored', this.handleContextRestored);\n\n        this.gl.useProgram(null);\n\n        if (this.extensions.loseContext)\n        {\n            this.extensions.loseContext.loseContext();\n        }\n    }\n\n    /**\n     * Handle the post-render runner event\n     *\n     * @protected\n     */\n    postrender()\n    {\n        this.gl.flush();\n    }\n\n    /**\n     * Validate context\n     *\n     * @protected\n     * @param {WebGLRenderingContext} gl - Render context\n     */\n    validateContext(gl)\n    {\n        const attributes = gl.getContextAttributes();\n\n        // this is going to be fairly simple for now.. but at least we have room to grow!\n        if (!attributes.stencil)\n        {\n            /* eslint-disable max-len */\n\n            /* eslint-disable no-console */\n            console.warn('Provided WebGL context does not have a stencil buffer, masks may not render correctly');\n            /* eslint-enable no-console */\n\n            /* eslint-enable max-len */\n        }\n    }\n}\n","import System from '../System';\nimport { Rectangle } from '@pixi/math';\nimport { ENV } from '@pixi/constants';\nimport { settings } from '../settings';\nimport Framebuffer from './Framebuffer';\n\n/**\n * System plugin to the renderer to manage framebuffers.\n *\n * @class\n * @extends PIXI.System\n * @memberof PIXI.systems\n */\nexport default class FramebufferSystem extends System\n{\n    /**\n     * @param {PIXI.Renderer} renderer - The renderer this System works for.\n     */\n    constructor(renderer)\n    {\n        super(renderer);\n\n        /**\n         * A list of managed framebuffers\n         * @member {PIXI.Framebuffer[]}\n         * @readonly\n         */\n        this.managedFramebuffers = [];\n\n        /**\n         * Framebuffer value that shows that we don't know what is bound\n         * @member {Framebuffer}\n         * @readonly\n         */\n        this.unknownFramebuffer = new Framebuffer(10, 10);\n    }\n\n    /**\n     * Sets up the renderer context and necessary buffers.\n     */\n    contextChange()\n    {\n        const gl = this.gl = this.renderer.gl;\n\n        this.CONTEXT_UID = this.renderer.CONTEXT_UID;\n        this.current = this.unknownFramebuffer;\n        this.viewport = new Rectangle();\n        this.hasMRT = true;\n        this.writeDepthTexture = true;\n\n        this.disposeAll(true);\n\n        // webgl2\n        if (this.renderer.context.webGLVersion === 1)\n        {\n            // webgl 1!\n            let nativeDrawBuffersExtension = this.renderer.context.extensions.drawBuffers;\n            let nativeDepthTextureExtension = this.renderer.context.extensions.depthTexture;\n\n            if (settings.PREFER_ENV === ENV.WEBGL_LEGACY)\n            {\n                nativeDrawBuffersExtension = null;\n                nativeDepthTextureExtension = null;\n            }\n\n            if (nativeDrawBuffersExtension)\n            {\n                gl.drawBuffers = (activeTextures) =>\n                    nativeDrawBuffersExtension.drawBuffersWEBGL(activeTextures);\n            }\n            else\n            {\n                this.hasMRT = false;\n                gl.drawBuffers = () =>\n                {\n                    // empty\n                };\n            }\n\n            if (!nativeDepthTextureExtension)\n            {\n                this.writeDepthTexture = false;\n            }\n        }\n    }\n\n    /**\n     * Bind a framebuffer\n     *\n     * @param {PIXI.Framebuffer} framebuffer\n     * @param {PIXI.Rectangle} [frame] frame, default is framebuffer size\n     */\n    bind(framebuffer, frame)\n    {\n        const { gl } = this;\n\n        if (framebuffer)\n        {\n            // TODO caching layer!\n\n            const fbo = framebuffer.glFramebuffers[this.CONTEXT_UID] || this.initFramebuffer(framebuffer);\n\n            if (this.current !== framebuffer)\n            {\n                this.current = framebuffer;\n                gl.bindFramebuffer(gl.FRAMEBUFFER, fbo.framebuffer);\n            }\n            // make sure all textures are unbound..\n\n            // now check for updates...\n            if (fbo.dirtyId !== framebuffer.dirtyId)\n            {\n                fbo.dirtyId = framebuffer.dirtyId;\n\n                if (fbo.dirtyFormat !== framebuffer.dirtyFormat)\n                {\n                    fbo.dirtyFormat = framebuffer.dirtyFormat;\n                    this.updateFramebuffer(framebuffer);\n                }\n                else if (fbo.dirtySize !== framebuffer.dirtySize)\n                {\n                    fbo.dirtySize = framebuffer.dirtySize;\n                    this.resizeFramebuffer(framebuffer);\n                }\n            }\n\n            for (let i = 0; i < framebuffer.colorTextures.length; i++)\n            {\n                if (framebuffer.colorTextures[i].texturePart)\n                {\n                    this.renderer.texture.unbind(framebuffer.colorTextures[i].texture);\n                }\n                else\n                {\n                    this.renderer.texture.unbind(framebuffer.colorTextures[i]);\n                }\n            }\n\n            if (framebuffer.depthTexture)\n            {\n                this.renderer.texture.unbind(framebuffer.depthTexture);\n            }\n\n            if (frame)\n            {\n                this.setViewport(frame.x, frame.y, frame.width, frame.height);\n            }\n            else\n            {\n                this.setViewport(0, 0, framebuffer.width, framebuffer.height);\n            }\n        }\n        else\n        {\n            if (this.current)\n            {\n                this.current = null;\n                gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n            }\n\n            if (frame)\n            {\n                this.setViewport(frame.x, frame.y, frame.width, frame.height);\n            }\n            else\n            {\n                this.setViewport(0, 0, this.renderer.width, this.renderer.height);\n            }\n        }\n    }\n\n    /**\n     * Set the WebGLRenderingContext's viewport.\n     *\n     * @param {Number} x - X position of viewport\n     * @param {Number} y - Y position of viewport\n     * @param {Number} width - Width of viewport\n     * @param {Number} height - Height of viewport\n     */\n    setViewport(x, y, width, height)\n    {\n        const v = this.viewport;\n\n        if (v.width !== width || v.height !== height || v.x !== x || v.y !== y)\n        {\n            v.x = x;\n            v.y = y;\n            v.width = width;\n            v.height = height;\n\n            this.gl.viewport(x, y, width, height);\n        }\n    }\n\n    /**\n     * Get the size of the current width and height. Returns object with `width` and `height` values.\n     *\n     * @member {object}\n     * @readonly\n     */\n    get size()\n    {\n        if (this.current)\n        {\n            // TODO store temp\n            return { x: 0, y: 0, width: this.current.width, height: this.current.height };\n        }\n\n        return { x: 0, y: 0, width: this.renderer.width, height: this.renderer.height };\n    }\n\n    /**\n     * Clear the color of the context\n     *\n     * @param {Number} r - Red value from 0 to 1\n     * @param {Number} g - Green value from 0 to 1\n     * @param {Number} b - Blue value from 0 to 1\n     * @param {Number} a - Alpha value from 0 to 1\n     */\n    clear(r, g, b, a)\n    {\n        const { gl } = this;\n\n        // TODO clear color can be set only one right?\n        gl.clearColor(r, g, b, a);\n        gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n    }\n\n    /**\n     * Initialize framebuffer\n     *\n     * @protected\n     * @param {PIXI.Framebuffer} framebuffer\n     */\n    initFramebuffer(framebuffer)\n    {\n        const { gl } = this;\n\n        // TODO - make this a class?\n        const fbo = {\n            framebuffer: gl.createFramebuffer(),\n            stencil: null,\n            dirtyId: 0,\n            dirtyFormat: 0,\n            dirtySize: 0,\n        };\n\n        framebuffer.glFramebuffers[this.CONTEXT_UID] = fbo;\n\n        this.managedFramebuffers.push(framebuffer);\n        framebuffer.disposeRunner.add(this);\n\n        return fbo;\n    }\n\n    /**\n     * Resize the framebuffer\n     *\n     * @protected\n     * @param {PIXI.Framebuffer} framebuffer\n     */\n    resizeFramebuffer(framebuffer)\n    {\n        const { gl } = this;\n\n        const fbo = framebuffer.glFramebuffers[this.CONTEXT_UID];\n\n        if (fbo.stencil)\n        {\n            gl.bindRenderbuffer(gl.RENDERBUFFER, fbo.stencil);\n            gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_STENCIL, framebuffer.width, framebuffer.height);\n        }\n\n        const colorTextures = framebuffer.colorTextures;\n\n        for (let i = 0; i < colorTextures.length; i++)\n        {\n            this.renderer.texture.bind(colorTextures[i], 0);\n        }\n\n        if (framebuffer.depthTexture)\n        {\n            this.renderer.texture.bind(framebuffer.depthTexture, 0);\n        }\n    }\n\n    /**\n     * Update the framebuffer\n     *\n     * @protected\n     * @param {PIXI.Framebuffer} framebuffer\n     */\n    updateFramebuffer(framebuffer)\n    {\n        const { gl } = this;\n\n        const fbo = framebuffer.glFramebuffers[this.CONTEXT_UID];\n\n        // bind the color texture\n        const colorTextures = framebuffer.colorTextures;\n\n        let count = colorTextures.length;\n\n        if (!gl.drawBuffers)\n        {\n            count = Math.min(count, 1);\n        }\n\n        const activeTextures = [];\n\n        for (let i = 0; i < count; i++)\n        {\n            const texture = framebuffer.colorTextures[i];\n\n            if (texture.texturePart)\n            {\n                this.renderer.texture.bind(texture.texture, 0);\n\n                gl.framebufferTexture2D(gl.FRAMEBUFFER,\n                    gl.COLOR_ATTACHMENT0 + i,\n                    gl.TEXTURE_CUBE_MAP_NEGATIVE_X + texture.side,\n                    texture.texture._glTextures[this.CONTEXT_UID].texture,\n                    0);\n            }\n            else\n            {\n                this.renderer.texture.bind(texture, 0);\n\n                gl.framebufferTexture2D(gl.FRAMEBUFFER,\n                    gl.COLOR_ATTACHMENT0 + i,\n                    gl.TEXTURE_2D,\n                    texture._glTextures[this.CONTEXT_UID].texture,\n                    0);\n            }\n\n            activeTextures.push(gl.COLOR_ATTACHMENT0 + i);\n        }\n\n        if (activeTextures.length > 1)\n        {\n            gl.drawBuffers(activeTextures);\n        }\n\n        if (framebuffer.depthTexture)\n        {\n            const writeDepthTexture = this.writeDepthTexture;\n\n            if (writeDepthTexture)\n            {\n                const depthTexture = framebuffer.depthTexture;\n\n                this.renderer.texture.bind(depthTexture, 0);\n\n                gl.framebufferTexture2D(gl.FRAMEBUFFER,\n                    gl.DEPTH_ATTACHMENT,\n                    gl.TEXTURE_2D,\n                    depthTexture._glTextures[this.CONTEXT_UID].texture,\n                    0);\n            }\n        }\n\n        if (!fbo.stencil && (framebuffer.stencil || framebuffer.depth))\n        {\n            fbo.stencil = gl.createRenderbuffer();\n\n            gl.bindRenderbuffer(gl.RENDERBUFFER, fbo.stencil);\n\n            gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_STENCIL, framebuffer.width, framebuffer.height);\n            // TODO.. this is depth AND stencil?\n            if (!framebuffer.depthTexture)\n            { // you can't have both, so one should take priority if enabled\n                gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_STENCIL_ATTACHMENT, gl.RENDERBUFFER, fbo.stencil);\n            }\n        }\n    }\n\n    /**\n     * Disposes framebuffer\n     * @param {PIXI.Framebuffer} framebuffer framebuffer that has to be disposed of\n     * @param {boolean} [contextLost=false] If context was lost, we suppress all delete function calls\n     */\n    disposeFramebuffer(framebuffer, contextLost)\n    {\n        const fbo = framebuffer.glFramebuffers[this.CONTEXT_UID];\n        const gl = this.gl;\n\n        if (!fbo)\n        {\n            return;\n        }\n\n        delete framebuffer.glFramebuffers[this.CONTEXT_UID];\n\n        const index = this.managedFramebuffers.indexOf(framebuffer);\n\n        if (index >= 0)\n        {\n            this.managedFramebuffers.splice(index, 1);\n        }\n\n        framebuffer.disposeRunner.remove(this);\n\n        if (!contextLost)\n        {\n            gl.deleteFramebuffer(fbo.framebuffer);\n            if (fbo.stencil)\n            {\n                gl.deleteRenderbuffer(fbo.stencil);\n            }\n        }\n    }\n\n    /**\n     * Disposes all framebuffers, but not textures bound to them\n     * @param {boolean} [contextLost=false] If context was lost, we suppress all delete function calls\n     */\n    disposeAll(contextLost)\n    {\n        const list = this.managedFramebuffers;\n\n        this.managedFramebuffers = [];\n\n        for (let i = 0; i < list.length; i++)\n        {\n            this.disposeFramebuffer(list[i], contextLost);\n        }\n    }\n\n    /**\n     * Forcing creation of stencil buffer for current framebuffer, if it wasn't done before.\n     * Used by MaskSystem, when its time to use stencil mask for Graphics element.\n     *\n     * Its an alternative for public lazy `framebuffer.enableStencil`, in case we need stencil without rebind.\n     *\n     * @private\n     */\n    forceStencil()\n    {\n        const framebuffer = this.current;\n\n        if (!framebuffer)\n        {\n            return;\n        }\n\n        const fbo = framebuffer.glFramebuffers[this.CONTEXT_UID];\n\n        if (!fbo || fbo.stencil)\n        {\n            return;\n        }\n        framebuffer.enableStencil();\n\n        const w = framebuffer.width;\n        const h = framebuffer.height;\n        const gl = this.gl;\n        const stencil = gl.createRenderbuffer();\n\n        gl.bindRenderbuffer(gl.RENDERBUFFER, stencil);\n        gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_STENCIL, w, h);\n\n        fbo.stencil = stencil;\n        gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.STENCIL_ATTACHMENT, gl.RENDERBUFFER, stencil);\n        gl.bindFramebuffer(gl.FRAMEBUFFER, fbo.framebuffer);\n    }\n\n    /**\n     * resets framebuffer stored state, binds screen framebuffer\n     *\n     * should be called before renderTexture reset()\n     */\n    reset()\n    {\n        this.current = this.unknownFramebuffer;\n        this.viewport = new Rectangle();\n    }\n}\n","export default class GLBuffer\n{\n    constructor(buffer)\n    {\n        this.buffer = buffer;\n        this.updateID = -1;\n        this.byteLength = -1;\n        this.refCount = 0;\n    }\n}\n","import System from '../System';\nimport GLBuffer from './GLBuffer';\nimport { ENV } from '@pixi/constants';\nimport { settings } from '../settings';\n\nconst byteSizeMap = { 5126: 4, 5123: 2, 5121: 1 };\n\n/**\n * System plugin to the renderer to manage geometry.\n *\n * @class\n * @extends PIXI.System\n * @memberof PIXI.systems\n */\nexport default class GeometrySystem extends System\n{\n    /**\n     * @param {PIXI.Renderer} renderer - The renderer this System works for.\n     */\n    constructor(renderer)\n    {\n        super(renderer);\n\n        this._activeGeometry = null;\n        this._activeVao = null;\n\n        /**\n         * `true` if we has `*_vertex_array_object` extension\n         * @member {boolean}\n         * @readonly\n         */\n        this.hasVao = true;\n\n        /**\n         * `true` if has `ANGLE_instanced_arrays` extension\n         * @member {boolean}\n         * @readonly\n         */\n        this.hasInstance = true;\n\n        /**\n         * `true` if support `gl.UNSIGNED_INT` in `gl.drawElements` or `gl.drawElementsInstanced`\n         * @member {boolean}\n         * @readonly\n         */\n        this.canUseUInt32ElementIndex = false;\n\n        /**\n         * A cache of currently bound buffer,\n         * contains only two members with keys ARRAY_BUFFER and ELEMENT_ARRAY_BUFFER\n         * @member {Object.<number, PIXI.Buffer>}\n         * @readonly\n         */\n        this.boundBuffers = {};\n\n        /**\n         * Cache for all geometries by id, used in case renderer gets destroyed or for profiling\n         * @member {object}\n         * @readonly\n         */\n        this.managedGeometries = {};\n\n        /**\n         * Cache for all buffers by id, used in case renderer gets destroyed or for profiling\n         * @member {object}\n         * @readonly\n         */\n        this.managedBuffers = {};\n    }\n\n    /**\n     * Sets up the renderer context and necessary buffers.\n     */\n    contextChange()\n    {\n        this.disposeAll(true);\n\n        const gl = this.gl = this.renderer.gl;\n        const context = this.renderer.context;\n\n        this.CONTEXT_UID = this.renderer.CONTEXT_UID;\n\n        // webgl2\n        if (!gl.createVertexArray)\n        {\n            // webgl 1!\n            let nativeVaoExtension = this.renderer.context.extensions.vertexArrayObject;\n\n            if (settings.PREFER_ENV === ENV.WEBGL_LEGACY)\n            {\n                nativeVaoExtension = null;\n            }\n\n            if (nativeVaoExtension)\n            {\n                gl.createVertexArray = () =>\n                    nativeVaoExtension.createVertexArrayOES();\n\n                gl.bindVertexArray = (vao) =>\n                    nativeVaoExtension.bindVertexArrayOES(vao);\n\n                gl.deleteVertexArray = (vao) =>\n                    nativeVaoExtension.deleteVertexArrayOES(vao);\n            }\n            else\n            {\n                this.hasVao = false;\n                gl.createVertexArray = () =>\n                {\n                    // empty\n                };\n\n                gl.bindVertexArray = () =>\n                {\n                    // empty\n                };\n\n                gl.deleteVertexArray = () =>\n                {\n                    // empty\n                };\n            }\n        }\n\n        if (!gl.vertexAttribDivisor)\n        {\n            const instanceExt = gl.getExtension('ANGLE_instanced_arrays');\n\n            if (instanceExt)\n            {\n                gl.vertexAttribDivisor = (a, b) =>\n                    instanceExt.vertexAttribDivisorANGLE(a, b);\n\n                gl.drawElementsInstanced = (a, b, c, d, e) =>\n                    instanceExt.drawElementsInstancedANGLE(a, b, c, d, e);\n\n                gl.drawArraysInstanced = (a, b, c, d) =>\n                    instanceExt.drawArraysInstancedANGLE(a, b, c, d);\n            }\n            else\n            {\n                this.hasInstance = false;\n            }\n        }\n\n        this.canUseUInt32ElementIndex = context.webGLVersion === 2 || !!context.extensions.uint32ElementIndex;\n    }\n\n    /**\n     * Binds geometry so that is can be drawn. Creating a Vao if required\n     *\n     * @param {PIXI.Geometry} geometry instance of geometry to bind\n     * @param {PIXI.Shader} [shader] instance of shader to use vao for\n     */\n    bind(geometry, shader)\n    {\n        shader = shader || this.renderer.shader.shader;\n\n        const { gl } = this;\n\n        // not sure the best way to address this..\n        // currently different shaders require different VAOs for the same geometry\n        // Still mulling over the best way to solve this one..\n        // will likely need to modify the shader attribute locations at run time!\n        let vaos = geometry.glVertexArrayObjects[this.CONTEXT_UID];\n\n        if (!vaos)\n        {\n            this.managedGeometries[geometry.id] = geometry;\n            geometry.disposeRunner.add(this);\n            geometry.glVertexArrayObjects[this.CONTEXT_UID] = vaos = {};\n        }\n\n        const vao = vaos[shader.program.id] || this.initGeometryVao(geometry, shader.program);\n\n        this._activeGeometry = geometry;\n\n        if (this._activeVao !== vao)\n        {\n            this._activeVao = vao;\n\n            if (this.hasVao)\n            {\n                gl.bindVertexArray(vao);\n            }\n            else\n            {\n                this.activateVao(geometry, shader.program);\n            }\n        }\n\n        // TODO - optimise later!\n        // don't need to loop through if nothing changed!\n        // maybe look to add an 'autoupdate' to geometry?\n        this.updateBuffers();\n    }\n\n    /**\n     * Reset and unbind any active VAO and geometry\n     */\n    reset()\n    {\n        this.unbind();\n    }\n\n    /**\n     * Update buffers\n     * @protected\n     */\n    updateBuffers()\n    {\n        const geometry = this._activeGeometry;\n        const { gl } = this;\n\n        for (let i = 0; i < geometry.buffers.length; i++)\n        {\n            const buffer = geometry.buffers[i];\n\n            const glBuffer = buffer._glBuffers[this.CONTEXT_UID];\n\n            if (buffer._updateID !== glBuffer.updateID)\n            {\n                glBuffer.updateID = buffer._updateID;\n\n                // TODO can cache this on buffer! maybe added a getter / setter?\n                const type = buffer.index ? gl.ELEMENT_ARRAY_BUFFER : gl.ARRAY_BUFFER;\n\n                // TODO this could change if the VAO changes...\n                // need to come up with a better way to cache..\n                // if (this.boundBuffers[type] !== glBuffer)\n                // {\n                // this.boundBuffers[type] = glBuffer;\n                gl.bindBuffer(type, glBuffer.buffer);\n                // }\n\n                this._boundBuffer = glBuffer;\n\n                if (glBuffer.byteLength >= buffer.data.byteLength)\n                {\n                    // offset is always zero for now!\n                    gl.bufferSubData(type, 0, buffer.data);\n                }\n                else\n                {\n                    const drawType = buffer.static ? gl.STATIC_DRAW : gl.DYNAMIC_DRAW;\n\n                    glBuffer.byteLength = buffer.data.byteLength;\n                    gl.bufferData(type, buffer.data, drawType);\n                }\n            }\n        }\n    }\n\n    /**\n     * Check compability between a geometry and a program\n     * @protected\n     * @param {PIXI.Geometry} geometry - Geometry instance\n     * @param {PIXI.Program} program - Program instance\n     */\n    checkCompatibility(geometry, program)\n    {\n        // geometry must have at least all the attributes that the shader requires.\n        const geometryAttributes = geometry.attributes;\n        const shaderAttributes = program.attributeData;\n\n        for (const j in shaderAttributes)\n        {\n            if (!geometryAttributes[j])\n            {\n                throw new Error(`shader and geometry incompatible, geometry missing the \"${j}\" attribute`);\n            }\n        }\n    }\n\n    /**\n     * Takes a geometry and program and generates a unique signature for them.\n     *\n     * @param {PIXI.Geometry} geometry to get signature from\n     * @param {PIXI.Program} program to test geometry against\n     * @returns {String} Unique signature of the geometry and program\n     * @protected\n     */\n    getSignature(geometry, program)\n    {\n        const attribs = geometry.attributes;\n        const shaderAttributes = program.attributeData;\n\n        const strings = ['g', geometry.id];\n\n        for (const i in attribs)\n        {\n            if (shaderAttributes[i])\n            {\n                strings.push(i);\n            }\n        }\n\n        return strings.join('-');\n    }\n\n    /**\n     * Creates or gets Vao with the same structure as the geometry and stores it on the geometry.\n     * If vao is created, it is bound automatically.\n     *\n     * @protected\n     * @param {PIXI.Geometry} geometry - Instance of geometry to to generate Vao for\n     * @param {PIXI.Program} program - Instance of program\n     */\n    initGeometryVao(geometry, program)\n    {\n        this.checkCompatibility(geometry, program);\n\n        const gl = this.gl;\n        const CONTEXT_UID = this.CONTEXT_UID;\n\n        const signature = this.getSignature(geometry, program);\n\n        const vaoObjectHash = geometry.glVertexArrayObjects[this.CONTEXT_UID];\n\n        let vao = vaoObjectHash[signature];\n\n        if (vao)\n        {\n            // this will give us easy access to the vao\n            vaoObjectHash[program.id] = vao;\n\n            return vao;\n        }\n\n        const buffers = geometry.buffers;\n        const attributes = geometry.attributes;\n        const tempStride = {};\n        const tempStart = {};\n\n        for (const j in buffers)\n        {\n            tempStride[j] = 0;\n            tempStart[j] = 0;\n        }\n\n        for (const j in attributes)\n        {\n            if (!attributes[j].size && program.attributeData[j])\n            {\n                attributes[j].size = program.attributeData[j].size;\n            }\n            else if (!attributes[j].size)\n            {\n                console.warn(`PIXI Geometry attribute '${j}' size cannot be determined (likely the bound shader does not have the attribute)`);  // eslint-disable-line\n            }\n\n            tempStride[attributes[j].buffer] += attributes[j].size * byteSizeMap[attributes[j].type];\n        }\n\n        for (const j in attributes)\n        {\n            const attribute = attributes[j];\n            const attribSize = attribute.size;\n\n            if (attribute.stride === undefined)\n            {\n                if (tempStride[attribute.buffer] === attribSize * byteSizeMap[attribute.type])\n                {\n                    attribute.stride = 0;\n                }\n                else\n                {\n                    attribute.stride = tempStride[attribute.buffer];\n                }\n            }\n\n            if (attribute.start === undefined)\n            {\n                attribute.start = tempStart[attribute.buffer];\n\n                tempStart[attribute.buffer] += attribSize * byteSizeMap[attribute.type];\n            }\n        }\n\n        vao = gl.createVertexArray();\n\n        gl.bindVertexArray(vao);\n\n        // first update - and create the buffers!\n        // only create a gl buffer if it actually gets\n        for (let i = 0; i < buffers.length; i++)\n        {\n            const buffer = buffers[i];\n\n            if (!buffer._glBuffers[CONTEXT_UID])\n            {\n                buffer._glBuffers[CONTEXT_UID] = new GLBuffer(gl.createBuffer());\n                this.managedBuffers[buffer.id] = buffer;\n                buffer.disposeRunner.add(this);\n            }\n\n            buffer._glBuffers[CONTEXT_UID].refCount++;\n        }\n\n        // TODO - maybe make this a data object?\n        // lets wait to see if we need to first!\n\n        this.activateVao(geometry, program);\n\n        this._activeVao = vao;\n\n        // add it to the cache!\n        vaoObjectHash[program.id] = vao;\n        vaoObjectHash[signature] = vao;\n\n        return vao;\n    }\n\n    /**\n     * Disposes buffer\n     * @param {PIXI.Buffer} buffer buffer with data\n     * @param {boolean} [contextLost=false] If context was lost, we suppress deleteVertexArray\n     */\n    disposeBuffer(buffer, contextLost)\n    {\n        if (!this.managedBuffers[buffer.id])\n        {\n            return;\n        }\n\n        delete this.managedBuffers[buffer.id];\n\n        const glBuffer = buffer._glBuffers[this.CONTEXT_UID];\n        const gl = this.gl;\n\n        buffer.disposeRunner.remove(this);\n\n        if (!glBuffer)\n        {\n            return;\n        }\n\n        if (!contextLost)\n        {\n            gl.deleteBuffer(glBuffer.buffer);\n        }\n\n        delete buffer._glBuffers[this.CONTEXT_UID];\n    }\n\n    /**\n     * Disposes geometry\n     * @param {PIXI.Geometry} geometry Geometry with buffers. Only VAO will be disposed\n     * @param {boolean} [contextLost=false] If context was lost, we suppress deleteVertexArray\n     */\n    disposeGeometry(geometry, contextLost)\n    {\n        if (!this.managedGeometries[geometry.id])\n        {\n            return;\n        }\n\n        delete this.managedGeometries[geometry.id];\n\n        const vaos = geometry.glVertexArrayObjects[this.CONTEXT_UID];\n        const gl = this.gl;\n        const buffers = geometry.buffers;\n\n        geometry.disposeRunner.remove(this);\n\n        if (!vaos)\n        {\n            return;\n        }\n\n        for (let i = 0; i < buffers.length; i++)\n        {\n            const buf = buffers[i]._glBuffers[this.CONTEXT_UID];\n\n            buf.refCount--;\n            if (buf.refCount === 0 && !contextLost)\n            {\n                this.disposeBuffer(buffers[i], contextLost);\n            }\n        }\n\n        if (!contextLost)\n        {\n            for (const vaoId in vaos)\n            {\n                // delete only signatures, everything else are copies\n                if (vaoId[0] === 'g')\n                {\n                    const vao = vaos[vaoId];\n\n                    if (this._activeVao === vao)\n                    {\n                        this.unbind();\n                    }\n                    gl.deleteVertexArray(vao);\n                }\n            }\n        }\n\n        delete geometry.glVertexArrayObjects[this.CONTEXT_UID];\n    }\n\n    /**\n     * dispose all WebGL resources of all managed geometries and buffers\n     * @param {boolean} [contextLost=false] If context was lost, we suppress `gl.delete` calls\n     */\n    disposeAll(contextLost)\n    {\n        let all = Object.keys(this.managedGeometries);\n\n        for (let i = 0; i < all.length; i++)\n        {\n            this.disposeGeometry(this.managedGeometries[all[i]], contextLost);\n        }\n        all = Object.keys(this.managedBuffers);\n        for (let i = 0; i < all.length; i++)\n        {\n            this.disposeBuffer(this.managedBuffers[all[i]], contextLost);\n        }\n    }\n\n    /**\n     * Activate vertex array object\n     *\n     * @protected\n     * @param {PIXI.Geometry} geometry - Geometry instance\n     * @param {PIXI.Program} program - Shader program instance\n     */\n    activateVao(geometry, program)\n    {\n        const gl = this.gl;\n        const CONTEXT_UID = this.CONTEXT_UID;\n        const buffers = geometry.buffers;\n        const attributes = geometry.attributes;\n\n        if (geometry.indexBuffer)\n        {\n            // first update the index buffer if we have one..\n            gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, geometry.indexBuffer._glBuffers[CONTEXT_UID].buffer);\n        }\n\n        let lastBuffer = null;\n\n        // add a new one!\n        for (const j in attributes)\n        {\n            const attribute = attributes[j];\n            const buffer = buffers[attribute.buffer];\n            const glBuffer = buffer._glBuffers[CONTEXT_UID];\n\n            if (program.attributeData[j])\n            {\n                if (lastBuffer !== glBuffer)\n                {\n                    gl.bindBuffer(gl.ARRAY_BUFFER, glBuffer.buffer);\n\n                    lastBuffer = glBuffer;\n                }\n\n                const location = program.attributeData[j].location;\n\n                // TODO introduce state again\n                // we can optimise this for older devices that have no VAOs\n                gl.enableVertexAttribArray(location);\n\n                gl.vertexAttribPointer(location,\n                    attribute.size,\n                    attribute.type || gl.FLOAT,\n                    attribute.normalized,\n                    attribute.stride,\n                    attribute.start);\n\n                if (attribute.instance)\n                {\n                    // TODO calculate instance count based of this...\n                    if (this.hasInstance)\n                    {\n                        gl.vertexAttribDivisor(location, 1);\n                    }\n                    else\n                    {\n                        throw new Error('geometry error, GPU Instancing is not supported on this device');\n                    }\n                }\n            }\n        }\n    }\n\n    /**\n     * Draw the geometry\n     *\n     * @param {Number} type - the type primitive to render\n     * @param {Number} [size] - the number of elements to be rendered\n     * @param {Number} [start] - Starting index\n     * @param {Number} [instanceCount] - the number of instances of the set of elements to execute\n     */\n    draw(type, size, start, instanceCount)\n    {\n        const { gl } = this;\n        const geometry = this._activeGeometry;\n\n        // TODO.. this should not change so maybe cache the function?\n\n        if (geometry.indexBuffer)\n        {\n            const byteSize = geometry.indexBuffer.data.BYTES_PER_ELEMENT;\n            const glType = byteSize === 2 ? gl.UNSIGNED_SHORT : gl.UNSIGNED_INT;\n\n            if (byteSize === 2 || (byteSize === 4 && this.canUseUInt32ElementIndex))\n            {\n                if (geometry.instanced)\n                {\n                    /* eslint-disable max-len */\n                    gl.drawElementsInstanced(type, size || geometry.indexBuffer.data.length, glType, (start || 0) * byteSize, instanceCount || 1);\n                    /* eslint-enable max-len */\n                }\n                else\n                {\n                    /* eslint-disable max-len */\n                    gl.drawElements(type, size || geometry.indexBuffer.data.length, glType, (start || 0) * byteSize);\n                    /* eslint-enable max-len */\n                }\n            }\n            else\n            {\n                console.warn('unsupported index buffer type: uint32');\n            }\n        }\n        else if (geometry.instanced)\n        {\n            // TODO need a better way to calculate size..\n            gl.drawArraysInstanced(type, start, size || geometry.getSize(), instanceCount || 1);\n        }\n        else\n        {\n            gl.drawArrays(type, start, size || geometry.getSize());\n        }\n\n        return this;\n    }\n\n    /**\n     * Unbind/reset everything\n     * @protected\n     */\n    unbind()\n    {\n        this.gl.bindVertexArray(null);\n        this._activeVao = null;\n        this._activeGeometry = null;\n    }\n}\n","/**\n * @method compileProgram\n * @private\n * @memberof PIXI.glCore.shader\n * @param gl {WebGLRenderingContext} The current WebGL context {WebGLProgram}\n * @param vertexSrc {string|string[]} The vertex shader source as an array of strings.\n * @param fragmentSrc {string|string[]} The fragment shader source as an array of strings.\n * @param attributeLocations {Object} An attribute location map that lets you manually set the attribute locations\n * @return {WebGLProgram} the shader program\n */\nexport default function compileProgram(gl, vertexSrc, fragmentSrc, attributeLocations)\n{\n    const glVertShader = compileShader(gl, gl.VERTEX_SHADER, vertexSrc);\n    const glFragShader = compileShader(gl, gl.FRAGMENT_SHADER, fragmentSrc);\n\n    let program = gl.createProgram();\n\n    gl.attachShader(program, glVertShader);\n    gl.attachShader(program, glFragShader);\n\n    // optionally, set the attributes manually for the program rather than letting WebGL decide..\n    if (attributeLocations)\n    {\n        for (const i in attributeLocations)\n        {\n            gl.bindAttribLocation(program, attributeLocations[i], i);\n        }\n    }\n\n    gl.linkProgram(program);\n\n    // if linking fails, then log and cleanup\n    if (!gl.getProgramParameter(program, gl.LINK_STATUS))\n    {\n        console.error('Pixi.js Error: Could not initialize shader.');\n        console.error('gl.VALIDATE_STATUS', gl.getProgramParameter(program, gl.VALIDATE_STATUS));\n        console.error('gl.getError()', gl.getError());\n\n        // if there is a program info log, log it\n        if (gl.getProgramInfoLog(program) !== '')\n        {\n            console.warn('Pixi.js Warning: gl.getProgramInfoLog()', gl.getProgramInfoLog(program));\n        }\n\n        gl.deleteProgram(program);\n        program = null;\n    }\n\n    // clean up some shaders\n    gl.deleteShader(glVertShader);\n    gl.deleteShader(glFragShader);\n\n    return program;\n}\n\n/**\n * @private\n * @param gl {WebGLRenderingContext} The current WebGL context {WebGLProgram}\n * @param type {Number} the type, can be either VERTEX_SHADER or FRAGMENT_SHADER\n * @param vertexSrc {string|string[]} The vertex shader source as an array of strings.\n * @return {WebGLShader} the shader\n */\nfunction compileShader(gl, type, src)\n{\n    const shader = gl.createShader(type);\n\n    gl.shaderSource(shader, src);\n    gl.compileShader(shader);\n\n    if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS))\n    {\n        console.warn(src);\n        console.error(gl.getShaderInfoLog(shader));\n\n        return null;\n    }\n\n    return shader;\n}\n","/**\n * @method defaultValue\n * @memberof PIXI.glCore.shader\n * @param type {String} Type of value\n * @param size {Number}\n * @private\n */\nexport default function defaultValue(type, size)\n{\n    switch (type)\n    {\n        case 'float':\n            return 0;\n\n        case 'vec2':\n            return new Float32Array(2 * size);\n\n        case 'vec3':\n            return new Float32Array(3 * size);\n\n        case 'vec4':\n            return new Float32Array(4 * size);\n\n        case 'int':\n        case 'sampler2D':\n        case 'sampler2DArray':\n            return 0;\n\n        case 'ivec2':\n            return new Int32Array(2 * size);\n\n        case 'ivec3':\n            return new Int32Array(3 * size);\n\n        case 'ivec4':\n            return new Int32Array(4 * size);\n\n        case 'bool':\n            return false;\n\n        case 'bvec2':\n\n            return booleanArray(2 * size);\n\n        case 'bvec3':\n            return booleanArray(3 * size);\n\n        case 'bvec4':\n            return booleanArray(4 * size);\n\n        case 'mat2':\n            return new Float32Array([1, 0,\n                0, 1]);\n\n        case 'mat3':\n            return new Float32Array([1, 0, 0,\n                0, 1, 0,\n                0, 0, 1]);\n\n        case 'mat4':\n            return new Float32Array([1, 0, 0, 0,\n                0, 1, 0, 0,\n                0, 0, 1, 0,\n                0, 0, 0, 1]);\n    }\n\n    return null;\n}\n\nfunction booleanArray(size)\n{\n    const array = new Array(size);\n\n    for (let i = 0; i < array.length; i++)\n    {\n        array[i] = false;\n    }\n\n    return array;\n}\n","import { settings } from '../../settings';\nimport { ENV } from '@pixi/constants';\n\nconst unknownContext = {};\nlet context = unknownContext;\n\n/**\n * returns a little WebGL context to use for program inspection.\n *\n * @static\n * @private\n * @returns {webGL-context} a gl context to test with\n */\nexport default function getTestContext()\n{\n    if (context === unknownContext)\n    {\n        const canvas = document.createElement('canvas');\n\n        let gl;\n\n        if (settings.PREFER_ENV >= ENV.WEBGL2)\n        {\n            gl = canvas.getContext('webgl2', {});\n        }\n\n        if (!gl)\n        {\n            gl = canvas.getContext('webgl', {})\n            || canvas.getContext('experimental-webgl', {});\n\n            if (!gl)\n            {\n                // fail, not able to get a context\n                gl = null;\n            }\n            else\n            {\n                // for shader testing..\n                gl.getExtension('WEBGL_draw_buffers');\n            }\n        }\n\n        context = gl;\n    }\n\n    return context;\n}\n","import getTestContext from './getTestContext';\nimport { PRECISION } from '@pixi/constants';\n\nlet maxFragmentPrecision;\n\nexport default function getMaxFragmentPrecision()\n{\n    if (!maxFragmentPrecision)\n    {\n        maxFragmentPrecision = PRECISION.MEDIUM;\n        const gl = getTestContext();\n\n        if (gl)\n        {\n            if (gl.getShaderPrecisionFormat)\n            {\n                const shaderFragment = gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.HIGH_FLOAT);\n\n                maxFragmentPrecision = shaderFragment.precision ? PRECISION.HIGH : PRECISION.MEDIUM;\n            }\n        }\n    }\n\n    return maxFragmentPrecision;\n}\n","import { PRECISION } from '@pixi/constants';\n\n/**\n * Sets the float precision on the shader, ensuring the device supports the request precision.\n * If the precision is already present, it just ensures that the device is able to handle it.\n *\n * @private\n * @param {string} src - The shader source\n * @param {string} requestedPrecision - The request float precision of the shader. Options are 'lowp', 'mediump' or 'highp'.\n * @param {string} maxSupportedPrecision - The maximum precision the shader supports.\n *\n * @return {string} modified shader source\n */\nexport default function setPrecision(src, requestedPrecision, maxSupportedPrecision)\n{\n    if (src.substring(0, 9) !== 'precision')\n    {\n        // no precision supplied, so PixiJS will add the requested level.\n        let precision = requestedPrecision;\n\n        // If highp is requested but not supported, downgrade precision to a level all devices support.\n        if (requestedPrecision === PRECISION.HIGH && maxSupportedPrecision !== PRECISION.HIGH)\n        {\n            precision = PRECISION.MEDIUM;\n        }\n\n        return `precision ${precision} float;\\n${src}`;\n    }\n    else if (maxSupportedPrecision !== PRECISION.HIGH && src.substring(0, 15) === 'precision highp')\n    {\n        // precision was supplied, but at a level this device does not support, so downgrading to mediump.\n        return src.replace('precision highp', 'precision mediump');\n    }\n\n    return src;\n}\n","const GLSL_TO_SIZE = {\n    float:    1,\n    vec2:     2,\n    vec3:     3,\n    vec4:     4,\n\n    int:      1,\n    ivec2:    2,\n    ivec3:    3,\n    ivec4:    4,\n\n    bool:     1,\n    bvec2:    2,\n    bvec3:    3,\n    bvec4:    4,\n\n    mat2:     4,\n    mat3:     9,\n    mat4:     16,\n\n    sampler2D:  1,\n};\n\n/**\n * @private\n * @method mapSize\n * @memberof PIXI.glCore.shader\n * @param type {String}\n * @return {Number}\n */\nexport default function mapSize(type)\n{\n    return GLSL_TO_SIZE[type];\n}\n","let GL_TABLE = null;\n\nconst GL_TO_GLSL_TYPES = {\n    FLOAT:       'float',\n    FLOAT_VEC2:  'vec2',\n    FLOAT_VEC3:  'vec3',\n    FLOAT_VEC4:  'vec4',\n\n    INT:         'int',\n    INT_VEC2:    'ivec2',\n    INT_VEC3:    'ivec3',\n    INT_VEC4:    'ivec4',\n\n    BOOL:        'bool',\n    BOOL_VEC2:   'bvec2',\n    BOOL_VEC3:   'bvec3',\n    BOOL_VEC4:   'bvec4',\n\n    FLOAT_MAT2:  'mat2',\n    FLOAT_MAT3:  'mat3',\n    FLOAT_MAT4:  'mat4',\n\n    SAMPLER_2D:  'sampler2D',\n    SAMPLER_CUBE:  'samplerCube',\n    SAMPLER_2D_ARRAY:  'sampler2DArray',\n};\n\nexport default function mapType(gl, type)\n{\n    if (!GL_TABLE)\n    {\n        const typeNames = Object.keys(GL_TO_GLSL_TYPES);\n\n        GL_TABLE = {};\n\n        for (let i = 0; i < typeNames.length; ++i)\n        {\n            const tn = typeNames[i];\n\n            GL_TABLE[gl[tn]] = GL_TO_GLSL_TYPES[tn];\n        }\n    }\n\n    return GL_TABLE[type];\n}\n","// cv = CachedValue\n// v = value\n// ud = uniformData\n// uv = uniformValue\n// l = location\nconst GLSL_TO_SINGLE_SETTERS_CACHED = {\n\n    float: `\n    if(cv !== v)\n    {\n        cv.v = v;\n        gl.uniform1f(location, v)\n    }`,\n\n    vec2: `\n    if(cv[0] !== v[0] || cv[1] !== v[1])\n    {\n        cv[0] = v[0];\n        cv[1] = v[1];\n        gl.uniform2f(location, v[0], v[1])\n    }`,\n\n    vec3: `\n    if(cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])\n    {\n        cv[0] = v[0];\n        cv[1] = v[1];\n        cv[2] = v[2];\n\n        gl.uniform3f(location, v[0], v[1], v[2])\n    }`,\n\n    vec4:     'gl.uniform4f(location, v[0], v[1], v[2], v[3])',\n\n    int:      'gl.uniform1i(location, v)',\n    ivec2:    'gl.uniform2i(location, v[0], v[1])',\n    ivec3:    'gl.uniform3i(location, v[0], v[1], v[2])',\n    ivec4:    'gl.uniform4i(location, v[0], v[1], v[2], v[3])',\n\n    bool:     'gl.uniform1i(location, v)',\n    bvec2:    'gl.uniform2i(location, v[0], v[1])',\n    bvec3:    'gl.uniform3i(location, v[0], v[1], v[2])',\n    bvec4:    'gl.uniform4i(location, v[0], v[1], v[2], v[3])',\n\n    mat2:     'gl.uniformMatrix2fv(location, false, v)',\n    mat3:     'gl.uniformMatrix3fv(location, false, v)',\n    mat4:     'gl.uniformMatrix4fv(location, false, v)',\n\n    sampler2D:      'gl.uniform1i(location, v)',\n    samplerCube:    'gl.uniform1i(location, v)',\n    sampler2DArray: 'gl.uniform1i(location, v)',\n};\n\nconst GLSL_TO_ARRAY_SETTERS = {\n\n    float:    `gl.uniform1fv(location, v)`,\n\n    vec2:     `gl.uniform2fv(location, v)`,\n    vec3:     `gl.uniform3fv(location, v)`,\n    vec4:     'gl.uniform4fv(location, v)',\n\n    mat4:     'gl.uniformMatrix4fv(location, false, v)',\n    mat3:     'gl.uniformMatrix3fv(location, false, v)',\n    mat2:     'gl.uniformMatrix2fv(location, false, v)',\n\n    int:      'gl.uniform1iv(location, v)',\n    ivec2:    'gl.uniform2iv(location, v)',\n    ivec3:    'gl.uniform3iv(location, v)',\n    ivec4:    'gl.uniform4iv(location, v)',\n\n    bool:     'gl.uniform1iv(location, v)',\n    bvec2:    'gl.uniform2iv(location, v)',\n    bvec3:    'gl.uniform3iv(location, v)',\n    bvec4:    'gl.uniform4iv(location, v)',\n\n    sampler2D:      'gl.uniform1iv(location, v)',\n    samplerCube:    'gl.uniform1iv(location, v)',\n    sampler2DArray: 'gl.uniform1iv(location, v)',\n};\n\nexport default function generateUniformsSync(group, uniformData)\n{\n    let textureCount = 0;\n    let func = `var v = null;\n    var cv = null\n    var gl = renderer.gl`;\n\n    for (const i in group.uniforms)\n    {\n        const data = uniformData[i];\n\n        if (!data)\n        {\n            if (group.uniforms[i].group)\n            {\n                func += `\n                    renderer.shader.syncUniformGroup(uv.${i});\n                `;\n            }\n\n            continue;\n        }\n\n        // TODO && uniformData[i].value !== 0 <-- do we still need this?\n        if (data.type === 'float' && data.size === 1)\n        {\n            func += `\n            if(uv.${i} !== ud.${i}.value)\n            {\n                ud.${i}.value = uv.${i}\n                gl.uniform1f(ud.${i}.location, uv.${i})\n            }\\n`;\n        }\n        /* eslint-disable max-len */\n        else if ((data.type === 'sampler2D' || data.type === 'samplerCube' || data.type === 'sampler2DArray') && data.size === 1 && !data.isArray)\n        /* eslint-disable max-len */\n        {\n            func += `\n            renderer.texture.bind(uv.${i}, ${textureCount});\n\n            if(ud.${i}.value !== ${textureCount})\n            {\n                ud.${i}.value = ${textureCount};\n                gl.uniform1i(ud.${i}.location, ${textureCount});\\n; // eslint-disable-line max-len\n            }\\n`;\n\n            textureCount++;\n        }\n        else if (data.type === 'mat3' && data.size === 1)\n        {\n            if (group.uniforms[i].a !== undefined)\n            {\n                // TODO and some smart caching dirty ids here!\n                func += `\n                gl.uniformMatrix3fv(ud.${i}.location, false, uv.${i}.toArray(true));\n                \\n`;\n            }\n            else\n            {\n                func += `\n                gl.uniformMatrix3fv(ud.${i}.location, false, uv.${i});\n                \\n`;\n            }\n        }\n        else if (data.type === 'vec2' && data.size === 1)\n        {\n            // TODO - do we need both here?\n            // maybe we can get away with only using points?\n            if (group.uniforms[i].x !== undefined)\n            {\n                func += `\n                cv = ud.${i}.value;\n                v = uv.${i};\n\n                if(cv[0] !== v.x || cv[1] !== v.y)\n                {\n                    cv[0] = v.x;\n                    cv[1] = v.y;\n                    gl.uniform2f(ud.${i}.location, v.x, v.y);\n                }\\n`;\n            }\n            else\n            {\n                func += `\n                cv = ud.${i}.value;\n                v = uv.${i};\n\n                if(cv[0] !== v[0] || cv[1] !== v[1])\n                {\n                    cv[0] = v[0];\n                    cv[1] = v[1];\n                    gl.uniform2f(ud.${i}.location, v[0], v[1]);\n                }\n                \\n`;\n            }\n        }\n        else if (data.type === 'vec4' && data.size === 1)\n        {\n            // TODO - do we need both here?\n            // maybe we can get away with only using points?\n            if (group.uniforms[i].width !== undefined)\n            {\n                func += `\n                cv = ud.${i}.value;\n                v = uv.${i};\n\n                if(cv[0] !== v.x || cv[1] !== v.y || cv[2] !== v.width || cv[3] !== v.height)\n                {\n                    cv[0] = v.x;\n                    cv[1] = v.y;\n                    cv[2] = v.width;\n                    cv[3] = v.height;\n                    gl.uniform4f(ud.${i}.location, v.x, v.y, v.width, v.height)\n                }\\n`;\n            }\n            else\n            {\n                func += `\n                cv = ud.${i}.value;\n                v = uv.${i};\n\n                if(cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])\n                {\n                    cv[0] = v[0];\n                    cv[1] = v[1];\n                    cv[2] = v[2];\n                    cv[3] = v[3];\n\n                    gl.uniform4f(ud.${i}.location, v[0], v[1], v[2], v[3])\n                }\n                \\n`;\n            }\n        }\n        else\n        {\n            const templateType = (data.size === 1) ? GLSL_TO_SINGLE_SETTERS_CACHED : GLSL_TO_ARRAY_SETTERS;\n\n            const template =  templateType[data.type].replace('location', `ud.${i}.location`);\n\n            func += `\n            cv = ud.${i}.value;\n            v = uv.${i};\n            ${template};\\n`;\n        }\n    }\n\n    return new Function('ud', 'uv', 'renderer', func); // eslint-disable-line no-new-func\n}\n","const fragTemplate = [\n    'precision mediump float;',\n    'void main(void){',\n    'float test = 0.1;',\n    '%forloop%',\n    'gl_FragColor = vec4(0.0);',\n    '}',\n].join('\\n');\n\nexport default function checkMaxIfStatementsInShader(maxIfs, gl)\n{\n    if (maxIfs === 0)\n    {\n        throw new Error('Invalid value of `0` passed to `checkMaxIfStatementsInShader`');\n    }\n\n    const shader = gl.createShader(gl.FRAGMENT_SHADER);\n\n    while (true) // eslint-disable-line no-constant-condition\n    {\n        const fragmentSrc = fragTemplate.replace(/%forloop%/gi, generateIfTestSrc(maxIfs));\n\n        gl.shaderSource(shader, fragmentSrc);\n        gl.compileShader(shader);\n\n        if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS))\n        {\n            maxIfs = (maxIfs / 2) | 0;\n        }\n        else\n        {\n            // valid!\n            break;\n        }\n    }\n\n    return maxIfs;\n}\n\nfunction generateIfTestSrc(maxIfs)\n{\n    let src = '';\n\n    for (let i = 0; i < maxIfs; ++i)\n    {\n        if (i > 0)\n        {\n            src += '\\nelse ';\n        }\n\n        if (i < maxIfs - 1)\n        {\n            src += `if(test == ${i}.0){}`;\n        }\n    }\n\n    return src;\n}\n","// Cache the result to prevent running this over and over\nlet unsafeEval;\n\n/**\n * Not all platforms allow to generate function code (e.g., `new Function`).\n * this provides the platform-level detection.\n *\n * @private\n * @returns {boolean}\n */\nexport default function unsafeEvalSupported()\n{\n    if (typeof unsafeEval === 'boolean')\n    {\n        return unsafeEval;\n    }\n\n    try\n    {\n        /* eslint-disable no-new-func */\n        const func = new Function('param1', 'param2', 'param3', 'return param1[param2] === param3;');\n        /* eslint-enable no-new-func */\n\n        unsafeEval = func({ a: 'b' }, 'a', 'b') === true;\n    }\n    catch (e)\n    {\n        unsafeEval = false;\n    }\n\n    return unsafeEval;\n}\n","// import * as from '../systems/shader/shader';\nimport { setPrecision,\n    defaultValue,\n    compileProgram,\n    mapSize,\n    mapType,\n    getTestContext,\n    getMaxFragmentPrecision } from './utils';\nimport { ProgramCache } from '@pixi/utils';\nimport defaultFragment from './defaultProgram.frag';\nimport defaultVertex from './defaultProgram.vert';\nimport { settings } from '@pixi/settings';\nimport { PRECISION } from '@pixi/constants';\n\nlet UID = 0;\n\nconst nameCache = {};\n\n/**\n * Helper class to create a shader program.\n *\n * @class\n * @memberof PIXI\n */\nexport default class Program\n{\n    /**\n     * @param {string} [vertexSrc] - The source of the vertex shader.\n     * @param {string} [fragmentSrc] - The source of the fragment shader.\n     * @param {string} [name] - Name for shader\n     */\n    constructor(vertexSrc, fragmentSrc, name = 'pixi-shader')\n    {\n        this.id = UID++;\n\n        /**\n         * The vertex shader.\n         *\n         * @member {string}\n         */\n        this.vertexSrc = vertexSrc || Program.defaultVertexSrc;\n\n        /**\n         * The fragment shader.\n         *\n         * @member {string}\n         */\n        this.fragmentSrc = fragmentSrc || Program.defaultFragmentSrc;\n\n        this.vertexSrc = this.vertexSrc.trim();\n        this.fragmentSrc = this.fragmentSrc.trim();\n\n        if (this.vertexSrc.substring(0, 8) !== '#version')\n        {\n            name = name.replace(/\\s+/g, '-');\n\n            if (nameCache[name])\n            {\n                nameCache[name]++;\n                name += `-${nameCache[name]}`;\n            }\n            else\n            {\n                nameCache[name] = 1;\n            }\n\n            this.vertexSrc = `#define SHADER_NAME ${name}\\n${this.vertexSrc}`;\n            this.fragmentSrc = `#define SHADER_NAME ${name}\\n${this.fragmentSrc}`;\n\n            this.vertexSrc = setPrecision(this.vertexSrc, settings.PRECISION_VERTEX, PRECISION.HIGH);\n            this.fragmentSrc = setPrecision(this.fragmentSrc, settings.PRECISION_FRAGMENT, getMaxFragmentPrecision());\n        }\n\n        // currently this does not extract structs only default types\n        this.extractData(this.vertexSrc, this.fragmentSrc);\n\n        // this is where we store shader references..\n        this.glPrograms = {};\n\n        this.syncUniforms = null;\n    }\n\n    /**\n     * Extracts the data for a buy creating a small test program\n     * or reading the src directly.\n     * @protected\n     *\n     * @param {string} [vertexSrc] - The source of the vertex shader.\n     * @param {string} [fragmentSrc] - The source of the fragment shader.\n     */\n    extractData(vertexSrc, fragmentSrc)\n    {\n        const gl = getTestContext();\n\n        if (gl)\n        {\n            const program = compileProgram(gl, vertexSrc, fragmentSrc);\n\n            this.attributeData = this.getAttributeData(program, gl);\n            this.uniformData = this.getUniformData(program, gl);\n\n            gl.deleteProgram(program);\n        }\n        else\n        {\n            this.uniformData = {};\n            this.attributeData = {};\n        }\n    }\n\n    /**\n     * returns the attribute data from the program\n     * @private\n     *\n     * @param {WebGLProgram} [program] - the WebGL program\n     * @param {WebGLRenderingContext} [gl] - the WebGL context\n     *\n     * @returns {object} the attribute data for this program\n     */\n    getAttributeData(program, gl)\n    {\n        const attributes = {};\n        const attributesArray = [];\n\n        const totalAttributes = gl.getProgramParameter(program, gl.ACTIVE_ATTRIBUTES);\n\n        for (let i = 0; i < totalAttributes; i++)\n        {\n            const attribData = gl.getActiveAttrib(program, i);\n            const type = mapType(gl, attribData.type);\n\n            /*eslint-disable */\n            const data = {\n                type: type,\n                name: attribData.name,\n                size: mapSize(type),\n                location: 0,\n            };\n            /* eslint-enable */\n\n            attributes[attribData.name] = data;\n            attributesArray.push(data);\n        }\n\n        attributesArray.sort((a, b) => (a.name > b.name) ? 1 : -1); // eslint-disable-line no-confusing-arrow\n\n        for (let i = 0; i < attributesArray.length; i++)\n        {\n            attributesArray[i].location = i;\n        }\n\n        return attributes;\n    }\n\n    /**\n     * returns the uniform data from the program\n     * @private\n     *\n     * @param {webGL-program} [program] - the webgl program\n     * @param {context} [gl] - the WebGL context\n     *\n     * @returns {object} the uniform data for this program\n     */\n    getUniformData(program, gl)\n    {\n        const uniforms = {};\n\n        const totalUniforms = gl.getProgramParameter(program, gl.ACTIVE_UNIFORMS);\n\n        // TODO expose this as a prop?\n        // const maskRegex = new RegExp('^(projectionMatrix|uSampler|translationMatrix)$');\n        // const maskRegex = new RegExp('^(projectionMatrix|uSampler|translationMatrix)$');\n\n        for (let i = 0; i < totalUniforms; i++)\n        {\n            const uniformData = gl.getActiveUniform(program, i);\n            const name = uniformData.name.replace(/\\[.*?\\]/, '');\n\n            const isArray = uniformData.name.match(/\\[.*?\\]/, '');\n            const type = mapType(gl, uniformData.type);\n\n            /*eslint-disable */\n            uniforms[name] = {\n                type: type,\n                size: uniformData.size,\n                isArray:isArray,\n                value: defaultValue(type, uniformData.size),\n            };\n            /* eslint-enable */\n        }\n\n        return uniforms;\n    }\n\n    /**\n     * The default vertex shader source\n     *\n     * @static\n     * @constant\n     * @member {string}\n     */\n    static get defaultVertexSrc()\n    {\n        return defaultVertex;\n    }\n\n    /**\n     * The default fragment shader source\n     *\n     * @static\n     * @constant\n     * @member {string}\n     */\n    static get defaultFragmentSrc()\n    {\n        return defaultFragment;\n    }\n\n    /**\n     * A short hand function to create a program based of a vertex and fragment shader\n     * this method will also check to see if there is a cached program.\n     *\n     * @param {string} [vertexSrc] - The source of the vertex shader.\n     * @param {string} [fragmentSrc] - The source of the fragment shader.\n     * @param {object} [uniforms] - Custom uniforms to use to augment the built-in ones.\n     *\n     * @returns {PIXI.Program} an shiny new Pixi shader!\n     */\n    static from(vertexSrc, fragmentSrc, name)\n    {\n        const key = vertexSrc + fragmentSrc;\n\n        let program = ProgramCache[key];\n\n        if (!program)\n        {\n            ProgramCache[key] = program = new Program(vertexSrc, fragmentSrc, name);\n        }\n\n        return program;\n    }\n}\n","import Program from './Program';\nimport UniformGroup from './UniformGroup';\n\n/**\n * A helper class for shaders\n *\n * @class\n * @memberof PIXI\n */\nclass Shader\n{\n    /**\n     * @param {PIXI.Program} [program] - The program the shader will use.\n     * @param {object} [uniforms] - Custom uniforms to use to augment the built-in ones.\n     */\n    constructor(program, uniforms)\n    {\n        /**\n         * Program that the shader uses\n         *\n         * @member {PIXI.Program}\n         */\n        this.program = program;\n\n        // lets see whats been passed in\n        // uniforms should be converted to a uniform group\n        if (uniforms)\n        {\n            if (uniforms instanceof UniformGroup)\n            {\n                this.uniformGroup = uniforms;\n            }\n            else\n            {\n                this.uniformGroup = new UniformGroup(uniforms);\n            }\n        }\n        else\n        {\n            this.uniformGroup = new UniformGroup({});\n        }\n\n        // time to build some getters and setters!\n        // I guess down the line this could sort of generate an instruction list rather than use dirty ids?\n        // does the trick for now though!\n        for (const i in program.uniformData)\n        {\n            if (this.uniformGroup.uniforms[i] instanceof Array)\n            {\n                this.uniformGroup.uniforms[i] = new Float32Array(this.uniformGroup.uniforms[i]);\n            }\n        }\n    }\n\n    // TODO move to shader system..\n    checkUniformExists(name, group)\n    {\n        if (group.uniforms[name])\n        {\n            return true;\n        }\n\n        for (const i in group.uniforms)\n        {\n            const uniform = group.uniforms[i];\n\n            if (uniform.group)\n            {\n                if (this.checkUniformExists(name, uniform))\n                {\n                    return true;\n                }\n            }\n        }\n\n        return false;\n    }\n\n    destroy()\n    {\n        // usage count on programs?\n        // remove if not used!\n        this.uniformGroup = null;\n    }\n\n    /**\n     * Shader uniform values, shortcut for `uniformGroup.uniforms`\n     * @readonly\n     * @member {object}\n     */\n    get uniforms()\n    {\n        return this.uniformGroup.uniforms;\n    }\n\n    /**\n     * A short hand function to create a shader based of a vertex and fragment shader\n     *\n     * @param {string} [vertexSrc] - The source of the vertex shader.\n     * @param {string} [fragmentSrc] - The source of the fragment shader.\n     * @param {object} [uniforms] - Custom uniforms to use to augment the built-in ones.\n     *\n     * @returns {PIXI.Shader} an shiny new Pixi shader!\n     */\n    static from(vertexSrc, fragmentSrc, uniforms)\n    {\n        const program = Program.from(vertexSrc, fragmentSrc);\n\n        return new Shader(program, uniforms);\n    }\n}\n\nexport default Shader;\n","import { BLEND_MODES } from '@pixi/constants';\n\n/* eslint-disable max-len */\n\nconst BLEND = 0;\nconst OFFSET = 1;\nconst CULLING = 2;\nconst DEPTH_TEST = 3;\nconst WINDING = 4;\n\n/**\n * This is a WebGL state, and is is passed The WebGL StateManager.\n *\n * Each mesh rendered may require WebGL to be in a different state.\n * For example you may want different blend mode or to enable polygon offsets\n *\n * @class\n * @memberof PIXI\n */\nexport default class State\n{\n    constructor()\n    {\n        this.data = 0;\n\n        this.blendMode = BLEND_MODES.NORMAL;\n        this.polygonOffset = 0;\n\n        this.blend = true;\n        //  this.depthTest = true;\n    }\n\n    /**\n     * Activates blending of the computed fragment color values\n     *\n     * @member {boolean}\n     */\n    get blend()\n    {\n        return !!(this.data & (1 << BLEND));\n    }\n\n    set blend(value) // eslint-disable-line require-jsdoc\n    {\n        if (!!(this.data & (1 << BLEND)) !== value)\n        {\n            this.data ^= (1 << BLEND);\n        }\n    }\n\n    /**\n     * Activates adding an offset to depth values of polygon's fragments\n     *\n     * @member {boolean}\n     * @default false\n     */\n    get offsets()\n    {\n        return !!(this.data & (1 << OFFSET));\n    }\n\n    set offsets(value) // eslint-disable-line require-jsdoc\n    {\n        if (!!(this.data & (1 << OFFSET)) !== value)\n        {\n            this.data ^= (1 << OFFSET);\n        }\n    }\n\n    /**\n     * Activates culling of polygons.\n     *\n     * @member {boolean}\n     * @default false\n     */\n    get culling()\n    {\n        return !!(this.data & (1 << CULLING));\n    }\n\n    set culling(value) // eslint-disable-line require-jsdoc\n    {\n        if (!!(this.data & (1 << CULLING)) !== value)\n        {\n            this.data ^= (1 << CULLING);\n        }\n    }\n\n    /**\n     * Activates depth comparisons and updates to the depth buffer.\n     *\n     * @member {boolean}\n     * @default false\n     */\n    get depthTest()\n    {\n        return !!(this.data & (1 << DEPTH_TEST));\n    }\n\n    set depthTest(value) // eslint-disable-line require-jsdoc\n    {\n        if (!!(this.data & (1 << DEPTH_TEST)) !== value)\n        {\n            this.data ^= (1 << DEPTH_TEST);\n        }\n    }\n\n    /**\n     * Specifies whether or not front or back-facing polygons can be culled.\n     * @member {boolean}\n     * @default false\n     */\n    get clockwiseFrontFace()\n    {\n        return !!(this.data & (1 << WINDING));\n    }\n\n    set clockwiseFrontFace(value) // eslint-disable-line require-jsdoc\n    {\n        if (!!(this.data & (1 << WINDING)) !== value)\n        {\n            this.data ^= (1 << WINDING);\n        }\n    }\n\n    /**\n     * The blend mode to be applied when this state is set. Apply a value of `PIXI.BLEND_MODES.NORMAL` to reset the blend mode.\n     * Setting this mode to anything other than NO_BLEND will automatically switch blending on.\n     *\n     * @member {number}\n     * @default PIXI.BLEND_MODES.NORMAL\n     * @see PIXI.BLEND_MODES\n     */\n    get blendMode()\n    {\n        return this._blendMode;\n    }\n\n    set blendMode(value) // eslint-disable-line require-jsdoc\n    {\n        this.blend = (value !== BLEND_MODES.NONE);\n        this._blendMode = value;\n    }\n\n    /**\n     * The polygon offset. Setting this property to anything other than 0 will automatically enable polygon offset fill.\n     *\n     * @member {number}\n     * @default 0\n     */\n    get polygonOffset()\n    {\n        return this._polygonOffset;\n    }\n\n    set polygonOffset(value) // eslint-disable-line require-jsdoc\n    {\n        this.offsets = !!value;\n        this._polygonOffset = value;\n    }\n\n    static for2d()\n    {\n        const state = new State();\n\n        state.depthTest = false;\n        state.blend = true;\n\n        return state;\n    }\n}\n\n","import Shader from '../shader/Shader';\nimport Program from '../shader/Program';\nimport State from '../state/State';\nimport { settings } from '@pixi/settings';\nimport defaultVertex from './defaultFilter.vert';\nimport defaultFragment from './defaultFilter.frag';\n\n/**\n * Filter is a special type of WebGL shader that is applied to the screen.\n *\n * {@link http://pixijs.io/examples/#/filters/blur-filter.js Example} of the\n * {@link PIXI.filters.BlurFilter BlurFilter}.\n *\n * ### Usage\n * Filters can be applied to any DisplayObject or Container.\n * PixiJS' `FilterSystem` renders the container into temporary Framebuffer,\n * then filter renders it to the screen.\n * Multiple filters can be added to the `filters` array property and stacked on each other.\n *\n * ```\n * const filter = new PIXI.Filter(myShaderVert, myShaderFrag, { myUniform: 0.5 });\n * const container = new PIXI.Container();\n * container.filters = [filter];\n * ```\n *\n * ### Previous Version Differences\n *\n * In PixiJS **v3**, a filter was always applied to _whole screen_.\n *\n * In PixiJS **v4**, a filter can be applied _only part of the screen_.\n * Developers had to create a set of uniforms to deal with coordinates.\n *\n * In PixiJS **v5** combines _both approaches_.\n * Developers can use normal coordinates of v3 and then allow filter to use partial Framebuffers,\n * bringing those extra uniforms into account.\n *\n * Also be aware that we have changed default vertex shader, please consult\n * {@link https://github.com/pixijs/pixi.js/wiki/v5-Creating-filters Wiki}.\n *\n * ### Built-in Uniforms\n *\n * PixiJS viewport uses screen (CSS) coordinates, `(0, 0, renderer.screen.width, renderer.screen.height)`,\n * and `projectionMatrix` uniform maps it to the gl viewport.\n *\n * **uSampler**\n *\n * The most important uniform is the input texture that container was rendered into.\n * _Important note: as with all Framebuffers in PixiJS, both input and output are\n * premultiplied by alpha._\n *\n * By default, input normalized coordinates are passed to fragment shader with `vTextureCoord`.\n * Use it to sample the input.\n *\n * ```\n * const fragment = `\n * varying vec2 vTextureCoord;\n * uniform sampler2D uSampler;\n * void main(void)\n * {\n *    gl_FragColor = texture2D(uSampler, vTextureCoord);\n * }\n * `;\n *\n * const myFilter = new PIXI.Filter(null, fragment);\n * ```\n *\n * This filter is just one uniform less than {@link PIXI.filters.AlphaFilter AlphaFilter}.\n *\n * **outputFrame**\n *\n * The `outputFrame` holds the rectangle where filter is applied in screen (CSS) coordinates.\n * It's the same as `renderer.screen` for a fullscreen filter.\n * Only a part of  `outputFrame.zw` size of temporary Framebuffer is used,\n * `(0, 0, outputFrame.width, outputFrame.height)`,\n *\n * Filters uses this quad to normalized (0-1) space, its passed into `aVertexPosition` attribute.\n * To calculate vertex position in screen space using normalized (0-1) space:\n *\n * ```\n * vec4 filterVertexPosition( void )\n * {\n *     vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n *     return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n * }\n * ```\n *\n * **inputSize**\n *\n * Temporary framebuffer is different, it can be either the size of screen, either power-of-two.\n * The `inputSize.xy` are size of temporary framebuffer that holds input.\n * The `inputSize.zw` is inverted, it's a shortcut to evade division inside the shader.\n *\n * Set `inputSize.xy = outputFrame.zw` for a fullscreen filter.\n *\n * To calculate input normalized coordinate, you have to map it to filter normalized space.\n * Multiply by `outputFrame.zw` to get input coordinate.\n * Divide by `inputSize.xy` to get input normalized coordinate.\n *\n * ```\n * vec2 filterTextureCoord( void )\n * {\n *     return aVertexPosition * (outputFrame.zw * inputSize.zw); // same as /inputSize.xy\n * }\n * ```\n * **resolution**\n *\n * The `resolution` is the ratio of screen (CSS) pixels to real pixels.\n *\n * **inputPixel**\n *\n * `inputPixel.xy` is the size of framebuffer in real pixels, same as `inputSize.xy * resolution`\n * `inputPixel.zw` is inverted `inputPixel.xy`.\n *\n * It's handy for filters that use neighbour pixels, like {@link PIXI.filters.FXAAFilter FXAAFilter}.\n *\n * **inputClamp**\n *\n * If you try to get info from outside of used part of Framebuffer - you'll get undefined behaviour.\n * For displacements, coordinates has to be clamped.\n *\n * The `inputClamp.xy` is left-top pixel center, you may ignore it, because we use left-top part of Framebuffer\n * `inputClamp.zw` is bottom-right pixel center.\n *\n * ```\n * vec4 color = texture2D(uSampler, clamp(modifigedTextureCoord, inputClamp.xy, inputClamp.zw))\n * ```\n * OR\n * ```\n * vec4 color = texture2D(uSampler, min(modifigedTextureCoord, inputClamp.zw))\n * ```\n *\n * ### Additional Information\n *\n * Complete documentation on Filter usage is located in the\n * {@link https://github.com/pixijs/pixi.js/wiki/v5-Creating-filters Wiki}.\n *\n * Since PixiJS only had a handful of built-in filters, additional filters can be downloaded\n * {@link https://github.com/pixijs/pixi-filters here} from the PixiJS Filters repository.\n *\n * @class\n * @memberof PIXI\n * @extends PIXI.Shader\n */\nexport default class Filter extends Shader\n{\n    /**\n     * @param {string} [vertexSrc] - The source of the vertex shader.\n     * @param {string} [fragmentSrc] - The source of the fragment shader.\n     * @param {object} [uniforms] - Custom uniforms to use to augment the built-in ones.\n     */\n    constructor(vertexSrc, fragmentSrc, uniforms)\n    {\n        const program = Program.from(vertexSrc || Filter.defaultVertexSrc,\n            fragmentSrc || Filter.defaultFragmentSrc);\n\n        super(program, uniforms);\n\n        /**\n         * The padding of the filter. Some filters require extra space to breath such as a blur.\n         * Increasing this will add extra width and height to the bounds of the object that the\n         * filter is applied to.\n         *\n         * @member {number}\n         */\n        this.padding = 0;\n\n        /**\n         * The resolution of the filter. Setting this to be lower will lower the quality but\n         * increase the performance of the filter.\n         *\n         * @member {number}\n         */\n        this.resolution = settings.FILTER_RESOLUTION;\n\n        /**\n         * If enabled is true the filter is applied, if false it will not.\n         *\n         * @member {boolean}\n         */\n        this.enabled = true;\n\n        /**\n         * If enabled, PixiJS will fit the filter area into boundaries for better performance.\n         * Switch it off if it does not work for specific shader.\n         *\n         * @member {boolean}\n         */\n        this.autoFit = true;\n\n        /**\n         * Legacy filters use position and uvs from attributes\n         * @member {boolean}\n         * @readonly\n         */\n        this.legacy = !!this.program.attributeData.aTextureCoord;\n\n        /**\n         * The WebGL state the filter requires to render\n         * @member {PIXI.State}\n         */\n        this.state = new State();\n    }\n\n    /**\n     * Applies the filter\n     *\n     * @param {PIXI.systems.FilterSystem} filterManager - The renderer to retrieve the filter from\n     * @param {PIXI.RenderTexture} input - The input render target.\n     * @param {PIXI.RenderTexture} output - The target to output to.\n     * @param {boolean} clear - Should the output be cleared before rendering to it\n     * @param {object} [currentState] - It's current state of filter.\n     *        There are some useful properties in the currentState :\n     *        target, filters, sourceFrame, destinationFrame, renderTarget, resolution\n     */\n    apply(filterManager, input, output, clear, currentState)\n    {\n        // do as you please!\n\n        filterManager.applyFilter(this, input, output, clear, currentState);\n\n        // or just do a regular render..\n    }\n\n    /**\n     * Sets the blendmode of the filter\n     *\n     * @member {number}\n     * @default PIXI.BLEND_MODES.NORMAL\n     */\n    get blendMode()\n    {\n        return this.state.blendMode;\n    }\n\n    set blendMode(value) // eslint-disable-line require-jsdoc\n    {\n        this.state.blendMode = value;\n    }\n\n    /**\n     * The default vertex shader source\n     *\n     * @static\n     * @type {string}\n     * @constant\n     */\n    static get defaultVertexSrc()\n    {\n        return defaultVertex;\n    }\n\n    /**\n     * The default fragment shader source\n     *\n     * @static\n     * @type {string}\n     * @constant\n     */\n    static get defaultFragmentSrc()\n    {\n        return defaultFragment;\n    }\n}\n\n/**\n * Used for caching shader IDs\n *\n * @static\n * @type {object}\n * @protected\n */\nFilter.SOURCE_KEY_MAP = {};\n\n","import { Matrix } from '@pixi/math';\n\nconst tempMat = new Matrix();\n\n/**\n * Class controls uv mapping from Texture normal space to BaseTexture normal space.\n *\n * Takes `trim` and `rotate` into account. May contain clamp settings for Meshes and TilingSprite.\n *\n * Can be used in Texture `uvMatrix` field, or separately, you can use different clamp settings on the same texture.\n * If you want to add support for texture region of certain feature or filter, that's what you're looking for.\n *\n * Takes track of Texture changes through `_lastTextureID` private field.\n * Use `update()` method call to track it from outside.\n *\n * @see PIXI.Texture\n * @see PIXI.Mesh\n * @see PIXI.TilingSprite\n * @class\n * @memberof PIXI\n */\nexport default class TextureMatrix\n{\n    /**\n     *\n     * @param {PIXI.Texture} texture observed texture\n     * @param {number} [clampMargin] Changes frame clamping, 0.5 by default. Use -0.5 for extra border.\n     * @constructor\n     */\n    constructor(texture, clampMargin)\n    {\n        this._texture = texture;\n\n        /**\n         * Matrix operation that converts texture region coords to texture coords\n         * @member {PIXI.Matrix}\n         * @readonly\n         */\n        this.mapCoord = new Matrix();\n\n        /**\n         * Clamp region for normalized coords, left-top pixel center in xy , bottom-right in zw.\n         * Calculated based on clampOffset.\n         * @member {Float32Array}\n         * @readonly\n         */\n        this.uClampFrame = new Float32Array(4);\n\n        /**\n         * Normalized clamp offset.\n         * Calculated based on clampOffset.\n         * @member {Float32Array}\n         * @readonly\n         */\n        this.uClampOffset = new Float32Array(2);\n\n        /**\n         * Tracks Texture frame changes\n         * @member {number}\n         * @protected\n         */\n        this._updateID = -1;\n\n        /**\n         * Changes frame clamping\n         * Works with TilingSprite and Mesh\n         * Change to 1.5 if you texture has repeated right and bottom lines, that leads to smoother borders\n         *\n         * @default 0\n         * @member {number}\n         */\n        this.clampOffset = 0;\n\n        /**\n         * Changes frame clamping\n         * Works with TilingSprite and Mesh\n         * Change to -0.5 to add a pixel to the edge, recommended for transparent trimmed textures in atlas\n         *\n         * @default 0.5\n         * @member {number}\n         */\n        this.clampMargin = (typeof clampMargin === 'undefined') ? 0.5 : clampMargin;\n\n        /**\n         * If texture size is the same as baseTexture\n         * @member {boolean}\n         * @default false\n         * @readonly\n         */\n        this.isSimple = false;\n    }\n\n    /**\n     * texture property\n     * @member {PIXI.Texture}\n     */\n    get texture()\n    {\n        return this._texture;\n    }\n\n    set texture(value) // eslint-disable-line require-jsdoc\n    {\n        this._texture = value;\n        this._updateID = -1;\n    }\n\n    /**\n     * Multiplies uvs array to transform\n     * @param {Float32Array} uvs mesh uvs\n     * @param {Float32Array} [out=uvs] output\n     * @returns {Float32Array} output\n     */\n    multiplyUvs(uvs, out)\n    {\n        if (out === undefined)\n        {\n            out = uvs;\n        }\n\n        const mat = this.mapCoord;\n\n        for (let i = 0; i < uvs.length; i += 2)\n        {\n            const x = uvs[i];\n            const y = uvs[i + 1];\n\n            out[i] = (x * mat.a) + (y * mat.c) + mat.tx;\n            out[i + 1] = (x * mat.b) + (y * mat.d) + mat.ty;\n        }\n\n        return out;\n    }\n\n    /**\n     * updates matrices if texture was changed\n     * @param {boolean} [forceUpdate=false] if true, matrices will be updated any case\n     * @returns {boolean} whether or not it was updated\n     */\n    update(forceUpdate)\n    {\n        const tex = this._texture;\n\n        if (!tex || !tex.valid)\n        {\n            return false;\n        }\n\n        if (!forceUpdate\n            && this._updateID === tex._updateID)\n        {\n            return false;\n        }\n\n        this._updateID = tex._updateID;\n\n        const uvs = tex._uvs;\n\n        this.mapCoord.set(uvs.x1 - uvs.x0, uvs.y1 - uvs.y0, uvs.x3 - uvs.x0, uvs.y3 - uvs.y0, uvs.x0, uvs.y0);\n\n        const orig = tex.orig;\n        const trim = tex.trim;\n\n        if (trim)\n        {\n            tempMat.set(orig.width / trim.width, 0, 0, orig.height / trim.height,\n                -trim.x / trim.width, -trim.y / trim.height);\n            this.mapCoord.append(tempMat);\n        }\n\n        const texBase = tex.baseTexture;\n        const frame = this.uClampFrame;\n        const margin = this.clampMargin / texBase.resolution;\n        const offset = this.clampOffset;\n\n        frame[0] = (tex._frame.x + margin + offset) / texBase.width;\n        frame[1] = (tex._frame.y + margin + offset) / texBase.height;\n        frame[2] = (tex._frame.x + tex._frame.width - margin + offset) / texBase.width;\n        frame[3] = (tex._frame.y + tex._frame.height - margin + offset) / texBase.height;\n        this.uClampOffset[0] = offset / texBase.realWidth;\n        this.uClampOffset[1] = offset / texBase.realHeight;\n\n        this.isSimple = tex._frame.width === texBase.width\n            && tex._frame.height === texBase.height\n            && tex.rotate === 0;\n\n        return true;\n    }\n}\n","import Filter from '../Filter';\nimport { Matrix } from '@pixi/math';\nimport vertex from './spriteMaskFilter.vert';\nimport fragment from './spriteMaskFilter.frag';\nimport { default as TextureMatrix } from '../../textures/TextureMatrix';\n\n/**\n * This handles a Sprite acting as a mask, as opposed to a Graphic.\n *\n * WebGL only.\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI\n */\nexport default class SpriteMaskFilter extends Filter\n{\n    /**\n     * @param {PIXI.Sprite} sprite - the target sprite\n     */\n    constructor(sprite)\n    {\n        const maskMatrix = new Matrix();\n\n        super(vertex, fragment);\n\n        sprite.renderable = false;\n\n        /**\n         * Sprite mask\n         * @member {PIXI.Sprite}\n         */\n        this.maskSprite = sprite;\n\n        /**\n         * Mask matrix\n         * @member {PIXI.Matrix}\n         */\n        this.maskMatrix = maskMatrix;\n    }\n\n    /**\n     * Applies the filter\n     *\n     * @param {PIXI.systems.FilterSystem} filterManager - The renderer to retrieve the filter from\n     * @param {PIXI.RenderTexture} input - The input render target.\n     * @param {PIXI.RenderTexture} output - The target to output to.\n     * @param {boolean} clear - Should the output be cleared before rendering to it.\n     */\n    apply(filterManager, input, output, clear)\n    {\n        const maskSprite = this.maskSprite;\n        const tex = this.maskSprite.texture;\n\n        if (!tex.valid)\n        {\n            return;\n        }\n        if (!tex.transform)\n        {\n            // margin = 0.0, let it bleed a bit, shader code becomes easier\n            // assuming that atlas textures were made with 1-pixel padding\n            tex.transform = new TextureMatrix(tex, 0.0);\n        }\n        tex.transform.update();\n\n        this.uniforms.npmAlpha = tex.baseTexture.premultiplyAlpha ? 0.0 : 1.0;\n        this.uniforms.mask = tex;\n        // get _normalized sprite texture coords_ and convert them to _normalized atlas texture coords_ with `prepend`\n        this.uniforms.otherMatrix = filterManager.calculateSpriteMatrix(this.maskMatrix, maskSprite)\n            .prepend(tex.transform.mapCoord);\n        this.uniforms.alpha = maskSprite.worldAlpha;\n        this.uniforms.maskClamp = tex.transform.uClampFrame;\n\n        filterManager.applyFilter(this, input, output, clear);\n    }\n}\n","import System from '../System';\nimport SpriteMaskFilter from '../filters/spriteMask/SpriteMaskFilter';\n\n/**\n * System plugin to the renderer to manage masks.\n *\n * @class\n * @extends PIXI.System\n * @memberof PIXI.systems\n */\nexport default class MaskSystem extends System\n{\n    /**\n     * @param {PIXI.Renderer} renderer - The renderer this System works for.\n     */\n    constructor(renderer)\n    {\n        super(renderer);\n\n        // TODO - we don't need both!\n        /**\n         * `true` if current pushed masked is scissor\n         * @member {boolean}\n         * @readonly\n         */\n        this.scissor = false;\n\n        /**\n         * Mask data\n         * @member {PIXI.Graphics}\n         * @readonly\n         */\n        this.scissorData = null;\n\n        /**\n         * Target to mask\n         * @member {PIXI.DisplayObject}\n         * @readonly\n         */\n        this.scissorRenderTarget = null;\n\n        /**\n         * Enable scissor\n         * @member {boolean}\n         * @readonly\n         */\n        this.enableScissor = false;\n\n        /**\n         * Pool of used sprite mask filters\n         * @member {PIXI.SpriteMaskFilter[]}\n         * @readonly\n         */\n        this.alphaMaskPool = [];\n\n        /**\n         * Current index of alpha mask pool\n         * @member {number}\n         * @default 0\n         * @readonly\n         */\n        this.alphaMaskIndex = 0;\n    }\n\n    /**\n     * Applies the Mask and adds it to the current filter stack.\n     *\n     * @param {PIXI.DisplayObject} target - Display Object to push the mask to\n     * @param {PIXI.Sprite|PIXI.Graphics} maskData - The masking data.\n     */\n    push(target, maskData)\n    {\n        // TODO the root check means scissor rect will not\n        // be used on render textures more info here:\n        // https://github.com/pixijs/pixi.js/pull/3545\n\n        if (maskData.isSprite)\n        {\n            this.pushSpriteMask(target, maskData);\n        }\n        else if (this.enableScissor\n            && !this.scissor\n            && this.renderer._activeRenderTarget.root\n            && !this.renderer.stencil.stencilMaskStack.length\n            && maskData.isFastRect())\n        {\n            const matrix = maskData.worldTransform;\n\n            let rot = Math.atan2(matrix.b, matrix.a);\n\n            // use the nearest degree!\n            rot = Math.round(rot * (180 / Math.PI));\n\n            if (rot % 90)\n            {\n                this.pushStencilMask(maskData);\n            }\n            else\n            {\n                this.pushScissorMask(target, maskData);\n            }\n        }\n        else\n        {\n            this.pushStencilMask(maskData);\n        }\n    }\n\n    /**\n     * Removes the last mask from the mask stack and doesn't return it.\n     *\n     * @param {PIXI.DisplayObject} target - Display Object to pop the mask from\n     * @param {PIXI.Sprite|PIXI.Graphics} maskData - The masking data.\n     */\n    pop(target, maskData)\n    {\n        if (maskData.isSprite)\n        {\n            this.popSpriteMask(target, maskData);\n        }\n        else if (this.enableScissor && !this.renderer.stencil.stencilMaskStack.length)\n        {\n            this.popScissorMask(target, maskData);\n        }\n        else\n        {\n            this.popStencilMask(target, maskData);\n        }\n    }\n\n    /**\n     * Applies the Mask and adds it to the current filter stack.\n     *\n     * @param {PIXI.RenderTexture} target - Display Object to push the sprite mask to\n     * @param {PIXI.Sprite} maskData - Sprite to be used as the mask\n     */\n    pushSpriteMask(target, maskData)\n    {\n        let alphaMaskFilter = this.alphaMaskPool[this.alphaMaskIndex];\n\n        if (!alphaMaskFilter)\n        {\n            alphaMaskFilter = this.alphaMaskPool[this.alphaMaskIndex] = [new SpriteMaskFilter(maskData)];\n        }\n\n        alphaMaskFilter[0].resolution = this.renderer.resolution;\n        alphaMaskFilter[0].maskSprite = maskData;\n\n        const stashFilterArea = target.filterArea;\n\n        target.filterArea = maskData.getBounds(true);\n        this.renderer.filter.push(target, alphaMaskFilter);\n        target.filterArea = stashFilterArea;\n\n        this.alphaMaskIndex++;\n    }\n\n    /**\n     * Removes the last filter from the filter stack and doesn't return it.\n     *\n     */\n    popSpriteMask()\n    {\n        this.renderer.filter.pop();\n        this.alphaMaskIndex--;\n    }\n\n    /**\n     * Applies the Mask and adds it to the current filter stack.\n     *\n     * @param {PIXI.Sprite|PIXI.Graphics} maskData - The masking data.\n     */\n    pushStencilMask(maskData)\n    {\n        this.renderer.batch.flush();\n        this.renderer.stencil.pushStencil(maskData);\n    }\n\n    /**\n     * Removes the last filter from the filter stack and doesn't return it.\n     *\n     */\n    popStencilMask()\n    {\n        // this.renderer.currentRenderer.stop();\n        this.renderer.stencil.popStencil();\n    }\n\n    /**\n     *\n     * @param {PIXI.DisplayObject} target - Display Object to push the mask to\n     * @param {PIXI.Graphics} maskData - The masking data.\n     */\n    pushScissorMask(target, maskData)\n    {\n        maskData.renderable = true;\n\n        const renderTarget = this.renderer._activeRenderTarget;\n\n        const bounds = maskData.getBounds();\n\n        bounds.fit(renderTarget.size);\n        maskData.renderable = false;\n\n        this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST);\n\n        const resolution = this.renderer.resolution;\n\n        this.renderer.gl.scissor(\n            bounds.x * resolution,\n            (renderTarget.root ? renderTarget.size.height - bounds.y - bounds.height : bounds.y) * resolution,\n            bounds.width * resolution,\n            bounds.height * resolution\n        );\n\n        this.scissorRenderTarget = renderTarget;\n        this.scissorData = maskData;\n        this.scissor = true;\n    }\n\n    /**\n     * Pop scissor mask\n     *\n     */\n    popScissorMask()\n    {\n        this.scissorRenderTarget = null;\n        this.scissorData = null;\n        this.scissor = false;\n\n        // must be scissor!\n        const { gl } = this.renderer;\n\n        gl.disable(gl.SCISSOR_TEST);\n    }\n}\n","import System from '../System';\n\n/**\n * System plugin to the renderer to manage stencils (used for masks).\n *\n * @class\n * @extends PIXI.System\n * @memberof PIXI.systems\n */\nexport default class StencilSystem extends System\n{\n    /**\n     * @param {PIXI.Renderer} renderer - The renderer this System works for.\n     */\n    constructor(renderer)\n    {\n        super(renderer);\n\n        /**\n         * The mask stack\n         * @member {PIXI.Graphics[]}\n         */\n        this.stencilMaskStack = [];\n    }\n\n    /**\n     * Changes the mask stack that is used by this System.\n     *\n     * @param {PIXI.Graphics[]} stencilMaskStack - The mask stack\n     */\n    setMaskStack(stencilMaskStack)\n    {\n        const gl = this.renderer.gl;\n        const curStackLen = this.stencilMaskStack.length;\n\n        this.stencilMaskStack = stencilMaskStack;\n        if (stencilMaskStack.length !== curStackLen)\n        {\n            if (stencilMaskStack.length === 0)\n            {\n                gl.disable(gl.STENCIL_TEST);\n            }\n            else\n            {\n                gl.enable(gl.STENCIL_TEST);\n                this._useCurrent();\n            }\n        }\n    }\n\n    /**\n     * Applies the Mask and adds it to the current stencil stack. @alvin\n     *\n     * @param {PIXI.Graphics} graphics - The mask\n     */\n    pushStencil(graphics)\n    {\n        const gl = this.renderer.gl;\n        const prevMaskCount = this.stencilMaskStack.length;\n\n        if (prevMaskCount === 0)\n        {\n            // force use stencil texture in current framebuffer\n            this.renderer.framebuffer.forceStencil();\n            gl.enable(gl.STENCIL_TEST);\n        }\n\n        this.stencilMaskStack.push(graphics);\n\n        // Increment the reference stencil value where the new mask overlaps with the old ones.\n        gl.colorMask(false, false, false, false);\n        gl.stencilFunc(gl.EQUAL, prevMaskCount, this._getBitwiseMask());\n        gl.stencilOp(gl.KEEP, gl.KEEP, gl.INCR);\n\n        graphics.renderable = true;\n        graphics.render(this.renderer);\n        this.renderer.batch.flush();\n        graphics.renderable = false;\n\n        this._useCurrent();\n    }\n\n    /**\n     * Removes the last mask from the stencil stack. @alvin\n     */\n    popStencil()\n    {\n        const gl = this.renderer.gl;\n        const graphics = this.stencilMaskStack.pop();\n\n        if (this.stencilMaskStack.length === 0)\n        {\n            // the stack is empty!\n            gl.disable(gl.STENCIL_TEST);\n            gl.clear(gl.STENCIL_BUFFER_BIT);\n            gl.clearStencil(0);\n        }\n        else\n        {\n            // Decrement the reference stencil value where the popped mask overlaps with the other ones\n            gl.colorMask(false, false, false, false);\n            gl.stencilOp(gl.KEEP, gl.KEEP, gl.DECR);\n\n            graphics.renderable = true;\n            graphics.render(this.renderer);\n            this.renderer.batch.flush();\n            graphics.renderable = false;\n\n            this._useCurrent();\n        }\n    }\n\n    /**\n     * Setup renderer to use the current stencil data.\n     * @private\n     */\n    _useCurrent()\n    {\n        const gl = this.renderer.gl;\n\n        gl.colorMask(true, true, true, true);\n        gl.stencilFunc(gl.EQUAL, this.stencilMaskStack.length, this._getBitwiseMask());\n        gl.stencilOp(gl.KEEP, gl.KEEP, gl.KEEP);\n    }\n\n    /**\n     * Fill 1s equal to the number of acitve stencil masks.\n     * @private\n     * @return {number} The bitwise mask.\n     */\n    _getBitwiseMask()\n    {\n        return (1 << this.stencilMaskStack.length) - 1;\n    }\n\n    /**\n     * Destroys the mask stack.\n     *\n     */\n    destroy()\n    {\n        super.destroy(this);\n\n        this.stencilMaskStack = null;\n    }\n}\n","import System from '../System';\nimport { Matrix } from '@pixi/math';\n\n/**\n * System plugin to the renderer to manage the projection matrix.\n *\n * @class\n * @extends PIXI.System\n * @memberof PIXI.systems\n */\n\nexport default class ProjectionSystem extends System\n{\n    /**\n     * @param {PIXI.Renderer} renderer - The renderer this System works for.\n     */\n    constructor(renderer)\n    {\n        super(renderer);\n\n        /**\n         * Destination frame\n         * @member {PIXI.Rectangle}\n         * @readonly\n         */\n        this.destinationFrame = null;\n\n        /**\n         * Source frame\n         * @member {PIXI.Rectangle}\n         * @readonly\n         */\n        this.sourceFrame = null;\n\n        /**\n         * Default destination frame\n         * @member {PIXI.Rectangle}\n         * @readonly\n         */\n        this.defaultFrame = null;\n\n        /**\n         * Project matrix\n         * @member {PIXI.Matrix}\n         * @readonly\n         */\n        this.projectionMatrix = new Matrix();\n\n        /**\n         * A transform that will be appended to the projection matrix\n         * if null, nothing will be applied\n         * @member {PIXI.Matrix}\n         */\n        this.transform = null;\n    }\n\n    /**\n     * Updates the projection matrix based on a projection frame (which is a rectangle)\n     *\n     * @param {PIXI.Rectangle} destinationFrame - The destination frame.\n     * @param {PIXI.Rectangle} sourceFrame - The source frame.\n     * @param {Number} resolution - Resolution\n     * @param {boolean} root - If is root\n     */\n    update(destinationFrame, sourceFrame, resolution, root)\n    {\n        this.destinationFrame = destinationFrame || this.destinationFrame || this.defaultFrame;\n        this.sourceFrame = sourceFrame || this.sourceFrame || destinationFrame;\n\n        this.calculateProjection(this.destinationFrame, this.sourceFrame, resolution, root);\n\n        if (this.transform)\n        {\n            this.projectionMatrix.append(this.transform);\n        }\n\n        const renderer =  this.renderer;\n\n        renderer.globalUniforms.uniforms.projectionMatrix = this.projectionMatrix;\n        renderer.globalUniforms.update();\n\n        // this will work for now\n        // but would be sweet to stick and even on the global uniforms..\n        if (renderer.shader.shader)\n        {\n            renderer.shader.syncUniformGroup(renderer.shader.shader.uniforms.globals);\n        }\n    }\n\n    /**\n     * Updates the projection matrix based on a projection frame (which is a rectangle)\n     *\n     * @param {PIXI.Rectangle} destinationFrame - The destination frame.\n     * @param {PIXI.Rectangle} sourceFrame - The source frame.\n     * @param {Number} resolution - Resolution\n     * @param {boolean} root - If is root\n     */\n    calculateProjection(destinationFrame, sourceFrame, resolution, root)\n    {\n        const pm = this.projectionMatrix;\n\n        // I don't think we will need this line..\n        // pm.identity();\n\n        if (!root)\n        {\n            pm.a = (1 / destinationFrame.width * 2) * resolution;\n            pm.d = (1 / destinationFrame.height * 2) * resolution;\n\n            pm.tx = -1 - (sourceFrame.x * pm.a);\n            pm.ty = -1 - (sourceFrame.y * pm.d);\n        }\n        else\n        {\n            pm.a = (1 / destinationFrame.width * 2) * resolution;\n            pm.d = (-1 / destinationFrame.height * 2) * resolution;\n\n            pm.tx = -1 - (sourceFrame.x * pm.a);\n            pm.ty = 1 - (sourceFrame.y * pm.d);\n        }\n    }\n\n    /**\n     * Sets the transform of the active render target to the given matrix\n     *\n     * @param {PIXI.Matrix} matrix - The transformation matrix\n     */\n    setTransform()// matrix)\n    {\n        // this._activeRenderTarget.transform = matrix;\n    }\n}\n","import System from '../System';\nimport { Rectangle } from '@pixi/math';\n\nconst tempRect = new Rectangle();\n\n/**\n * System plugin to the renderer to manage render textures.\n *\n * Should be added after FramebufferSystem\n *\n * @class\n * @extends PIXI.System\n * @memberof PIXI.systems\n */\n\nexport default class RenderTextureSystem extends System\n{\n    /**\n     * @param {PIXI.Renderer} renderer - The renderer this System works for.\n     */\n    constructor(renderer)\n    {\n        super(renderer);\n\n        /**\n         * The clear background color as rgba\n         * @member {number[]}\n         */\n        this.clearColor = renderer._backgroundColorRgba;\n\n        // TODO move this property somewhere else!\n        /**\n         * List of masks for the StencilSystem\n         * @member {PIXI.Graphics[]}\n         * @readonly\n         */\n        this.defaultMaskStack = [];\n\n        // empty render texture?\n        /**\n         * Render texture\n         * @member {PIXI.RenderTexture}\n         * @readonly\n         */\n        this.current = null;\n\n        /**\n         * Source frame\n         * @member {PIXI.Rectangle}\n         * @readonly\n         */\n        this.sourceFrame = new Rectangle();\n\n        /**\n         * Destination frame\n         * @member {PIXI.Rectangle}\n         * @readonly\n         */\n        this.destinationFrame = new Rectangle();\n    }\n\n    /**\n     * Bind the current render texture\n     * @param {PIXI.RenderTexture} [renderTexture] - RenderTexture to bind, by default its `null`, the screen\n     * @param {PIXI.Rectangle} [sourceFrame] - part of screen that is mapped to the renderTexture\n     * @param {PIXI.Rectangle} [destinationFrame] - part of renderTexture, by default it has the same size as sourceFrame\n     */\n    bind(renderTexture = null, sourceFrame, destinationFrame)\n    {\n        this.current = renderTexture;\n\n        const renderer = this.renderer;\n\n        let resolution;\n\n        if (renderTexture)\n        {\n            const baseTexture = renderTexture.baseTexture;\n\n            resolution = baseTexture.resolution;\n\n            if (!destinationFrame)\n            {\n                tempRect.width = baseTexture.realWidth;\n                tempRect.height = baseTexture.realHeight;\n\n                destinationFrame = tempRect;\n            }\n\n            if (!sourceFrame)\n            {\n                sourceFrame = destinationFrame;\n            }\n\n            this.renderer.framebuffer.bind(baseTexture.framebuffer, destinationFrame);\n\n            this.renderer.projection.update(destinationFrame, sourceFrame, resolution, false);\n            this.renderer.stencil.setMaskStack(baseTexture.stencilMaskStack);\n        }\n        else\n        {\n            resolution = this.renderer.resolution;\n\n            // TODO these validation checks happen deeper down..\n            // thing they can be avoided..\n            if (!destinationFrame)\n            {\n                tempRect.width = renderer.width;\n                tempRect.height = renderer.height;\n\n                destinationFrame = tempRect;\n            }\n\n            if (!sourceFrame)\n            {\n                sourceFrame = destinationFrame;\n            }\n\n            renderer.framebuffer.bind(null, destinationFrame);\n\n            // TODO store this..\n            this.renderer.projection.update(destinationFrame, sourceFrame, resolution, true);\n            this.renderer.stencil.setMaskStack(this.defaultMaskStack);\n        }\n\n        this.sourceFrame.copyFrom(sourceFrame);\n\n        this.destinationFrame.x = destinationFrame.x / resolution;\n        this.destinationFrame.y = destinationFrame.y / resolution;\n\n        this.destinationFrame.width = destinationFrame.width / resolution;\n        this.destinationFrame.height = destinationFrame.height / resolution;\n\n        if (sourceFrame === destinationFrame)\n        {\n            this.sourceFrame.copyFrom(this.destinationFrame);\n        }\n    }\n\n    /**\n     * Erases the render texture and fills the drawing area with a colour\n     *\n     * @param {number[]} [clearColor] - The color as rgba, default to use the renderer backgroundColor\n     * @return {PIXI.Renderer} Returns itself.\n     */\n    clear(clearColor)\n    {\n        if (this.current)\n        {\n            clearColor = clearColor || this.current.baseTexture.clearColor;\n        }\n        else\n        {\n            clearColor = clearColor || this.clearColor;\n        }\n\n        this.renderer.framebuffer.clear(clearColor[0], clearColor[1], clearColor[2], clearColor[3]);\n    }\n\n    resize()// screenWidth, screenHeight)\n    {\n        // resize the root only!\n        this.bind(null);\n    }\n\n    /**\n     * Resets renderTexture state\n     */\n    reset()\n    {\n        this.bind(null);\n    }\n}\n","/**\n * Helper class to create a WebGL Program\n *\n * @class\n * @memberof PIXI\n */\nexport default class GLProgram\n{\n    /**\n     * Makes a new Pixi program\n     *\n     * @param program {WebGLProgram} webgl program\n     * @param uniformData {Object} uniforms\n     */\n    constructor(program, uniformData)\n    {\n        /**\n         * The shader program\n         *\n         * @member {WebGLProgram}\n         */\n        this.program = program;\n\n        /**\n         * holds the uniform data which contains uniform locations\n         * and current uniform values used for caching and preventing unneeded GPU commands\n         * @member {Object}\n         */\n        this.uniformData = uniformData;\n\n        /**\n         * uniformGroups holds the various upload functions for the shader. Each uniform group\n         * and program have a unique upload function generated.\n         * @member {Object}\n         */\n        this.uniformGroups = {};\n    }\n\n    /**\n     * Destroys this program\n     */\n    destroy()\n    {\n        this.uniformData = null;\n        this.uniformGroups = null;\n        this.program = null;\n    }\n}\n","import System from '../System';\nimport GLProgram from './GLProgram';\nimport { generateUniformsSync,\n    unsafeEvalSupported,\n    defaultValue,\n    compileProgram } from './utils';\n\nlet UID = 0;\n\n/**\n * System plugin to the renderer to manage shaders.\n *\n * @class\n * @memberof PIXI.systems\n * @extends PIXI.System\n */\nexport default class ShaderSystem extends System\n{\n    /**\n     * @param {PIXI.Renderer} renderer - The renderer this System works for.\n     */\n    constructor(renderer)\n    {\n        super(renderer);\n\n        // Validation check that this environment support `new Function`\n        this.systemCheck();\n\n        /**\n         * The current WebGL rendering context\n         *\n         * @member {WebGLRenderingContext}\n         */\n        this.gl = null;\n\n        this.shader = null;\n        this.program = null;\n\n        /**\n         * Cache to holds the generated functions. Stored against UniformObjects unique signature\n         * @type {Object}\n         * @private\n         */\n        this.cache = {};\n\n        this.id = UID++;\n    }\n\n    /**\n     * Overrideable function by `@pixi/unsafe-eval` to silence\n     * throwing an error if platform doesn't support unsafe-evals.\n     *\n     * @private\n     */\n    systemCheck()\n    {\n        if (!unsafeEvalSupported())\n        {\n            throw new Error('Current environment does not allow unsafe-eval, '\n                + 'please use @pixi/unsafe-eval module to enable support.');\n        }\n    }\n\n    contextChange(gl)\n    {\n        this.gl = gl;\n        this.reset();\n    }\n\n    /**\n     * Changes the current shader to the one given in parameter\n     *\n     * @param {PIXI.Shader} shader - the new shader\n     * @param {boolean} dontSync - false if the shader should automatically sync its uniforms.\n     * @returns {PIXI.GLProgram} the glProgram that belongs to the shader.\n     */\n    bind(shader, dontSync)\n    {\n        shader.uniforms.globals = this.renderer.globalUniforms;\n\n        const program = shader.program;\n        const glProgram = program.glPrograms[this.renderer.CONTEXT_UID] || this.generateShader(shader);\n\n        this.shader = shader;\n\n        // TODO - some current Pixi plugins bypass this.. so it not safe to use yet..\n        if (this.program !== program)\n        {\n            this.program = program;\n            this.gl.useProgram(glProgram.program);\n        }\n\n        if (!dontSync)\n        {\n            this.syncUniformGroup(shader.uniformGroup);\n        }\n\n        return glProgram;\n    }\n\n    /**\n     * Uploads the uniforms values to the currently bound shader.\n     *\n     * @param {object} uniforms - the uniforms values that be applied to the current shader\n     */\n    setUniforms(uniforms)\n    {\n        const shader = this.shader.program;\n        const glProgram = shader.glPrograms[this.renderer.CONTEXT_UID];\n\n        shader.syncUniforms(glProgram.uniformData, uniforms, this.renderer);\n    }\n\n    syncUniformGroup(group)\n    {\n        const glProgram = this.getglProgram();\n\n        if (!group.static || group.dirtyId !== glProgram.uniformGroups[group.id])\n        {\n            glProgram.uniformGroups[group.id] = group.dirtyId;\n\n            this.syncUniforms(group, glProgram);\n        }\n    }\n\n    /**\n     * Overrideable by the @pixi/unsafe-eval package to use static\n     * syncUnforms instead.\n     *\n     * @private\n     */\n    syncUniforms(group, glProgram)\n    {\n        const syncFunc = group.syncUniforms[this.shader.program.id] || this.createSyncGroups(group);\n\n        syncFunc(glProgram.uniformData, group.uniforms, this.renderer);\n    }\n\n    createSyncGroups(group)\n    {\n        const id = this.getSignature(group, this.shader.program.uniformData);\n\n        if (!this.cache[id])\n        {\n            this.cache[id] = generateUniformsSync(group, this.shader.program.uniformData);\n        }\n\n        group.syncUniforms[this.shader.program.id] = this.cache[id];\n\n        return group.syncUniforms[this.shader.program.id];\n    }\n\n    /**\n     * Takes a uniform group and data and generates a unique signature for them.\n     *\n     * @param {PIXI.UniformGroup} group the uniform group to get signature of\n     * @param {Object} uniformData uniform information generated by the shader\n     * @returns {String} Unique signature of the uniform group\n     * @private\n     */\n    getSignature(group, uniformData)\n    {\n        const uniforms = group.uniforms;\n\n        const strings = [];\n\n        for (const i in uniforms)\n        {\n            strings.push(i);\n\n            if (uniformData[i])\n            {\n                strings.push(uniformData[i].type);\n            }\n        }\n\n        return strings.join('-');\n    }\n\n    /**\n     * Returns the underlying GLShade rof the currently bound shader.\n     * This can be handy for when you to have a little more control over the setting of your uniforms.\n     *\n     * @return {PIXI.GLProgram} the glProgram for the currently bound Shader for this context\n     */\n    getglProgram()\n    {\n        if (this.shader)\n        {\n            return this.shader.program.glPrograms[this.renderer.CONTEXT_UID];\n        }\n\n        return null;\n    }\n\n    /**\n     * Generates a glProgram version of the Shader provided.\n     *\n     * @private\n     * @param {PIXI.Shader} shader the shader that the glProgram will be based on.\n     * @return {PIXI.GLProgram} A shiny new glProgram!\n     */\n    generateShader(shader)\n    {\n        const gl = this.gl;\n\n        const program = shader.program;\n\n        const attribMap = {};\n\n        for (const i in program.attributeData)\n        {\n            attribMap[i] = program.attributeData[i].location;\n        }\n\n        const shaderProgram = compileProgram(gl, program.vertexSrc, program.fragmentSrc, attribMap);\n        const uniformData = {};\n\n        for (const i in program.uniformData)\n        {\n            const data = program.uniformData[i];\n\n            uniformData[i] = {\n                location: gl.getUniformLocation(shaderProgram, i),\n                value: defaultValue(data.type, data.size),\n            };\n        }\n\n        const glProgram = new GLProgram(shaderProgram, uniformData);\n\n        program.glPrograms[this.renderer.CONTEXT_UID] = glProgram;\n\n        return glProgram;\n    }\n\n    /**\n     * Resets ShaderSystem state, does not affect WebGL state\n     */\n    reset()\n    {\n        this.program = null;\n        this.shader = null;\n    }\n\n    /**\n     * Destroys this System and removes all its textures\n     */\n    destroy()\n    {\n        // TODO implement destroy method for ShaderSystem\n        this.destroyed = true;\n    }\n}\n","import { BLEND_MODES } from '@pixi/constants';\n\n/**\n * Maps gl blend combinations to WebGL.\n *\n * @memberof PIXI\n * @function mapWebGLBlendModesToPixi\n * @private\n * @param {WebGLRenderingContext} gl - The rendering context.\n * @param {number[][]} [array=[]] - The array to output into.\n * @return {number[][]} Mapped modes.\n */\nexport default function mapWebGLBlendModesToPixi(gl, array = [])\n{\n    // TODO - premultiply alpha would be different.\n    // add a boolean for that!\n    array[BLEND_MODES.NORMAL] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n    array[BLEND_MODES.ADD] = [gl.ONE, gl.ONE];\n    array[BLEND_MODES.MULTIPLY] = [gl.DST_COLOR, gl.ONE_MINUS_SRC_ALPHA, gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n    array[BLEND_MODES.SCREEN] = [gl.ONE, gl.ONE_MINUS_SRC_COLOR, gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n    array[BLEND_MODES.OVERLAY] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n    array[BLEND_MODES.DARKEN] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n    array[BLEND_MODES.LIGHTEN] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n    array[BLEND_MODES.COLOR_DODGE] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n    array[BLEND_MODES.COLOR_BURN] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n    array[BLEND_MODES.HARD_LIGHT] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n    array[BLEND_MODES.SOFT_LIGHT] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n    array[BLEND_MODES.DIFFERENCE] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n    array[BLEND_MODES.EXCLUSION] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n    array[BLEND_MODES.HUE] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n    array[BLEND_MODES.SATURATION] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n    array[BLEND_MODES.COLOR] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n    array[BLEND_MODES.LUMINOSITY] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n    array[BLEND_MODES.NONE] = [0, 0];\n\n    // not-premultiplied blend modes\n    array[BLEND_MODES.NORMAL_NPM] = [gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA, gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n    array[BLEND_MODES.ADD_NPM] = [gl.SRC_ALPHA, gl.ONE, gl.ONE, gl.ONE];\n    array[BLEND_MODES.SCREEN_NPM] = [gl.SRC_ALPHA, gl.ONE_MINUS_SRC_COLOR, gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n\n    // composite operations\n    array[BLEND_MODES.SRC_IN] = [gl.DST_ALPHA, gl.ZERO];\n    array[BLEND_MODES.SRC_OUT] = [gl.ONE_MINUS_DST_ALPHA, gl.ZERO];\n    array[BLEND_MODES.SRC_ATOP] = [gl.DST_ALPHA, gl.ONE_MINUS_SRC_ALPHA];\n    array[BLEND_MODES.DST_OVER] = [gl.ONE_MINUS_DST_ALPHA, gl.ONE];\n    array[BLEND_MODES.DST_IN] = [gl.ZERO, gl.SRC_ALPHA];\n    array[BLEND_MODES.DST_OUT] = [gl.ZERO, gl.ONE_MINUS_SRC_ALPHA];\n    array[BLEND_MODES.DST_ATOP] = [gl.ONE_MINUS_DST_ALPHA, gl.SRC_ALPHA];\n\n    // SUBTRACT from flash\n    array[BLEND_MODES.SUBTRACT] = [gl.ONE, gl.ONE, gl.ONE, gl.ONE, gl.FUNC_REVERSE_SUBTRACT, gl.FUNC_ADD];\n\n    return array;\n}\n","import mapWebGLBlendModesToPixi from './utils/mapWebGLBlendModesToPixi';\nimport System from '../System';\nimport State from './State';\nimport { BLEND_MODES } from '@pixi/constants';\n\nconst BLEND = 0;\nconst OFFSET = 1;\nconst CULLING = 2;\nconst DEPTH_TEST = 3;\nconst WINDING = 4;\n\n/**\n * System plugin to the renderer to manage WebGL state machines.\n *\n * @class\n * @extends PIXI.System\n * @memberof PIXI.systems\n */\nexport default class StateSystem extends System\n{\n    /**\n     * @param {PIXI.Renderer} renderer - The renderer this System works for.\n     */\n    constructor(renderer)\n    {\n        super(renderer);\n\n        /**\n         * GL context\n         * @member {WebGLRenderingContext}\n         * @readonly\n         */\n        this.gl = null;\n\n        /**\n         * State ID\n         * @member {number}\n         * @readonly\n         */\n        this.stateId = 0;\n\n        /**\n         * Polygon offset\n         * @member {number}\n         * @readonly\n         */\n        this.polygonOffset = 0;\n\n        /**\n         * Blend mode\n         * @member {number}\n         * @default PIXI.BLEND_MODES.NONE\n         * @readonly\n         */\n        this.blendMode = BLEND_MODES.NONE;\n\n        /**\n         * Whether current blend equation is different\n         * @member {boolean}\n         * @protected\n         */\n        this._blendEq = false;\n\n        /**\n         * Collection of calls\n         * @member {function[]}\n         * @readonly\n         */\n        this.map = [];\n\n        // map functions for when we set state..\n        this.map[BLEND] = this.setBlend;\n        this.map[OFFSET] = this.setOffset;\n        this.map[CULLING] = this.setCullFace;\n        this.map[DEPTH_TEST] = this.setDepthTest;\n        this.map[WINDING] = this.setFrontFace;\n\n        /**\n         * Collection of check calls\n         * @member {function[]}\n         * @readonly\n         */\n        this.checks = [];\n\n        /**\n         * Default WebGL State\n         * @member {PIXI.State}\n         * @readonly\n         */\n        this.defaultState = new State();\n        this.defaultState.blend = true;\n        this.defaultState.depth = true;\n    }\n\n    contextChange(gl)\n    {\n        this.gl = gl;\n\n        this.blendModes = mapWebGLBlendModesToPixi(gl);\n\n        this.set(this.defaultState);\n\n        this.reset();\n    }\n\n    /**\n     * Sets the current state\n     *\n     * @param {*} state - The state to set.\n     */\n    set(state)\n    {\n        state = state || this.defaultState;\n\n        // TODO maybe to an object check? ( this.state === state )?\n        if (this.stateId !== state.data)\n        {\n            let diff = this.stateId ^ state.data;\n            let i = 0;\n\n            // order from least to most common\n            while (diff)\n            {\n                if (diff & 1)\n                {\n                    // state change!\n                    this.map[i].call(this, !!(state.data & (1 << i)));\n                }\n\n                diff = diff >> 1;\n                i++;\n            }\n\n            this.stateId = state.data;\n        }\n\n        // based on the above settings we check for specific modes..\n        // for example if blend is active we check and set the blend modes\n        // or of polygon offset is active we check the poly depth.\n        for (let i = 0; i < this.checks.length; i++)\n        {\n            this.checks[i](this, state);\n        }\n    }\n\n    /**\n     * Sets the state, when previous state is unknown\n     *\n     * @param {*} state - The state to set\n     */\n    forceState(state)\n    {\n        state = state || this.defaultState;\n        for (let i = 0; i < this.map.length; i++)\n        {\n            this.map[i].call(this, !!(state.data & (1 << i)));\n        }\n        for (let i = 0; i < this.checks.length; i++)\n        {\n            this.checks[i](this, state);\n        }\n\n        this.stateId = state.data;\n    }\n\n    /**\n     * Enables or disabled blending.\n     *\n     * @param {boolean} value - Turn on or off webgl blending.\n     */\n    setBlend(value)\n    {\n        this.updateCheck(StateSystem.checkBlendMode, value);\n\n        this.gl[value ? 'enable' : 'disable'](this.gl.BLEND);\n    }\n\n    /**\n     * Enables or disable polygon offset fill\n     *\n     * @param {boolean} value - Turn on or off webgl polygon offset testing.\n     */\n    setOffset(value)\n    {\n        this.updateCheck(StateSystem.checkPolygonOffset, value);\n\n        this.gl[value ? 'enable' : 'disable'](this.gl.POLYGON_OFFSET_FILL);\n    }\n\n    /**\n     * Sets whether to enable or disable depth test.\n     *\n     * @param {boolean} value - Turn on or off webgl depth testing.\n     */\n    setDepthTest(value)\n    {\n        this.gl[value ? 'enable' : 'disable'](this.gl.DEPTH_TEST);\n    }\n\n    /**\n     * Sets whether to enable or disable cull face.\n     *\n     * @param {boolean} value - Turn on or off webgl cull face.\n     */\n    setCullFace(value)\n    {\n        this.gl[value ? 'enable' : 'disable'](this.gl.CULL_FACE);\n    }\n\n    /**\n     * Sets the gl front face.\n     *\n     * @param {boolean} value - true is clockwise and false is counter-clockwise\n     */\n    setFrontFace(value)\n    {\n        this.gl.frontFace(this.gl[value ? 'CW' : 'CCW']);\n    }\n\n    /**\n     * Sets the blend mode.\n     *\n     * @param {number} value - The blend mode to set to.\n     */\n    setBlendMode(value)\n    {\n        if (value === this.blendMode)\n        {\n            return;\n        }\n\n        this.blendMode = value;\n\n        const mode = this.blendModes[value];\n        const gl = this.gl;\n\n        if (mode.length === 2)\n        {\n            gl.blendFunc(mode[0], mode[1]);\n        }\n        else\n        {\n            gl.blendFuncSeparate(mode[0], mode[1], mode[2], mode[3]);\n        }\n        if (mode.length === 6)\n        {\n            this._blendEq = true;\n            gl.blendEquationSeparate(mode[4], mode[5]);\n        }\n        else if (this._blendEq)\n        {\n            this._blendEq = false;\n            gl.blendEquationSeparate(gl.FUNC_ADD, gl.FUNC_ADD);\n        }\n    }\n\n    /**\n     * Sets the polygon offset.\n     *\n     * @param {number} value - the polygon offset\n     * @param {number} scale - the polygon offset scale\n     */\n    setPolygonOffset(value, scale)\n    {\n        this.gl.polygonOffset(value, scale);\n    }\n\n    // used\n    /**\n     * Resets all the logic and disables the vaos\n     */\n    reset()\n    {\n        this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL, false);\n\n        this.forceState(0);\n\n        this._blendEq = true;\n        this.blendMode = -1;\n        this.setBlendMode(0);\n    }\n\n    /**\n     * checks to see which updates should be checked based on which settings have been activated.\n     * For example, if blend is enabled then we should check the blend modes each time the state is changed\n     * or if polygon fill is activated then we need to check if the polygon offset changes.\n     * The idea is that we only check what we have too.\n     *\n     * @param {Function} func  the checking function to add or remove\n     * @param {boolean} value  should the check function be added or removed.\n     */\n    updateCheck(func, value)\n    {\n        const index = this.checks.indexOf(func);\n\n        if (value && index === -1)\n        {\n            this.checks.push(func);\n        }\n        else if (!value && index !== -1)\n        {\n            this.checks.splice(index, 1);\n        }\n    }\n\n    /**\n     * A private little wrapper function that we call to check the blend mode.\n     *\n     * @static\n     * @private\n     * @param {PIXI.StateSystem} System  the System to perform the state check on\n     * @param {PIXI.State} state  the state that the blendMode will pulled from\n     */\n    static checkBlendMode(system, state)\n    {\n        system.setBlendMode(state.blendMode);\n    }\n\n    /**\n     * A private little wrapper function that we call to check the polygon offset.\n     *\n     * @static\n     * @private\n     * @param {PIXI.StateSystem} System  the System to perform the state check on\n     * @param {PIXI.State} state  the state that the blendMode will pulled from\n     */\n    static checkPolygonOffset(system, state)\n    {\n        system.setPolygonOffset(state.polygonOffset, 0);\n    }\n}\n","import System from '../System';\nimport { GC_MODES } from '@pixi/constants';\nimport { settings } from '@pixi/settings';\n\n/**\n * System plugin to the renderer to manage texture garbage collection on the GPU,\n * ensuring that it does not get clogged up with textures that are no longer being used.\n *\n * @class\n * @memberof PIXI.systems\n * @extends PIXI.System\n */\nexport default class TextureGCSystem extends System\n{\n    /**\n     * @param {PIXI.Renderer} renderer - The renderer this System works for.\n     */\n    constructor(renderer)\n    {\n        super(renderer);\n\n        /**\n         * Count\n         * @member {number}\n         * @readonly\n         */\n        this.count = 0;\n\n        /**\n         * Check count\n         * @member {number}\n         * @readonly\n         */\n        this.checkCount = 0;\n\n        /**\n         * Maximum idle time, in seconds\n         * @member {number}\n         * @see PIXI.settings.GC_MAX_IDLE\n         */\n        this.maxIdle = settings.GC_MAX_IDLE;\n\n        /**\n         * Maximum number of item to check\n         * @member {number}\n         * @see PIXI.settings.GC_MAX_CHECK_COUNT\n         */\n        this.checkCountMax = settings.GC_MAX_CHECK_COUNT;\n\n        /**\n         * Current garabage collection mode\n         * @member {PIXI.GC_MODES}\n         * @see PIXI.settings.GC_MODE\n         */\n        this.mode = settings.GC_MODE;\n    }\n\n    /**\n     * Checks to see when the last time a texture was used\n     * if the texture has not been used for a specified amount of time it will be removed from the GPU\n     */\n    postrender()\n    {\n        this.count++;\n\n        if (this.mode === GC_MODES.MANUAL)\n        {\n            return;\n        }\n\n        this.checkCount++;\n\n        if (this.checkCount > this.checkCountMax)\n        {\n            this.checkCount = 0;\n\n            this.run();\n        }\n    }\n\n    /**\n     * Checks to see when the last time a texture was used\n     * if the texture has not been used for a specified amount of time it will be removed from the GPU\n     */\n    run()\n    {\n        const tm = this.renderer.texture;\n        const managedTextures =  tm.managedTextures;\n        let wasRemoved = false;\n\n        for (let i = 0; i < managedTextures.length; i++)\n        {\n            const texture = managedTextures[i];\n\n            // only supports non generated textures at the moment!\n            if (!texture.framebuffer && this.count - texture.touched > this.maxIdle)\n            {\n                tm.destroyTexture(texture, true);\n                managedTextures[i] = null;\n                wasRemoved = true;\n            }\n        }\n\n        if (wasRemoved)\n        {\n            let j = 0;\n\n            for (let i = 0; i < managedTextures.length; i++)\n            {\n                if (managedTextures[i] !== null)\n                {\n                    managedTextures[j++] = managedTextures[i];\n                }\n            }\n\n            managedTextures.length = j;\n        }\n    }\n\n    /**\n     * Removes all the textures within the specified displayObject and its children from the GPU\n     *\n     * @param {PIXI.DisplayObject} displayObject - the displayObject to remove the textures from.\n     */\n    unload(displayObject)\n    {\n        const tm = this.renderer.textureSystem;\n\n        // only destroy non generated textures\n        if (displayObject._texture && displayObject._texture._glRenderTargets)\n        {\n            tm.destroyTexture(displayObject._texture);\n        }\n\n        for (let i = displayObject.children.length - 1; i >= 0; i--)\n        {\n            this.unload(displayObject.children[i]);\n        }\n    }\n}\n","/**\n * Internal texture for WebGL context\n * @class\n * @memberof PIXI\n */\nexport default class GLTexture\n{\n    constructor(texture)\n    {\n        /**\n         * The WebGL texture\n         * @member {WebGLTexture}\n         */\n        this.texture = texture;\n\n        /**\n         * Width of texture that was used in texImage2D\n         * @member {number}\n         */\n        this.width = -1;\n\n        /**\n         * Height of texture that was used in texImage2D\n         * @member {number}\n         */\n        this.height = -1;\n\n        /**\n         * Texture contents dirty flag\n         * @member {number}\n         */\n        this.dirtyId = -1;\n\n        /**\n         * Texture style dirty flag\n         * @member {number}\n         */\n        this.dirtyStyleId = -1;\n\n        /**\n         * Whether mip levels has to be generated\n         * @member {boolean}\n         */\n        this.mipmap = false;\n\n        /**\n         * WrapMode copied from baseTexture\n         * @member {number}\n         */\n        this.wrapMode = 33071;\n\n        /**\n         * Type copied from baseTexture\n         * @member {number}\n         */\n        this.type = 6408;\n\n        /**\n         * Type copied from baseTexture\n         * @member {number}\n         */\n        this.internalFormat = 5121;\n    }\n}\n","import System from '../System';\nimport BaseTexture from './BaseTexture';\nimport GLTexture from './GLTexture';\nimport { removeItems } from '@pixi/utils';\nimport { MIPMAP_MODES, WRAP_MODES, SCALE_MODES, TYPES } from '@pixi/constants';\n\n/**\n * System plugin to the renderer to manage textures.\n *\n * @class\n * @extends PIXI.System\n * @memberof PIXI.systems\n */\nexport default class TextureSystem extends System\n{\n    /**\n     * @param {PIXI.Renderer} renderer - The renderer this System works for.\n     */\n    constructor(renderer)\n    {\n        super(renderer);\n\n        // TODO set to max textures...\n        /**\n         * Bound textures\n         * @member {PIXI.BaseTexture[]}\n         * @readonly\n         */\n        this.boundTextures = [];\n        /**\n         * Current location\n         * @member {number}\n         * @readonly\n         */\n        this.currentLocation = -1;\n\n        /**\n         * List of managed textures\n         * @member {PIXI.BaseTexture[]}\n         * @readonly\n         */\n        this.managedTextures = [];\n\n        /**\n         * Did someone temper with textures state? We'll overwrite them when we need to unbind something.\n         * @member {boolean}\n         * @private\n         */\n        this._unknownBoundTextures = false;\n\n        /**\n         * BaseTexture value that shows that we don't know what is bound\n         * @member {PIXI.BaseTexture}\n         * @readonly\n         */\n        this.unknownTexture = new BaseTexture();\n    }\n\n    /**\n     * Sets up the renderer context and necessary buffers.\n     */\n    contextChange()\n    {\n        const gl = this.gl = this.renderer.gl;\n\n        this.CONTEXT_UID = this.renderer.CONTEXT_UID;\n\n        this.webGLVersion = this.renderer.context.webGLVersion;\n\n        const maxTextures = gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS);\n\n        this.boundTextures.length = maxTextures;\n\n        for (let i = 0; i < maxTextures; i++)\n        {\n            this.boundTextures[i] = null;\n        }\n\n        // TODO move this.. to a nice make empty textures class..\n        this.emptyTextures = {};\n\n        const emptyTexture2D = new GLTexture(gl.createTexture());\n\n        gl.bindTexture(gl.TEXTURE_2D, emptyTexture2D.texture);\n        gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 1, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE, new Uint8Array(4));\n\n        this.emptyTextures[gl.TEXTURE_2D] = emptyTexture2D;\n        this.emptyTextures[gl.TEXTURE_CUBE_MAP] = new GLTexture(gl.createTexture());\n\n        gl.bindTexture(gl.TEXTURE_CUBE_MAP, this.emptyTextures[gl.TEXTURE_CUBE_MAP].texture);\n\n        for (let i = 0; i < 6; i++)\n        {\n            gl.texImage2D(gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, gl.RGBA, 1, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);\n        }\n\n        gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n        gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n\n        for (let i = 0; i < this.boundTextures.length; i++)\n        {\n            this.bind(null, i);\n        }\n    }\n\n    /**\n     * Bind a texture to a specific location\n     *\n     * If you want to unbind something, please use `unbind(texture)` instead of `bind(null, textureLocation)`\n     *\n     * @param {PIXI.Texture|PIXI.BaseTexture} texture - Texture to bind\n     * @param {number} [location=0] - Location to bind at\n     */\n    bind(texture, location = 0)\n    {\n        const { gl } = this;\n\n        if (texture)\n        {\n            texture = texture.baseTexture || texture;\n\n            if (texture.valid)\n            {\n                texture.touched = this.renderer.textureGC.count;\n\n                const glTexture = texture._glTextures[this.CONTEXT_UID] || this.initTexture(texture);\n\n                if (this.currentLocation !== location)\n                {\n                    this.currentLocation = location;\n                    gl.activeTexture(gl.TEXTURE0 + location);\n                }\n\n                if (this.boundTextures[location] !== texture)\n                {\n                    gl.bindTexture(texture.target, glTexture.texture);\n                }\n\n                if (glTexture.dirtyId !== texture.dirtyId)\n                {\n                    this.updateTexture(texture);\n                }\n\n                this.boundTextures[location] = texture;\n            }\n        }\n        else\n        {\n            if (this.currentLocation !== location)\n            {\n                this.currentLocation = location;\n                gl.activeTexture(gl.TEXTURE0 + location);\n            }\n\n            gl.bindTexture(gl.TEXTURE_2D, this.emptyTextures[gl.TEXTURE_2D].texture);\n            this.boundTextures[location] = null;\n        }\n    }\n\n    /**\n     * Resets texture location and bound textures\n     *\n     * Actual `bind(null, i)` calls will be performed at next `unbind()` call\n     */\n    reset()\n    {\n        this._unknownBoundTextures = true;\n        this.currentLocation = -1;\n\n        for (let i = 0; i < this.boundTextures.length; i++)\n        {\n            this.boundTextures[i] = this.unknownTexture;\n        }\n    }\n\n    /**\n     * Unbind a texture\n     * @param {PIXI.Texture|PIXI.BaseTexture} texture - Texture to bind\n     */\n    unbind(texture)\n    {\n        const { gl, boundTextures } = this;\n\n        if (this._unknownBoundTextures)\n        {\n            this._unknownBoundTextures = false;\n            // someone changed webGL state,\n            // we have to be sure that our texture does not appear in multi-texture renderer samplers\n            for (let i = 0; i < boundTextures.length; i++)\n            {\n                if (boundTextures[i] === this.unknownTexture)\n                {\n                    this.bind(null, i);\n                }\n            }\n        }\n\n        for (let i = 0; i < boundTextures.length; i++)\n        {\n            if (boundTextures[i] === texture)\n            {\n                if (this.currentLocation !== i)\n                {\n                    gl.activeTexture(gl.TEXTURE0 + i);\n                    this.currentLocation = i;\n                }\n\n                gl.bindTexture(gl.TEXTURE_2D, this.emptyTextures[texture.target].texture);\n                boundTextures[i] = null;\n            }\n        }\n    }\n\n    /**\n     * Initialize a texture\n     *\n     * @private\n     * @param {PIXI.BaseTexture} texture - Texture to initialize\n     */\n    initTexture(texture)\n    {\n        const glTexture = new GLTexture(this.gl.createTexture());\n\n        // guarantee an update..\n        glTexture.dirtyId = -1;\n\n        texture._glTextures[this.CONTEXT_UID] = glTexture;\n\n        this.managedTextures.push(texture);\n        texture.on('dispose', this.destroyTexture, this);\n\n        return glTexture;\n    }\n\n    initTextureType(texture, glTexture)\n    {\n        glTexture.internalFormat = texture.format;\n        glTexture.type = texture.type;\n        if (this.webGLVersion !== 2)\n        {\n            return;\n        }\n        const gl = this.renderer.gl;\n\n        if (texture.type === gl.FLOAT\n            && texture.format === gl.RGBA)\n        {\n            glTexture.internalFormat = gl.RGBA32F;\n        }\n        // that's WebGL1 HALF_FLOAT_OES\n        // we have to convert it to WebGL HALF_FLOAT\n        if (texture.type === TYPES.HALF_FLOAT)\n        {\n            glTexture.type = gl.HALF_FLOAT;\n        }\n        if (glTexture.type === gl.HALF_FLOAT\n            && texture.format === gl.RGBA)\n        {\n            glTexture.internalFormat = gl.RGBA16F;\n        }\n    }\n\n    /**\n     * Update a texture\n     *\n     * @private\n     * @param {PIXI.BaseTexture} texture - Texture to initialize\n     */\n    updateTexture(texture)\n    {\n        const glTexture = texture._glTextures[this.CONTEXT_UID];\n\n        if (!glTexture)\n        {\n            return;\n        }\n\n        const renderer = this.renderer;\n\n        this.initTextureType(texture, glTexture);\n\n        if (texture.resource && texture.resource.upload(renderer, texture, glTexture))\n        {\n            // texture is uploaded, dont do anything!\n        }\n        else\n        {\n            // default, renderTexture-like logic\n            const width = texture.realWidth;\n            const height = texture.realHeight;\n            const gl = renderer.gl;\n\n            if (glTexture.width !== width\n                || glTexture.height !== height\n                || glTexture.dirtyId < 0)\n            {\n                glTexture.width = width;\n                glTexture.height = height;\n\n                gl.texImage2D(texture.target, 0,\n                    glTexture.internalFormat,\n                    width,\n                    height,\n                    0,\n                    texture.format,\n                    glTexture.type,\n                    null);\n            }\n        }\n\n        // lets only update what changes..\n        if (texture.dirtyStyleId !== glTexture.dirtyStyleId)\n        {\n            this.updateTextureStyle(texture);\n        }\n        glTexture.dirtyId = texture.dirtyId;\n    }\n\n    /**\n     * Deletes the texture from WebGL\n     *\n     * @private\n     * @param {PIXI.BaseTexture|PIXI.Texture} texture - the texture to destroy\n     * @param {boolean} [skipRemove=false] - Whether to skip removing the texture from the TextureManager.\n     */\n    destroyTexture(texture, skipRemove)\n    {\n        const { gl } = this;\n\n        texture = texture.baseTexture || texture;\n\n        if (texture._glTextures[this.CONTEXT_UID])\n        {\n            this.unbind(texture);\n\n            gl.deleteTexture(texture._glTextures[this.CONTEXT_UID].texture);\n            texture.off('dispose', this.destroyTexture, this);\n\n            delete texture._glTextures[this.CONTEXT_UID];\n\n            if (!skipRemove)\n            {\n                const i = this.managedTextures.indexOf(texture);\n\n                if (i !== -1)\n                {\n                    removeItems(this.managedTextures, i, 1);\n                }\n            }\n        }\n    }\n\n    /**\n     * Update texture style such as mipmap flag\n     *\n     * @private\n     * @param {PIXI.BaseTexture} texture - Texture to update\n     */\n    updateTextureStyle(texture)\n    {\n        const glTexture = texture._glTextures[this.CONTEXT_UID];\n\n        if (!glTexture)\n        {\n            return;\n        }\n\n        if ((texture.mipmap === MIPMAP_MODES.POW2 || this.webGLVersion !== 2) && !texture.isPowerOfTwo)\n        {\n            glTexture.mipmap = 0;\n            glTexture.wrapMode = WRAP_MODES.CLAMP;\n        }\n        else\n        {\n            glTexture.mipmap = texture.mipmap >= 1;\n            glTexture.wrapMode = texture.wrapMode;\n        }\n\n        if (texture.resource && texture.resource.style(this.renderer, texture, glTexture))\n        {\n            // style is set, dont do anything!\n        }\n        else\n        {\n            this.setStyle(texture, glTexture);\n        }\n\n        glTexture.dirtyStyleId = texture.dirtyStyleId;\n    }\n\n    /**\n     * Set style for texture\n     *\n     * @private\n     * @param {PIXI.BaseTexture} texture - Texture to update\n     * @param {PIXI.GLTexture} glTexture\n     */\n    setStyle(texture, glTexture)\n    {\n        const gl = this.gl;\n\n        if (glTexture.mipmap)\n        {\n            gl.generateMipmap(texture.target);\n        }\n\n        gl.texParameteri(texture.target, gl.TEXTURE_WRAP_S, glTexture.wrapMode);\n        gl.texParameteri(texture.target, gl.TEXTURE_WRAP_T, glTexture.wrapMode);\n\n        if (glTexture.mipmap)\n        {\n            /* eslint-disable max-len */\n            gl.texParameteri(texture.target, gl.TEXTURE_MIN_FILTER, texture.scaleMode ? gl.LINEAR_MIPMAP_LINEAR : gl.NEAREST_MIPMAP_NEAREST);\n            /* eslint-disable max-len */\n\n            const anisotropicExt = this.renderer.context.extensions.anisotropicFiltering;\n\n            if (anisotropicExt && texture.anisotropicLevel > 0 && texture.scaleMode === SCALE_MODES.LINEAR)\n            {\n                const level = Math.min(texture.anisotropicLevel, gl.getParameter(anisotropicExt.MAX_TEXTURE_MAX_ANISOTROPY_EXT));\n\n                gl.texParameterf(texture.target, anisotropicExt.TEXTURE_MAX_ANISOTROPY_EXT, level);\n            }\n        }\n        else\n        {\n            gl.texParameteri(texture.target, gl.TEXTURE_MIN_FILTER, texture.scaleMode ? gl.LINEAR : gl.NEAREST);\n        }\n\n        gl.texParameteri(texture.target, gl.TEXTURE_MAG_FILTER, texture.scaleMode ? gl.LINEAR : gl.NEAREST);\n    }\n}\n","import { hex2string, hex2rgb, deprecation, EventEmitter } from '@pixi/utils';\nimport { Matrix, Rectangle } from '@pixi/math';\nimport { RENDERER_TYPE } from '@pixi/constants';\nimport { settings } from '@pixi/settings';\nimport { Container } from '@pixi/display';\nimport RenderTexture from './renderTexture/RenderTexture';\n\nconst tempMatrix = new Matrix();\n\n/**\n * The AbstractRenderer is the base for a PixiJS Renderer. It is extended by the {@link PIXI.CanvasRenderer}\n * and {@link PIXI.Renderer} which can be used for rendering a PixiJS scene.\n *\n * @abstract\n * @class\n * @extends PIXI.utils.EventEmitter\n * @memberof PIXI\n */\nexport default class AbstractRenderer extends EventEmitter\n{\n    /**\n     * @param {string} system - The name of the system this renderer is for.\n     * @param {object} [options] - The optional renderer parameters.\n     * @param {number} [options.width=800] - The width of the screen.\n     * @param {number} [options.height=600] - The height of the screen.\n     * @param {HTMLCanvasElement} [options.view] - The canvas to use as a view, optional.\n     * @param {boolean} [options.transparent=false] - If the render view is transparent.\n     * @param {boolean} [options.autoDensity=false] - Resizes renderer view in CSS pixels to allow for\n     *   resolutions other than 1.\n     * @param {boolean} [options.antialias=false] - Sets antialias\n     * @param {number} [options.resolution=1] - The resolution / device pixel ratio of the renderer. The\n     *  resolution of the renderer retina would be 2.\n     * @param {boolean} [options.preserveDrawingBuffer=false] - Enables drawing buffer preservation,\n     *  enable this if you need to call toDataUrl on the WebGL context.\n     * @param {boolean} [options.clearBeforeRender=true] - This sets if the renderer will clear the canvas or\n     *      not before the new render pass.\n     * @param {number} [options.backgroundColor=0x000000] - The background color of the rendered area\n     *  (shown if not transparent).\n     */\n    constructor(system, options)\n    {\n        super();\n\n        // Add the default render options\n        options = Object.assign({}, settings.RENDER_OPTIONS, options);\n\n        // Deprecation notice for renderer roundPixels option\n        if (options.roundPixels)\n        {\n            settings.ROUND_PIXELS = options.roundPixels;\n            deprecation('5.0.0', 'Renderer roundPixels option is deprecated, please use PIXI.settings.ROUND_PIXELS', 2);\n        }\n\n        /**\n         * The supplied constructor options.\n         *\n         * @member {Object}\n         * @readOnly\n         */\n        this.options = options;\n\n        /**\n         * The type of the renderer.\n         *\n         * @member {number}\n         * @default PIXI.RENDERER_TYPE.UNKNOWN\n         * @see PIXI.RENDERER_TYPE\n         */\n        this.type = RENDERER_TYPE.UNKNOWN;\n\n        /**\n         * Measurements of the screen. (0, 0, screenWidth, screenHeight).\n         *\n         * Its safe to use as filterArea or hitArea for the whole stage.\n         *\n         * @member {PIXI.Rectangle}\n         */\n        this.screen = new Rectangle(0, 0, options.width, options.height);\n\n        /**\n         * The canvas element that everything is drawn to.\n         *\n         * @member {HTMLCanvasElement}\n         */\n        this.view = options.view || document.createElement('canvas');\n\n        /**\n         * The resolution / device pixel ratio of the renderer.\n         *\n         * @member {number}\n         * @default 1\n         */\n        this.resolution = options.resolution || settings.RESOLUTION;\n\n        /**\n         * Whether the render view is transparent.\n         *\n         * @member {boolean}\n         */\n        this.transparent = options.transparent;\n\n        /**\n         * Whether CSS dimensions of canvas view should be resized to screen dimensions automatically.\n         *\n         * @member {boolean}\n         */\n        this.autoDensity = options.autoDensity || options.autoResize || false;\n        // autoResize is deprecated, provides fallback support\n\n        /**\n         * The value of the preserveDrawingBuffer flag affects whether or not the contents of\n         * the stencil buffer is retained after rendering.\n         *\n         * @member {boolean}\n         */\n        this.preserveDrawingBuffer = options.preserveDrawingBuffer;\n\n        /**\n         * This sets if the CanvasRenderer will clear the canvas or not before the new render pass.\n         * If the scene is NOT transparent PixiJS will use a canvas sized fillRect operation every\n         * frame to set the canvas background color. If the scene is transparent PixiJS will use clearRect\n         * to clear the canvas every frame. Disable this by setting this to false. For example, if\n         * your game has a canvas filling background image you often don't need this set.\n         *\n         * @member {boolean}\n         * @default\n         */\n        this.clearBeforeRender = options.clearBeforeRender;\n\n        /**\n         * The background color as a number.\n         *\n         * @member {number}\n         * @protected\n         */\n        this._backgroundColor = 0x000000;\n\n        /**\n         * The background color as an [R, G, B] array.\n         *\n         * @member {number[]}\n         * @protected\n         */\n        this._backgroundColorRgba = [0, 0, 0, 0];\n\n        /**\n         * The background color as a string.\n         *\n         * @member {string}\n         * @protected\n         */\n        this._backgroundColorString = '#000000';\n\n        this.backgroundColor = options.backgroundColor || this._backgroundColor; // run bg color setter\n\n        /**\n         * This temporary display object used as the parent of the currently being rendered item.\n         *\n         * @member {PIXI.DisplayObject}\n         * @protected\n         */\n        this._tempDisplayObjectParent = new Container();\n\n        /**\n         * The last root object that the renderer tried to render.\n         *\n         * @member {PIXI.DisplayObject}\n         * @protected\n         */\n        this._lastObjectRendered = this._tempDisplayObjectParent;\n\n        /**\n         * Collection of plugins.\n         * @readonly\n         * @member {object}\n         */\n        this.plugins = {};\n    }\n\n    /**\n     * Initialize the plugins.\n     *\n     * @protected\n     * @param {object} staticMap - The dictionary of statically saved plugins.\n     */\n    initPlugins(staticMap)\n    {\n        for (const o in staticMap)\n        {\n            this.plugins[o] = new (staticMap[o])(this);\n        }\n    }\n\n    /**\n     * Same as view.width, actual number of pixels in the canvas by horizontal.\n     *\n     * @member {number}\n     * @readonly\n     * @default 800\n     */\n    get width()\n    {\n        return this.view.width;\n    }\n\n    /**\n     * Same as view.height, actual number of pixels in the canvas by vertical.\n     *\n     * @member {number}\n     * @readonly\n     * @default 600\n     */\n    get height()\n    {\n        return this.view.height;\n    }\n\n    /**\n     * Resizes the screen and canvas to the specified width and height.\n     * Canvas dimensions are multiplied by resolution.\n     *\n     * @param {number} screenWidth - The new width of the screen.\n     * @param {number} screenHeight - The new height of the screen.\n     */\n    resize(screenWidth, screenHeight)\n    {\n        this.screen.width = screenWidth;\n        this.screen.height = screenHeight;\n\n        this.view.width = screenWidth * this.resolution;\n        this.view.height = screenHeight * this.resolution;\n\n        if (this.autoDensity)\n        {\n            this.view.style.width = `${screenWidth}px`;\n            this.view.style.height = `${screenHeight}px`;\n        }\n    }\n\n    /**\n     * Useful function that returns a texture of the display object that can then be used to create sprites\n     * This can be quite useful if your displayObject is complicated and needs to be reused multiple times.\n     *\n     * @param {PIXI.DisplayObject} displayObject - The displayObject the object will be generated from.\n     * @param {number} scaleMode - Should be one of the scaleMode consts.\n     * @param {number} resolution - The resolution / device pixel ratio of the texture being generated.\n     * @param {PIXI.Rectangle} [region] - The region of the displayObject, that shall be rendered,\n     *        if no region is specified, defaults to the local bounds of the displayObject.\n     * @return {PIXI.RenderTexture} A texture of the graphics object.\n     */\n    generateTexture(displayObject, scaleMode, resolution, region)\n    {\n        region = region || displayObject.getLocalBounds();\n\n        // minimum texture size is 1x1, 0x0 will throw an error\n        if (region.width === 0) region.width = 1;\n        if (region.height === 0) region.height = 1;\n\n        const renderTexture = RenderTexture.create(region.width | 0, region.height | 0, scaleMode, resolution);\n\n        tempMatrix.tx = -region.x;\n        tempMatrix.ty = -region.y;\n\n        this.render(displayObject, renderTexture, false, tempMatrix, !!displayObject.parent);\n\n        return renderTexture;\n    }\n\n    /**\n     * Removes everything from the renderer and optionally removes the Canvas DOM element.\n     *\n     * @param {boolean} [removeView=false] - Removes the Canvas element from the DOM.\n     */\n    destroy(removeView)\n    {\n        for (const o in this.plugins)\n        {\n            this.plugins[o].destroy();\n            this.plugins[o] = null;\n        }\n\n        if (removeView && this.view.parentNode)\n        {\n            this.view.parentNode.removeChild(this.view);\n        }\n\n        this.plugins = null;\n\n        this.type = RENDERER_TYPE.UNKNOWN;\n\n        this.view = null;\n\n        this.screen = null;\n\n        this.resolution = 0;\n\n        this.transparent = false;\n\n        this.autoDensity = false;\n\n        this.blendModes = null;\n\n        this.options = null;\n\n        this.preserveDrawingBuffer = false;\n        this.clearBeforeRender = false;\n\n        this._backgroundColor = 0;\n        this._backgroundColorRgba = null;\n        this._backgroundColorString = null;\n\n        this._tempDisplayObjectParent = null;\n        this._lastObjectRendered = null;\n    }\n\n    /**\n     * The background color to fill if not transparent\n     *\n     * @member {number}\n     */\n    get backgroundColor()\n    {\n        return this._backgroundColor;\n    }\n\n    set backgroundColor(value) // eslint-disable-line require-jsdoc\n    {\n        this._backgroundColor = value;\n        this._backgroundColorString = hex2string(value);\n        hex2rgb(value, this._backgroundColorRgba);\n    }\n}\n","import AbstractRenderer from './AbstractRenderer';\nimport { sayHello, isWebGLSupported } from '@pixi/utils';\nimport MaskSystem from './mask/MaskSystem';\nimport StencilSystem from './mask/StencilSystem';\nimport FilterSystem from './filters/FilterSystem';\nimport FramebufferSystem from './framebuffer/FramebufferSystem';\nimport RenderTextureSystem from './renderTexture/RenderTextureSystem';\nimport TextureSystem from './textures/TextureSystem';\nimport ProjectionSystem from './projection/ProjectionSystem';\nimport StateSystem from './state/StateSystem';\nimport GeometrySystem from './geometry/GeometrySystem';\nimport ShaderSystem from './shader/ShaderSystem';\nimport ContextSystem from './context/ContextSystem';\nimport BatchSystem from './batch/BatchSystem';\nimport TextureGCSystem from './textures/TextureGCSystem';\nimport { RENDERER_TYPE } from '@pixi/constants';\nimport UniformGroup from './shader/UniformGroup';\nimport { Matrix } from '@pixi/math';\nimport { Runner } from '@pixi/runner';\n\n/**\n * The Renderer draws the scene and all its content onto a WebGL enabled canvas.\n *\n * This renderer should be used for browsers that support WebGL.\n *\n * This renderer works by automatically managing WebGLBatchesm, so no need for Sprite Batches or Sprite Clouds.\n * Don't forget to add the view to your DOM or you will not see anything!\n *\n * @class\n * @memberof PIXI\n * @extends PIXI.AbstractRenderer\n */\nexport default class Renderer extends AbstractRenderer\n{\n    /**\n     * Create renderer if WebGL is available. Overrideable\n     * by the **@pixi/canvas-renderer** package to allow fallback.\n     * throws error if WebGL is not available.\n     * @static\n     * @private\n     */\n    static create(options)\n    {\n        if (isWebGLSupported())\n        {\n            return new Renderer(options);\n        }\n\n        throw new Error('WebGL unsupported in this browser, use \"pixi.js-legacy\" for fallback canvas2d support.');\n    }\n\n    /**\n     * @param {object} [options] - The optional renderer parameters.\n     * @param {number} [options.width=800] - The width of the screen.\n     * @param {number} [options.height=600] - The height of the screen.\n     * @param {HTMLCanvasElement} [options.view] - The canvas to use as a view, optional.\n     * @param {boolean} [options.transparent=false] - If the render view is transparent.\n     * @param {boolean} [options.autoDensity=false] - Resizes renderer view in CSS pixels to allow for\n     *   resolutions other than 1.\n     * @param {boolean} [options.antialias=false] - Sets antialias. If not available natively then FXAA\n     *  antialiasing is used.\n     * @param {boolean} [options.forceFXAA=false] - Forces FXAA antialiasing to be used over native.\n     *  FXAA is faster, but may not always look as great.\n     * @param {number} [options.resolution=1] - The resolution / device pixel ratio of the renderer.\n     *  The resolution of the renderer retina would be 2.\n     * @param {boolean} [options.clearBeforeRender=true] - This sets if the renderer will clear\n     *  the canvas or not before the new render pass. If you wish to set this to false, you *must* set\n     *  preserveDrawingBuffer to `true`.\n     * @param {boolean} [options.preserveDrawingBuffer=false] - Enables drawing buffer preservation,\n     *  enable this if you need to call toDataUrl on the WebGL context.\n     * @param {number} [options.backgroundColor=0x000000] - The background color of the rendered area\n     *  (shown if not transparent).\n     * @param {string} [options.powerPreference] - Parameter passed to WebGL context, set to \"high-performance\"\n     *  for devices with dual graphics card.\n     * @param {object} [options.context] If WebGL context already exists, all parameters must be taken from it.\n     */\n    constructor(options = {})\n    {\n        super('WebGL', options);\n\n        // the options will have been modified here in the super constructor with pixi's default settings..\n        options = this.options;\n\n        /**\n         * The type of this renderer as a standardized const\n         *\n         * @member {number}\n         * @see PIXI.RENDERER_TYPE\n         */\n        this.type = RENDERER_TYPE.WEBGL;\n\n        /**\n         * WebGL context, set by the contextSystem (this.context)\n         *\n         * @readonly\n         * @member {WebGLRenderingContext}\n         */\n        this.gl = null;\n\n        this.CONTEXT_UID = 0;\n\n        // TODO legacy!\n\n        /**\n         * Internal signal instances of **runner**, these\n         * are assigned to each system created.\n         * @see PIXI.Runner\n         * @name PIXI.Renderer#runners\n         * @private\n         * @type {object}\n         * @readonly\n         * @property {PIXI.Runner} destroy - Destroy runner\n         * @property {PIXI.Runner} contextChange - Context change runner\n         * @property {PIXI.Runner} reset - Reset runner\n         * @property {PIXI.Runner} update - Update runner\n         * @property {PIXI.Runner} postrender - Post-render runner\n         * @property {PIXI.Runner} prerender - Pre-render runner\n         * @property {PIXI.Runner} resize - Resize runner\n         */\n        this.runners = {\n            destroy: new Runner('destroy'),\n            contextChange: new Runner('contextChange', 1),\n            reset: new Runner('reset'),\n            update: new Runner('update'),\n            postrender: new Runner('postrender'),\n            prerender: new Runner('prerender'),\n            resize: new Runner('resize', 2),\n        };\n\n        /**\n         * Global uniforms\n         * @member {PIXI.UniformGroup}\n         */\n        this.globalUniforms = new UniformGroup({\n            projectionMatrix: new Matrix(),\n        }, true);\n\n        /**\n         * Mask system instance\n         * @member {PIXI.systems.MaskSystem} mask\n         * @memberof PIXI.Renderer#\n         * @readonly\n         */\n        this.addSystem(MaskSystem, 'mask')\n            /**\n             * Context system instance\n             * @member {PIXI.systems.ContextSystem} context\n             * @memberof PIXI.Renderer#\n             * @readonly\n             */\n            .addSystem(ContextSystem, 'context')\n            /**\n             * State system instance\n             * @member {PIXI.systems.StateSystem} state\n             * @memberof PIXI.Renderer#\n             * @readonly\n             */\n            .addSystem(StateSystem, 'state')\n            /**\n             * Shader system instance\n             * @member {PIXI.systems.ShaderSystem} shader\n             * @memberof PIXI.Renderer#\n             * @readonly\n             */\n            .addSystem(ShaderSystem, 'shader')\n            /**\n             * Texture system instance\n             * @member {PIXI.systems.TextureSystem} texture\n             * @memberof PIXI.Renderer#\n             * @readonly\n             */\n            .addSystem(TextureSystem, 'texture')\n            /**\n             * Geometry system instance\n             * @member {PIXI.systems.GeometrySystem} geometry\n             * @memberof PIXI.Renderer#\n             * @readonly\n             */\n            .addSystem(GeometrySystem, 'geometry')\n            /**\n             * Framebuffer system instance\n             * @member {PIXI.systems.FramebufferSystem} framebuffer\n             * @memberof PIXI.Renderer#\n             * @readonly\n             */\n            .addSystem(FramebufferSystem, 'framebuffer')\n            /**\n             * Stencil system instance\n             * @member {PIXI.systems.StencilSystem} stencil\n             * @memberof PIXI.Renderer#\n             * @readonly\n             */\n            .addSystem(StencilSystem, 'stencil')\n            /**\n             * Projection system instance\n             * @member {PIXI.systems.ProjectionSystem} projection\n             * @memberof PIXI.Renderer#\n             * @readonly\n             */\n            .addSystem(ProjectionSystem, 'projection')\n            /**\n             * Texture garbage collector system instance\n             * @member {PIXI.systems.TextureGCSystem} textureGC\n             * @memberof PIXI.Renderer#\n             * @readonly\n             */\n            .addSystem(TextureGCSystem, 'textureGC')\n            /**\n             * Filter system instance\n             * @member {PIXI.systems.FilterSystem} filter\n             * @memberof PIXI.Renderer#\n             * @readonly\n             */\n            .addSystem(FilterSystem, 'filter')\n            /**\n             * RenderTexture system instance\n             * @member {PIXI.systems.RenderTextureSystem} renderTexture\n             * @memberof PIXI.Renderer#\n             * @readonly\n             */\n            .addSystem(RenderTextureSystem, 'renderTexture')\n\n            /**\n             * Batch system instance\n             * @member {PIXI.systems.BatchSystem} batch\n             * @memberof PIXI.Renderer#\n             * @readonly\n             */\n            .addSystem(BatchSystem, 'batch');\n\n        this.initPlugins(Renderer.__plugins);\n\n        /**\n         * The options passed in to create a new WebGL context.\n         */\n        if (options.context)\n        {\n            this.context.initFromContext(options.context);\n        }\n        else\n        {\n            this.context.initFromOptions({\n                alpha: this.transparent,\n                antialias: options.antialias,\n                premultipliedAlpha: this.transparent && this.transparent !== 'notMultiplied',\n                stencil: true,\n                preserveDrawingBuffer: options.preserveDrawingBuffer,\n                powerPreference: this.options.powerPreference,\n            });\n        }\n\n        /**\n         * Flag if we are rendering to the screen vs renderTexture\n         * @member {boolean}\n         * @readonly\n         * @default true\n         */\n        this.renderingToScreen = true;\n\n        sayHello(this.context.webGLVersion === 2 ? 'WebGL 2' : 'WebGL 1');\n\n        this.resize(this.options.width, this.options.height);\n    }\n\n    /**\n     * Add a new system to the renderer.\n     * @param {Function} ClassRef - Class reference\n     * @param {string} [name] - Property name for system, if not specified\n     *        will use a static `name` property on the class itself. This\n     *        name will be assigned as s property on the Renderer so make\n     *        sure it doesn't collide with properties on Renderer.\n     * @return {PIXI.Renderer} Return instance of renderer\n     */\n    addSystem(ClassRef, name)\n    {\n        if (!name)\n        {\n            name = ClassRef.name;\n        }\n\n        const system = new ClassRef(this);\n\n        if (this[name])\n        {\n            throw new Error(`Whoops! The name \"${name}\" is already in use`);\n        }\n\n        this[name] = system;\n\n        for (const i in this.runners)\n        {\n            this.runners[i].add(system);\n        }\n\n        /**\n         * Fired after rendering finishes.\n         *\n         * @event PIXI.Renderer#postrender\n         */\n\n        /**\n         * Fired before rendering starts.\n         *\n         * @event PIXI.Renderer#prerender\n         */\n\n        /**\n         * Fired when the WebGL context is set.\n         *\n         * @event PIXI.Renderer#context\n         * @param {WebGLRenderingContext} gl - WebGL context.\n         */\n\n        return this;\n    }\n\n    /**\n     * Renders the object to its WebGL view\n     *\n     * @param {PIXI.DisplayObject} displayObject - The object to be rendered.\n     * @param {PIXI.RenderTexture} [renderTexture] - The render texture to render to.\n     * @param {boolean} [clear=true] - Should the canvas be cleared before the new render.\n     * @param {PIXI.Matrix} [transform] - A transform to apply to the render texture before rendering.\n     * @param {boolean} [skipUpdateTransform=false] - Should we skip the update transform pass?\n     */\n    render(displayObject, renderTexture, clear, transform, skipUpdateTransform)\n    {\n        // can be handy to know!\n        this.renderingToScreen = !renderTexture;\n\n        this.runners.prerender.run();\n        this.emit('prerender');\n\n        // apply a transform at a GPU level\n        this.projection.transform = transform;\n\n        // no point rendering if our context has been blown up!\n        if (this.context.isLost)\n        {\n            return;\n        }\n\n        if (!renderTexture)\n        {\n            this._lastObjectRendered = displayObject;\n        }\n\n        if (!skipUpdateTransform)\n        {\n            // update the scene graph\n            const cacheParent = displayObject.parent;\n\n            displayObject.parent = this._tempDisplayObjectParent;\n            displayObject.updateTransform();\n            displayObject.parent = cacheParent;\n            // displayObject.hitArea = //TODO add a temp hit area\n        }\n\n        this.renderTexture.bind(renderTexture);\n        this.batch.currentRenderer.start();\n\n        if (clear !== undefined ? clear : this.clearBeforeRender)\n        {\n            this.renderTexture.clear();\n        }\n\n        displayObject.render(this);\n\n        // apply transform..\n        this.batch.currentRenderer.flush();\n\n        if (renderTexture)\n        {\n            renderTexture.baseTexture.update();\n        }\n\n        this.runners.postrender.run();\n\n        // reset transform after render\n        this.projection.transform = null;\n\n        this.emit('postrender');\n    }\n\n    /**\n     * Resizes the WebGL view to the specified width and height.\n     *\n     * @param {number} screenWidth - The new width of the screen.\n     * @param {number} screenHeight - The new height of the screen.\n     */\n    resize(screenWidth, screenHeight)\n    {\n        super.resize(screenWidth, screenHeight);\n\n        this.runners.resize.run(screenWidth, screenHeight);\n    }\n\n    /**\n     * Resets the WebGL state so you can render things however you fancy!\n     *\n     * @return {PIXI.Renderer} Returns itself.\n     */\n    reset()\n    {\n        this.runners.reset.run();\n\n        return this;\n    }\n\n    /**\n     * Clear the frame buffer\n     */\n    clear()\n    {\n        this.framebuffer.bind();\n        this.framebuffer.clear();\n    }\n\n    /**\n     * Removes everything from the renderer (event listeners, spritebatch, etc...)\n     *\n     * @param {boolean} [removeView=false] - Removes the Canvas element from the DOM.\n     *  See: https://github.com/pixijs/pixi.js/issues/2233\n     */\n    destroy(removeView)\n    {\n        this.runners.destroy.run();\n\n        for (const r in this.runners)\n        {\n            this.runners[r].destroy();\n        }\n\n        // call base destroy\n        super.destroy(removeView);\n\n        // TODO nullify all the managers..\n        this.gl = null;\n    }\n\n    /**\n     * Collection of installed plugins. These are included by default in PIXI, but can be excluded\n     * by creating a custom build. Consult the README for more information about creating custom\n     * builds and excluding plugins.\n     * @name PIXI.Renderer#plugins\n     * @type {object}\n     * @readonly\n     * @property {PIXI.accessibility.AccessibilityManager} accessibility Support tabbing interactive elements.\n     * @property {PIXI.extract.Extract} extract Extract image data from renderer.\n     * @property {PIXI.interaction.InteractionManager} interaction Handles mouse, touch and pointer events.\n     * @property {PIXI.prepare.Prepare} prepare Pre-render display objects.\n     */\n\n    /**\n     * Adds a plugin to the renderer.\n     *\n     * @method\n     * @param {string} pluginName - The name of the plugin.\n     * @param {Function} ctor - The constructor function or class for the plugin.\n     */\n    static registerPlugin(pluginName, ctor)\n    {\n        Renderer.__plugins = Renderer.__plugins || {};\n        Renderer.__plugins[pluginName] = ctor;\n    }\n}\n","import { default as Renderer } from './Renderer';\n\n/**\n * This helper function will automatically detect which renderer you should be using.\n * WebGL is the preferred renderer as it is a lot faster. If WebGL is not supported by\n * the browser then this function will return a canvas renderer\n *\n * @memberof PIXI\n * @function autoDetectRenderer\n * @param {object} [options] - The optional renderer parameters\n * @param {number} [options.width=800] - the width of the renderers view\n * @param {number} [options.height=600] - the height of the renderers view\n * @param {HTMLCanvasElement} [options.view] - the canvas to use as a view, optional\n * @param {boolean} [options.transparent=false] - If the render view is transparent, default false\n * @param {boolean} [options.autoDensity=false] - Resizes renderer view in CSS pixels to allow for\n *   resolutions other than 1\n * @param {boolean} [options.antialias=false] - sets antialias\n * @param {boolean} [options.preserveDrawingBuffer=false] - enables drawing buffer preservation, enable this if you\n *  need to call toDataUrl on the webgl context\n * @param {number} [options.backgroundColor=0x000000] - The background color of the rendered area\n *  (shown if not transparent).\n * @param {boolean} [options.clearBeforeRender=true] - This sets if the renderer will clear the canvas or\n *   not before the new render pass.\n * @param {number} [options.resolution=1] - The resolution / device pixel ratio of the renderer, retina would be 2\n * @param {boolean} [options.forceCanvas=false] - prevents selection of WebGL renderer, even if such is present, this\n *   option only is available when using **pixi.js-legacy** or **@pixi/canvas-renderer** modules, otherwise\n *   it is ignored.\n * @param {boolean} [options.forceFXAA=false] - forces FXAA antialiasing to be used over native.\n *  FXAA is faster, but may not always look as great **webgl only**\n * @param {string} [options.powerPreference] - Parameter passed to webgl context, set to \"high-performance\"\n *  for devices with dual graphics card **webgl only**\n * @return {PIXI.Renderer|PIXI.CanvasRenderer} Returns WebGL renderer if available, otherwise CanvasRenderer\n */\nexport function autoDetectRenderer(options)\n{\n    return Renderer.create(options);\n}\n","import BaseTexture from './BaseTexture';\nimport CubeResource from './resources/CubeResource';\n\n/**\n * A Texture that depends on six other resources.\n *\n * @class\n * @extends PIXI.BaseTexture\n * @memberof PIXI\n */\nexport default class CubeTexture extends BaseTexture\n{\n    /**\n     * Generate a new CubeTexture.\n     * @static\n     * @param {string[]|PIXI.resources.Resource[]} resources - Collection of 6 URLs or resources\n     * @param {object} [options] - Optional options passed to the resources being loaded.\n     *        See {@PIXI.resources.autoDetectResource autoDetectResource} for more info\n     *        on the options available to each resource.\n     * @returns {PIXI.CubeTexture} new cube texture\n     */\n    static from(resources, options)\n    {\n        return new CubeTexture(new CubeResource(resources, options));\n    }\n}\n","/**\n * Used by the batcher to draw batches.\n * Each one of these contains all information required to draw a bound geometry.\n *\n * @class\n * @memberof PIXI\n */\nexport default class BatchDrawCall\n{\n    constructor()\n    {\n        this.textures = [];\n        this.ids = [];\n        this.blend = 0;\n        this.textureCount = 0;\n        this.start = 0;\n        this.size = 0;\n        this.type = 4;\n    }\n}\n","/**\n * Flexible wrapper around `ArrayBuffer` that also provides\n * typed array views on demand.\n *\n * @class\n * @memberof PIXI\n */\nexport default class ViewableBuffer\n{\n    /**\n     * @param {number} size - The size of the buffer in bytes.\n     */\n    constructor(size)\n    {\n        /**\n         * Underlying `ArrayBuffer` that holds all the data\n         * and is of capacity `size`.\n         *\n         * @member {ArrayBuffer}\n         */\n        this.rawBinaryData = new ArrayBuffer(size);\n\n        /**\n         * View on the raw binary data as a `Uint32Array`.\n         *\n         * @member {Uint32Array}\n         */\n        this.uint32View = new Uint32Array(this.rawBinaryData);\n\n        /**\n         * View on the raw binary data as a `Float32Array`.\n         *\n         * @member {Float32Array}\n         */\n        this.float32View = new Float32Array(this.rawBinaryData);\n    }\n\n    /**\n     * View on the raw binary data as a `Int8Array`.\n     *\n     * @member {Int8Array}\n     */\n    get int8View()\n    {\n        if (!this._int8View)\n        {\n            this._int8View = new Int8Array(this.rawBinaryData);\n        }\n\n        return this._int8View;\n    }\n\n    /**\n     * View on the raw binary data as a `Uint8Array`.\n     *\n     * @member {Uint8Array}\n     */\n    get uint8View()\n    {\n        if (!this._uint8View)\n        {\n            this._uint8View = new Uint8Array(this.rawBinaryData);\n        }\n\n        return this._uint8View;\n    }\n\n    /**\n     * View on the raw binary data as a `Int16Array`.\n     *\n     * @member {Int16Array}\n     */\n    get int16View()\n    {\n        if (!this._int16View)\n        {\n            this._int16View = new Int16Array(this.rawBinaryData);\n        }\n\n        return this._int16View;\n    }\n\n    /**\n     * View on the raw binary data as a `Uint16Array`.\n     *\n     * @member {Uint16Array}\n     */\n    get uint16View()\n    {\n        if (!this._uint16View)\n        {\n            this._uint16View = new Uint16Array(this.rawBinaryData);\n        }\n\n        return this._uint16View;\n    }\n\n    /**\n     * View on the raw binary data as a `Int32Array`.\n     *\n     * @member {Int32Array}\n     */\n    get int32View()\n    {\n        if (!this._int32View)\n        {\n            this._int32View = new Int32Array(this.rawBinaryData);\n        }\n\n        return this._int32View;\n    }\n\n    /**\n     * Returns the view of the given type.\n     *\n     * @param {string} type - One of `int8`, `uint8`, `int16`,\n     *    `uint16`, `int32`, `uint32`, and `float32`.\n     * @return {object} typed array of given type\n     */\n    view(type)\n    {\n        return this[`${type}View`];\n    }\n\n    /**\n     * Destroys all buffer references. Do not use after calling\n     * this.\n     */\n    destroy()\n    {\n        this.rawBinaryData = null;\n        this._int8View = null;\n        this._uint8View = null;\n        this._int16View = null;\n        this._uint16View = null;\n        this._int32View = null;\n        this.uint32View = null;\n        this.float32View = null;\n    }\n\n    static sizeOf(type)\n    {\n        switch (type)\n        {\n            case 'int8':\n            case 'uint8':\n                return 1;\n            case 'int16':\n            case 'uint16':\n                return 2;\n            case 'int32':\n            case 'uint32':\n            case 'float32':\n                return 4;\n            default:\n                throw new Error(`${type} isn't a valid view type`);\n        }\n    }\n}\n","import BatchDrawCall from './BatchDrawCall';\nimport BaseTexture from '../textures/BaseTexture';\nimport ObjectRenderer from './ObjectRenderer';\nimport State from '../state/State';\nimport ViewableBuffer from '../geometry/ViewableBuffer';\n\nimport checkMaxIfStatementsInShader from '../shader/utils/checkMaxIfStatementsInShader';\n\nimport { settings } from '@pixi/settings';\nimport { premultiplyBlendMode, premultiplyTint, nextPow2, log2 } from '@pixi/utils';\nimport { ENV } from '@pixi/constants';\n\n/**\n * Renderer dedicated to drawing and batching sprites.\n *\n * This is the default batch renderer. It buffers objects\n * with texture-based geometries and renders them in\n * batches. It uploads multiple textures to the GPU to\n * reduce to the number of draw calls.\n *\n * @class\n * @protected\n * @memberof PIXI\n * @extends PIXI.ObjectRenderer\n */\nexport default class AbstractBatchRenderer extends ObjectRenderer\n{\n    /**\n     * This will hook onto the renderer's `contextChange`\n     * and `prerender` signals.\n     *\n     * @param {PIXI.Renderer} renderer - The renderer this works for.\n     */\n    constructor(renderer)\n    {\n        super(renderer);\n\n        /**\n         * This is used to generate a shader that can\n         * color each vertex based on a `aTextureId`\n         * attribute that points to an texture in `uSampler`.\n         *\n         * This enables the objects with different textures\n         * to be drawn in the same draw call.\n         *\n         * You can customize your shader by creating your\n         * custom shader generator.\n         *\n         * @member {PIXI.BatchShaderGenerator}\n         * @protected\n         */\n        this.shaderGenerator = null;\n\n        /**\n         * The class that represents the geometry of objects\n         * that are going to be batched with this.\n         *\n         * @member {object}\n         * @default PIXI.BatchGeometry\n         * @protected\n         */\n        this.geometryClass = null;\n\n        /**\n         * Size of data being buffered per vertex in the\n         * attribute buffers (in floats). By default, the\n         * batch-renderer plugin uses 6:\n         *\n         * | aVertexPosition | 2 |\n         * |-----------------|---|\n         * | aTextureCoords  | 2 |\n         * | aColor          | 1 |\n         * | aTextureId      | 1 |\n         *\n         * @member {number}\n         * @readonly\n         */\n        this.vertexSize = null;\n\n        /**\n         * The WebGL state in which this renderer will work.\n         *\n         * @member {PIXI.State}\n         * @readonly\n         */\n        this.state = State.for2d();\n\n        /**\n         * The number of bufferable objects before a flush\n         * occurs automatically.\n         *\n         * @member {number}\n         * @default settings.SPRITE_MAX_TEXTURES\n         */\n        this.size = 2000 * 4;// settings.SPRITE_BATCH_SIZE, 2000 is a nice balance between mobile/desktop\n\n        /**\n         * Total count of all vertices used by the currently\n         * buffered objects.\n         *\n         * @member {number}\n         * @private\n         */\n        this._vertexCount = 0;\n\n        /**\n         * Total count of all indices used by the currently\n         * buffered objects.\n         *\n         * @member {number}\n         * @private\n         */\n        this._indexCount = 0;\n\n        /**\n         * Buffer of objects that are yet to be rendered.\n         *\n         * @member {PIXI.DisplayObject[]}\n         * @private\n         */\n        this._bufferedElements = [];\n\n        /**\n         * Number of elements that are buffered and are\n         * waiting to be flushed.\n         *\n         * @member {number}\n         * @private\n         */\n        this._bufferSize = 0;\n\n        /**\n         * This shader is generated by `this.shaderGenerator`.\n         *\n         * It is generated specifically to handle the required\n         * number of textures being batched together.\n         *\n         * @member {PIXI.Shader}\n         * @protected\n         */\n        this._shader = null;\n\n        /**\n         * Pool of `this.geometryClass` geometry objects\n         * that store buffers. They are used to pass data\n         * to the shader on each draw call.\n         *\n         * These are never re-allocated again, unless a\n         * context change occurs; however, the pool may\n         * be expanded if required.\n         *\n         * @member {PIXI.Geometry[]}\n         * @private\n         * @see PIXI.AbstractBatchRenderer.contextChange\n         */\n        this._packedGeometries = [];\n\n        /**\n         * Size of `this._packedGeometries`. It can be expanded\n         * if more than `this._packedGeometryPoolSize` flushes\n         * occur in a single frame.\n         *\n         * @member {number}\n         * @private\n         */\n        this._packedGeometryPoolSize = 2;\n\n        /**\n         * A flush may occur multiple times in a single\n         * frame. On iOS devices or when\n         * `settings.CAN_UPLOAD_SAME_BUFFER` is false, the\n         * batch renderer does not upload data to the same\n         * `WebGLBuffer` for performance reasons.\n         *\n         * This is the index into `packedGeometries` that points to\n         * geometry holding the most recent buffers.\n         *\n         * @member {number}\n         * @private\n         */\n        this._flushId = 0;\n\n        /**\n         * Pool of `BatchDrawCall` objects that `flush` used\n         * to create \"batches\" of the objects being rendered.\n         *\n         * These are never re-allocated again.\n         *\n         * @member BatchDrawCall[]\n         * @private\n         */\n        this._drawCalls = [];\n\n        for (let k = 0; k < this.size / 4; k++)\n        { // initialize the draw-calls pool to max size.\n            this._drawCalls[k] = new BatchDrawCall();\n        }\n\n        /**\n         * Pool of `ViewableBuffer` objects that are sorted in\n         * order of increasing size. The flush method uses\n         * the buffer with the least size above the amount\n         * it requires. These are used for passing attributes.\n         *\n         * The first buffer has a size of 8; each subsequent\n         * buffer has double capacity of its previous.\n         *\n         * @member {PIXI.ViewableBuffer}\n         * @private\n         * @see PIXI.AbstractBatchRenderer#getAttributeBuffer\n         */\n        this._aBuffers = {};\n\n        /**\n         * Pool of `Uint16Array` objects that are sorted in\n         * order of increasing size. The flush method uses\n         * the buffer with the least size above the amount\n         * it requires. These are used for passing indices.\n         *\n         * The first buffer has a size of 12; each subsequent\n         * buffer has double capacity of its previous.\n         *\n         * @member {Uint16Array[]}\n         * @private\n         * @see PIXI.AbstractBatchRenderer#getIndexBuffer\n         */\n        this._iBuffers = {};\n\n        /**\n         * Maximum number of textures that can be uploaded to\n         * the GPU under the current context. It is initialized\n         * properly in `this.contextChange`.\n         *\n         * @member {number}\n         * @see PIXI.AbstractBatchRenderer#contextChange\n         * @readonly\n         */\n        this.MAX_TEXTURES = 1;\n\n        this.renderer.on('prerender', this.onPrerender, this);\n        renderer.runners.contextChange.add(this);\n    }\n\n    /**\n     * Handles the `contextChange` signal.\n     *\n     * It calculates `this.MAX_TEXTURES` and allocating the\n     * packed-geometry object pool.\n     */\n    contextChange()\n    {\n        const gl = this.renderer.gl;\n\n        if (settings.PREFER_ENV === ENV.WEBGL_LEGACY)\n        {\n            this.MAX_TEXTURES = 1;\n        }\n        else\n        {\n            // step 1: first check max textures the GPU can handle.\n            this.MAX_TEXTURES = Math.min(\n                gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS),\n                settings.SPRITE_MAX_TEXTURES);\n\n            // step 2: check the maximum number of if statements the shader can have too..\n            this.MAX_TEXTURES = checkMaxIfStatementsInShader(\n                this.MAX_TEXTURES, gl);\n        }\n\n        this._shader = this.shaderGenerator.generateShader(this.MAX_TEXTURES);\n\n        // we use the second shader as the first one depending on your browser\n        // may omit aTextureId as it is not used by the shader so is optimized out.\n        for (let i = 0; i < this._packedGeometryPoolSize; i++)\n        {\n            /* eslint-disable max-len */\n            this._packedGeometries[i] = new (this.geometryClass)();\n        }\n    }\n\n    /**\n     * Handles the `prerender` signal.\n     *\n     * It ensures that flushes start from the first geometry\n     * object again.\n     */\n    onPrerender()\n    {\n        this._flushId = 0;\n    }\n\n    /**\n     * Buffers the \"batchable\" object. It need not be rendered\n     * immediately.\n     *\n     * @param {PIXI.Sprite} sprite - the sprite to render when\n     *    using this spritebatch\n     */\n    render(element)\n    {\n        if (!element._texture.valid)\n        {\n            return;\n        }\n\n        if (this._vertexCount + (element.vertexData.length / 2) > this.size)\n        {\n            this.flush();\n        }\n\n        this._vertexCount += element.vertexData.length / 2;\n        this._indexCount += element.indices.length;\n        this._bufferedElements[this._bufferSize++] = element;\n    }\n\n    /**\n     * Renders the content _now_ and empties the current batch.\n     */\n    flush()\n    {\n        if (this._vertexCount === 0)\n        {\n            return;\n        }\n\n        const attributeBuffer = this.getAttributeBuffer(this._vertexCount);\n        const indexBuffer = this.getIndexBuffer(this._indexCount);\n        const gl = this.renderer.gl;\n\n        const {\n            _bufferedElements: elements,\n            _drawCalls: drawCalls,\n            MAX_TEXTURES,\n            _packedGeometries: packedGeometries,\n            vertexSize,\n        } = this;\n\n        const touch = this.renderer.textureGC.count;\n\n        let index = 0;\n        let _indexCount = 0;\n\n        let nextTexture;\n        let currentTexture;\n        let textureCount = 0;\n\n        let currentGroup = drawCalls[0];\n        let groupCount = 0;\n\n        let blendMode = -1;// blend-mode of previous element/sprite/object!\n\n        currentGroup.textureCount = 0;\n        currentGroup.start = 0;\n        currentGroup.blend = blendMode;\n\n        let TICK = ++BaseTexture._globalBatch;\n        let i;\n\n        for (i = 0; i < this._bufferSize; ++i)\n        {\n            const sprite = elements[i];\n\n            elements[i] = null;\n            nextTexture = sprite._texture.baseTexture;\n\n            const spriteBlendMode = premultiplyBlendMode[\n                nextTexture.premultiplyAlpha ? 1 : 0][sprite.blendMode];\n\n            if (blendMode !== spriteBlendMode)\n            {\n                blendMode = spriteBlendMode;\n\n                // force the batch to break!\n                currentTexture = null;\n                textureCount = MAX_TEXTURES;\n                TICK++;\n            }\n\n            if (currentTexture !== nextTexture)\n            {\n                currentTexture = nextTexture;\n\n                if (nextTexture._batchEnabled !== TICK)\n                {\n                    if (textureCount === MAX_TEXTURES)\n                    {\n                        TICK++;\n\n                        textureCount = 0;\n\n                        currentGroup.size = _indexCount - currentGroup.start;\n\n                        currentGroup = drawCalls[groupCount++];\n                        currentGroup.textureCount = 0;\n                        currentGroup.blend = blendMode;\n                        currentGroup.start = _indexCount;\n                    }\n\n                    nextTexture.touched = touch;\n                    nextTexture._batchEnabled = TICK;\n                    nextTexture._id = textureCount;\n\n                    currentGroup.textures[currentGroup.textureCount++] = nextTexture;\n                    textureCount++;\n                }\n            }\n\n            this.packInterleavedGeometry(sprite, attributeBuffer,\n                indexBuffer, index, _indexCount);\n\n            // push a graphics..\n            index += (sprite.vertexData.length / 2) * vertexSize;\n            _indexCount += sprite.indices.length;\n        }\n\n        BaseTexture._globalBatch = TICK;\n        currentGroup.size = _indexCount - currentGroup.start;\n\n        if (!settings.CAN_UPLOAD_SAME_BUFFER)\n        { /* Usually on iOS devices, where the browser doesn't\n            like uploads to the same buffer in a single frame. */\n            if (this._packedGeometryPoolSize <= this._flushId)\n            {\n                this._packedGeometryPoolSize++;\n                packedGeometries[this._flushId] = new (this.geometryClass)();\n            }\n\n            packedGeometries[this._flushId]._buffer.update(attributeBuffer.rawBinaryData, 0);\n            packedGeometries[this._flushId]._indexBuffer.update(indexBuffer, 0);\n\n            this.renderer.geometry.bind(packedGeometries[this._flushId]);\n            this.renderer.geometry.updateBuffers();\n            this._flushId++;\n        }\n        else\n        {\n            // lets use the faster option, always use buffer number 0\n            packedGeometries[this._flushId]._buffer.update(attributeBuffer.rawBinaryData, 0);\n            packedGeometries[this._flushId]._indexBuffer.update(indexBuffer, 0);\n\n            this.renderer.geometry.updateBuffers();\n        }\n\n        const textureSystem = this.renderer.texture;\n        const stateSystem = this.renderer.state;\n\n        // Upload textures and do the draw calls\n        for (i = 0; i < groupCount; i++)\n        {\n            const group = drawCalls[i];\n            const groupTextureCount = group.textureCount;\n\n            for (let j = 0; j < groupTextureCount; j++)\n            {\n                textureSystem.bind(group.textures[j], j);\n                group.textures[j] = null;\n            }\n\n            stateSystem.setBlendMode(group.blend);\n            gl.drawElements(group.type, group.size, gl.UNSIGNED_SHORT, group.start * 2);\n        }\n\n        // reset elements for the next flush\n        this._bufferSize = 0;\n        this._vertexCount = 0;\n        this._indexCount = 0;\n    }\n\n    /**\n     * Starts a new sprite batch.\n     */\n    start()\n    {\n        this.renderer.state.set(this.state);\n\n        this.renderer.shader.bind(this._shader);\n\n        if (settings.CAN_UPLOAD_SAME_BUFFER)\n        {\n            // bind buffer #0, we don't need others\n            this.renderer.geometry.bind(this._packedGeometries[this._flushId]);\n        }\n    }\n\n    /**\n     * Stops and flushes the current batch.\n     */\n    stop()\n    {\n        this.flush();\n    }\n\n    /**\n     * Destroys this `AbstractBatchRenderer`. It cannot be used again.\n     */\n    destroy()\n    {\n        for (let i = 0; i < this._packedGeometryPoolSize; i++)\n        {\n            if (this._packedGeometries[i])\n            {\n                this._packedGeometries[i].destroy();\n            }\n        }\n\n        this.renderer.off('prerender', this.onPrerender, this);\n\n        this._aBuffers = null;\n        this._iBuffers = null;\n        this._packedGeometries = null;\n        this._drawCalls = null;\n\n        if (this._shader)\n        {\n            this._shader.destroy();\n            this._shader = null;\n        }\n\n        super.destroy();\n    }\n\n    /**\n     * Fetches an attribute buffer from `this._aBuffers` that\n     * can hold atleast `size` floats.\n     *\n     * @param {number} size - minimum capacity required\n     * @return {ViewableBuffer} - buffer than can hold atleast `size` floats\n     * @private\n     */\n    getAttributeBuffer(size)\n    {\n        // 8 vertices is enough for 2 quads\n        const roundedP2 = nextPow2(Math.ceil(size / 8));\n        const roundedSizeIndex = log2(roundedP2);\n        const roundedSize = roundedP2 * 8;\n\n        if (this._aBuffers.length <= roundedSizeIndex)\n        {\n            this._iBuffers.length = roundedSizeIndex + 1;\n        }\n\n        let buffer = this._aBuffers[roundedSize];\n\n        if (!buffer)\n        {\n            this._aBuffers[roundedSize] = buffer = new ViewableBuffer(roundedSize * this.vertexSize * 4);\n        }\n\n        return buffer;\n    }\n\n    /**\n     * Fetches an index buffer from `this._iBuffers` that can\n     * has atleast `size` capacity.\n     *\n     * @param {number} size - minimum required capacity\n     * @return {Uint16Array} - buffer that can fit `size`\n     *    indices.\n     * @private\n     */\n    getIndexBuffer(size)\n    {\n        // 12 indices is enough for 2 quads\n        const roundedP2 = nextPow2(Math.ceil(size / 12));\n        const roundedSizeIndex = log2(roundedP2);\n        const roundedSize = roundedP2 * 12;\n\n        if (this._iBuffers.length <= roundedSizeIndex)\n        {\n            this._iBuffers.length = roundedSizeIndex + 1;\n        }\n\n        let buffer = this._iBuffers[roundedSizeIndex];\n\n        if (!buffer)\n        {\n            this._iBuffers[roundedSizeIndex] = buffer = new Uint16Array(roundedSize);\n        }\n\n        return buffer;\n    }\n\n    /**\n     * Takes the four batching parameters of `element`, interleaves\n     * and pushes them into the batching attribute/index buffers given.\n     *\n     * It uses these properties: `vertexData` `uvs`, `textureId` and\n     * `indicies`. It also uses the \"tint\" of the base-texture, if\n     * present.\n     *\n     * @param {PIXI.Sprite} element - element being rendered\n     * @param {PIXI.ViewableBuffer} attributeBuffer - attribute buffer.\n     * @param {Uint16Array} indexBuffer - index buffer\n     * @param {number} aIndex - number of floats already in the attribute buffer\n     * @param {number} iIndex - number of indices already in `indexBuffer`\n     */\n    packInterleavedGeometry(element, attributeBuffer, indexBuffer, aIndex, iIndex)\n    {\n        const {\n            uint32View,\n            float32View,\n        } = attributeBuffer;\n\n        const packedVertices = aIndex / this.vertexSize;\n        const uvs = element.uvs;\n        const indicies = element.indices;\n        const vertexData = element.vertexData;\n        const textureId = element._texture.baseTexture._id;\n\n        const alpha = Math.min(element.worldAlpha, 1.0);\n        const argb = (alpha < 1.0\n          && element._texture.baseTexture.premultiplyAlpha)\n            ? premultiplyTint(element._tintRGB, alpha)\n            : element._tintRGB + (alpha * 255 << 24);\n\n        // lets not worry about tint! for now..\n        for (let i = 0; i < vertexData.length; i += 2)\n        {\n            float32View[aIndex++] = vertexData[i];\n            float32View[aIndex++] = vertexData[i + 1];\n            float32View[aIndex++] = uvs[i];\n            float32View[aIndex++] = uvs[i + 1];\n            uint32View[aIndex++] = argb;\n            float32View[aIndex++] = textureId;\n        }\n\n        for (let i = 0; i < indicies.length; i++)\n        {\n            indexBuffer[iIndex++] = packedVertices + indicies[i];\n        }\n    }\n}\n","import Shader from '../shader/Shader';\nimport Program from '../shader/Program';\nimport UniformGroup from '../shader/UniformGroup';\nimport { Matrix } from '@pixi/math';\n\n/**\n * Helper that generates batching multi-texture shader. Use it with your new BatchRenderer\n *\n * @class\n * @memberof PIXI\n */\nexport default class BatchShaderGenerator\n{\n    /**\n     * @param {string} vertexSrc - Vertex shader\n     * @param {string} fragTemplate - Fragment shader template\n     */\n    constructor(vertexSrc, fragTemplate)\n    {\n        /**\n         * Reference to the vertex shader source.\n         *\n         * @member {string}\n         */\n        this.vertexSrc = vertexSrc;\n\n        /**\n         * Reference to the fragement shader template. Must contain \"%count%\" and \"%forloop%\".\n         *\n         * @member {string}\n         */\n        this.fragTemplate = fragTemplate;\n\n        this.programCache = {};\n        this.defaultGroupCache = {};\n\n        if (fragTemplate.indexOf('%count%') < 0)\n        {\n            throw new Error('Fragment template must contain \"%count%\".');\n        }\n\n        if (fragTemplate.indexOf('%forloop%') < 0)\n        {\n            throw new Error('Fragment template must contain \"%forloop%\".');\n        }\n    }\n\n    generateShader(maxTextures)\n    {\n        if (!this.programCache[maxTextures])\n        {\n            const sampleValues = new Int32Array(maxTextures);\n\n            for (let i = 0; i < maxTextures; i++)\n            {\n                sampleValues[i] = i;\n            }\n\n            this.defaultGroupCache[maxTextures] = UniformGroup.from({ uSamplers: sampleValues }, true);\n\n            let fragmentSrc = this.fragTemplate;\n\n            fragmentSrc = fragmentSrc.replace(/%count%/gi, `${maxTextures}`);\n            fragmentSrc = fragmentSrc.replace(/%forloop%/gi, this.generateSampleSrc(maxTextures));\n\n            this.programCache[maxTextures] = new Program(this.vertexSrc, fragmentSrc);\n        }\n\n        const uniforms = {\n            tint: new Float32Array([1, 1, 1, 1]),\n            translationMatrix: new Matrix(),\n            default: this.defaultGroupCache[maxTextures],\n        };\n\n        return new Shader(this.programCache[maxTextures], uniforms);\n    }\n\n    generateSampleSrc(maxTextures)\n    {\n        let src = '';\n\n        src += '\\n';\n        src += '\\n';\n\n        for (let i = 0; i < maxTextures; i++)\n        {\n            if (i > 0)\n            {\n                src += '\\nelse ';\n            }\n\n            if (i < maxTextures - 1)\n            {\n                src += `if(vTextureId < ${i}.5)`;\n            }\n\n            src += '\\n{';\n            src += `\\n\\tcolor = texture2D(uSamplers[${i}], vTextureCoord);`;\n            src += '\\n}';\n        }\n\n        src += '\\n';\n        src += '\\n';\n\n        return src;\n    }\n}\n","import { TYPES } from '@pixi/constants';\nimport Geometry from '../geometry/Geometry';\nimport Buffer from '../geometry/Buffer';\n\n/**\n * Geometry used to batch standard PIXI content (e.g. Mesh, Sprite, Graphics objects).\n *\n * @class\n * @memberof PIXI\n */\nexport default class BatchGeometry extends Geometry\n{\n    /**\n     * @param {boolean} [_static=false] Optimization flag, where `false`\n     *        is updated every frame, `true` doesn't change frame-to-frame.\n     */\n    constructor(_static = false)\n    {\n        super();\n\n        /**\n         * Buffer used for position, color, texture IDs\n         *\n         * @member {PIXI.Buffer}\n         * @protected\n         */\n        this._buffer = new Buffer(null, _static, false);\n\n        /**\n         * Index buffer data\n         *\n         * @member {PIXI.Buffer}\n         * @protected\n         */\n        this._indexBuffer = new Buffer(null, _static, true);\n\n        this.addAttribute('aVertexPosition', this._buffer, 2, false, TYPES.FLOAT)\n            .addAttribute('aTextureCoord', this._buffer, 2, false, TYPES.FLOAT)\n            .addAttribute('aColor', this._buffer, 4, true, TYPES.UNSIGNED_BYTE)\n            .addAttribute('aTextureId', this._buffer, 1, true, TYPES.FLOAT)\n            .addIndex(this._indexBuffer);\n    }\n}\n","import BatchShaderGenerator from './BatchShaderGenerator';\nimport BatchGeometry from './BatchGeometry';\nimport AbstractBatchRenderer from './AbstractBatchRenderer';\n\nimport defaultVertex from './texture.vert';\nimport defaultFragment from './texture.frag';\n\n/**\n * @class\n * @memberof PIXI\n * @hideconstructor\n */\nexport default class BatchPluginFactory\n{\n    /**\n     * Create a new BatchRenderer plugin for Renderer. this convenience can provide an easy way\n     * to extend BatchRenderer with all the necessary pieces.\n     * @example\n     * const fragment = `\n     * varying vec2 vTextureCoord;\n     * varying vec4 vColor;\n     * varying float vTextureId;\n     * uniform sampler2D uSamplers[%count%];\n     *\n     * void main(void){\n     *     vec4 color;\n     *     %forloop%\n     *     gl_FragColor = vColor * vec4(color.a - color.rgb, color.a);\n     * }\n     * `;\n     * const InvertBatchRenderer = PIXI.BatchPluginFactory.create({ fragment });\n     * PIXI.Renderer.registerPlugin('invert', InvertBatchRenderer);\n     * const sprite = new PIXI.Sprite();\n     * sprite.pluginName = 'invert';\n     *\n     * @static\n     * @param {object} [options]\n     * @param {string} [options.vertex=PIXI.BatchPluginFactory.defaultVertexSrc] - Vertex shader source\n     * @param {string} [options.fragment=PIXI.BatchPluginFactory.defaultFragmentTemplate] - Fragment shader template\n     * @param {number} [options.vertexSize=6] - Vertex size\n     * @param {object} [options.geometryClass=PIXI.BatchGeometry]\n     * @return {*} New batch renderer plugin\n     */\n    static create(options)\n    {\n        const { vertex, fragment, vertexSize, geometryClass } = Object.assign({\n            vertex: defaultVertex,\n            fragment: defaultFragment,\n            geometryClass: BatchGeometry,\n            vertexSize: 6,\n        }, options);\n\n        return class BatchPlugin extends AbstractBatchRenderer\n        {\n            constructor(renderer)\n            {\n                super(renderer);\n\n                this.shaderGenerator = new BatchShaderGenerator(vertex, fragment);\n                this.geometryClass = geometryClass;\n                this.vertexSize = vertexSize;\n            }\n        };\n    }\n\n    /**\n     * The default vertex shader source\n     *\n     * @static\n     * @type {string}\n     * @constant\n     */\n    static get defaultVertexSrc()\n    {\n        return defaultVertex;\n    }\n\n    /**\n     * The default fragment shader source\n     *\n     * @static\n     * @type {string}\n     * @constant\n     */\n    static get defaultFragmentTemplate()\n    {\n        return defaultFragment;\n    }\n}\n\n// Setup the default BatchRenderer plugin, this is what\n// we'll actually export at the root level\nexport const BatchRenderer = BatchPluginFactory.create();\n","import { RenderTexture } from '@pixi/core';\nimport { CanvasRenderTarget } from '@pixi/utils';\nimport { Rectangle } from '@pixi/math';\n\nconst TEMP_RECT = new Rectangle();\nconst BYTES_PER_PIXEL = 4;\n\n/**\n * The extract manager provides functionality to export content from the renderers.\n *\n * An instance of this class is automatically created by default, and can be found at `renderer.plugins.extract`\n *\n * @class\n * @memberof PIXI.extract\n */\nexport default class Extract\n{\n    /**\n     * @param {PIXI.Renderer} renderer - A reference to the current renderer\n     */\n    constructor(renderer)\n    {\n        this.renderer = renderer;\n        /**\n         * Collection of methods for extracting data (image, pixels, etc.) from a display object or render texture\n         *\n         * @member {PIXI.extract.Extract} extract\n         * @memberof PIXI.Renderer#\n         * @see PIXI.extract.Extract\n         */\n        renderer.extract = this;\n    }\n\n    /**\n     * Will return a HTML Image of the target\n     *\n     * @param {PIXI.DisplayObject|PIXI.RenderTexture} target - A displayObject or renderTexture\n     *  to convert. If left empty will use the main renderer\n     * @param {string} [format] - Image format, e.g. \"image/jpeg\" or \"image/webp\".\n     * @param {number} [quality] - JPEG or Webp compression from 0 to 1. Default is 0.92.\n     * @return {HTMLImageElement} HTML Image of the target\n     */\n    image(target, format, quality)\n    {\n        const image = new Image();\n\n        image.src = this.base64(target, format, quality);\n\n        return image;\n    }\n\n    /**\n     * Will return a a base64 encoded string of this target. It works by calling\n     *  `Extract.getCanvas` and then running toDataURL on that.\n     *\n     * @param {PIXI.DisplayObject|PIXI.RenderTexture} target - A displayObject or renderTexture\n     *  to convert. If left empty will use the main renderer\n     * @param {string} [format] - Image format, e.g. \"image/jpeg\" or \"image/webp\".\n     * @param {number} [quality] - JPEG or Webp compression from 0 to 1. Default is 0.92.\n     * @return {string} A base64 encoded string of the texture.\n     */\n    base64(target, format, quality)\n    {\n        return this.canvas(target).toDataURL(format, quality);\n    }\n\n    /**\n     * Creates a Canvas element, renders this target to it and then returns it.\n     *\n     * @param {PIXI.DisplayObject|PIXI.RenderTexture} target - A displayObject or renderTexture\n     *  to convert. If left empty will use the main renderer\n     * @return {HTMLCanvasElement} A Canvas element with the texture rendered on.\n     */\n    canvas(target)\n    {\n        const renderer = this.renderer;\n        let resolution;\n        let frame;\n        let flipY = false;\n        let renderTexture;\n        let generated = false;\n\n        if (target)\n        {\n            if (target instanceof RenderTexture)\n            {\n                renderTexture = target;\n            }\n            else\n            {\n                renderTexture = this.renderer.generateTexture(target);\n                generated = true;\n            }\n        }\n\n        if (renderTexture)\n        {\n            resolution = renderTexture.baseTexture.resolution;\n            frame = renderTexture.frame;\n            flipY = false;\n            renderer.renderTexture.bind(renderTexture);\n        }\n        else\n        {\n            resolution = this.renderer.resolution;\n\n            flipY = true;\n\n            frame = TEMP_RECT;\n            frame.width = this.renderer.width;\n            frame.height = this.renderer.height;\n\n            renderer.renderTexture.bind(null);\n        }\n\n        const width = Math.floor(frame.width * resolution);\n        const height = Math.floor(frame.height * resolution);\n\n        const canvasBuffer = new CanvasRenderTarget(width, height, 1);\n\n        const webglPixels = new Uint8Array(BYTES_PER_PIXEL * width * height);\n\n        // read pixels to the array\n        const gl = renderer.gl;\n\n        gl.readPixels(\n            frame.x * resolution,\n            frame.y * resolution,\n            width,\n            height,\n            gl.RGBA,\n            gl.UNSIGNED_BYTE,\n            webglPixels\n        );\n\n        // add the pixels to the canvas\n        const canvasData = canvasBuffer.context.getImageData(0, 0, width, height);\n\n        Extract.arrayPostDivide(webglPixels, canvasData.data);\n\n        canvasBuffer.context.putImageData(canvasData, 0, 0);\n\n        // pulling pixels\n        if (flipY)\n        {\n            canvasBuffer.context.scale(1, -1);\n            canvasBuffer.context.drawImage(canvasBuffer.canvas, 0, -height);\n        }\n\n        if (generated)\n        {\n            renderTexture.destroy(true);\n        }\n\n        // send the canvas back..\n        return canvasBuffer.canvas;\n    }\n\n    /**\n     * Will return a one-dimensional array containing the pixel data of the entire texture in RGBA\n     * order, with integer values between 0 and 255 (included).\n     *\n     * @param {PIXI.DisplayObject|PIXI.RenderTexture} target - A displayObject or renderTexture\n     *  to convert. If left empty will use the main renderer\n     * @return {Uint8Array} One-dimensional array containing the pixel data of the entire texture\n     */\n    pixels(target)\n    {\n        const renderer = this.renderer;\n        let resolution;\n        let frame;\n        let renderTexture;\n        let generated = false;\n\n        if (target)\n        {\n            if (target instanceof RenderTexture)\n            {\n                renderTexture = target;\n            }\n            else\n            {\n                renderTexture = this.renderer.generateTexture(target);\n                generated = true;\n            }\n        }\n\n        if (renderTexture)\n        {\n            resolution = renderTexture.baseTexture.resolution;\n            frame = renderTexture.frame;\n\n            // bind the buffer\n            renderer.renderTexture.bind(renderTexture);\n        }\n        else\n        {\n            resolution = renderer.resolution;\n\n            frame = TEMP_RECT;\n            frame.width = renderer.width;\n            frame.height = renderer.height;\n\n            renderer.renderTexture.bind(null);\n        }\n\n        const width = frame.width * resolution;\n        const height = frame.height * resolution;\n\n        const webglPixels = new Uint8Array(BYTES_PER_PIXEL * width * height);\n\n        // read pixels to the array\n        const gl = renderer.gl;\n\n        gl.readPixels(\n            frame.x * resolution,\n            frame.y * resolution,\n            width,\n            height,\n            gl.RGBA,\n            gl.UNSIGNED_BYTE,\n            webglPixels\n        );\n\n        if (generated)\n        {\n            renderTexture.destroy(true);\n        }\n\n        Extract.arrayPostDivide(webglPixels, webglPixels);\n\n        return webglPixels;\n    }\n\n    /**\n     * Destroys the extract\n     *\n     */\n    destroy()\n    {\n        this.renderer.extract = null;\n        this.renderer = null;\n    }\n\n    /**\n     * Takes premultiplied pixel data and produces regular pixel data\n     *\n     * @private\n     * @param pixels {number[] | Uint8Array | Uint8ClampedArray} array of pixel data\n     * @param out {number[] | Uint8Array | Uint8ClampedArray} output array\n     */\n    static arrayPostDivide(pixels, out)\n    {\n        for (let i = 0; i < pixels.length; i += 4)\n        {\n            const alpha = out[i + 3] = pixels[i + 3];\n\n            if (alpha !== 0)\n            {\n                out[i] = Math.round(Math.min(pixels[i] * 255.0 / alpha, 255.0));\n                out[i + 1] = Math.round(Math.min(pixels[i + 1] * 255.0 / alpha, 255.0));\n                out[i + 2] = Math.round(Math.min(pixels[i + 2] * 255.0 / alpha, 255.0));\n            }\n            else\n            {\n                out[i] = pixels[i];\n                out[i + 1] = pixels[i + 1];\n                out[i + 2] = pixels[i + 2];\n            }\n        }\n    }\n}\n","import { Point } from '@pixi/math';\n\n/**\n * Holds all information related to an Interaction event\n *\n * @class\n * @memberof PIXI.interaction\n */\nexport default class InteractionData\n{\n    constructor()\n    {\n        /**\n         * This point stores the global coords of where the touch/mouse event happened\n         *\n         * @member {PIXI.Point}\n         */\n        this.global = new Point();\n\n        /**\n         * The target Sprite that was interacted with\n         *\n         * @member {PIXI.Sprite}\n         */\n        this.target = null;\n\n        /**\n         * When passed to an event handler, this will be the original DOM Event that was captured\n         *\n         * @see https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent\n         * @see https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent\n         * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent\n         * @member {MouseEvent|TouchEvent|PointerEvent}\n         */\n        this.originalEvent = null;\n\n        /**\n         * Unique identifier for this interaction\n         *\n         * @member {number}\n         */\n        this.identifier = null;\n\n        /**\n         * Indicates whether or not the pointer device that created the event is the primary pointer.\n         * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/isPrimary\n         * @type {Boolean}\n         */\n        this.isPrimary = false;\n\n        /**\n         * Indicates which button was pressed on the mouse or pointer device to trigger the event.\n         * @see https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button\n         * @type {number}\n         */\n        this.button = 0;\n\n        /**\n         * Indicates which buttons are pressed on the mouse or pointer device when the event is triggered.\n         * @see https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/buttons\n         * @type {number}\n         */\n        this.buttons = 0;\n\n        /**\n         * The width of the pointer's contact along the x-axis, measured in CSS pixels.\n         * radiusX of TouchEvents will be represented by this value.\n         * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/width\n         * @type {number}\n         */\n        this.width = 0;\n\n        /**\n         * The height of the pointer's contact along the y-axis, measured in CSS pixels.\n         * radiusY of TouchEvents will be represented by this value.\n         * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/height\n         * @type {number}\n         */\n        this.height = 0;\n\n        /**\n         * The angle, in degrees, between the pointer device and the screen.\n         * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/tiltX\n         * @type {number}\n         */\n        this.tiltX = 0;\n\n        /**\n         * The angle, in degrees, between the pointer device and the screen.\n         * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/tiltY\n         * @type {number}\n         */\n        this.tiltY = 0;\n\n        /**\n         * The type of pointer that triggered the event.\n         * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/pointerType\n         * @type {string}\n         */\n        this.pointerType = null;\n\n        /**\n         * Pressure applied by the pointing device during the event. A Touch's force property\n         * will be represented by this value.\n         * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/pressure\n         * @type {number}\n         */\n        this.pressure = 0;\n\n        /**\n         * From TouchEvents (not PointerEvents triggered by touches), the rotationAngle of the Touch.\n         * @see https://developer.mozilla.org/en-US/docs/Web/API/Touch/rotationAngle\n         * @type {number}\n         */\n        this.rotationAngle = 0;\n\n        /**\n         * Twist of a stylus pointer.\n         * @see https://w3c.github.io/pointerevents/#pointerevent-interface\n         * @type {number}\n         */\n        this.twist = 0;\n\n        /**\n         * Barrel pressure on a stylus pointer.\n         * @see https://w3c.github.io/pointerevents/#pointerevent-interface\n         * @type {number}\n         */\n        this.tangentialPressure = 0;\n    }\n\n    /**\n     * The unique identifier of the pointer. It will be the same as `identifier`.\n     * @readonly\n     * @member {number}\n     * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/pointerId\n     */\n    get pointerId()\n    {\n        return this.identifier;\n    }\n\n    /**\n     * This will return the local coordinates of the specified displayObject for this InteractionData\n     *\n     * @param {PIXI.DisplayObject} displayObject - The DisplayObject that you would like the local\n     *  coords off\n     * @param {PIXI.Point} [point] - A Point object in which to store the value, optional (otherwise\n     *  will create a new point)\n     * @param {PIXI.Point} [globalPos] - A Point object containing your custom global coords, optional\n     *  (otherwise will use the current global coords)\n     * @return {PIXI.Point} A point containing the coordinates of the InteractionData position relative\n     *  to the DisplayObject\n     */\n    getLocalPosition(displayObject, point, globalPos)\n    {\n        return displayObject.worldTransform.applyInverse(globalPos || this.global, point);\n    }\n\n    /**\n     * Copies properties from normalized event data.\n     *\n     * @param {Touch|MouseEvent|PointerEvent} event The normalized event data\n     */\n    copyEvent(event)\n    {\n        // isPrimary should only change on touchstart/pointerdown, so we don't want to overwrite\n        // it with \"false\" on later events when our shim for it on touch events might not be\n        // accurate\n        if (event.isPrimary)\n        {\n            this.isPrimary = true;\n        }\n        this.button = event.button;\n        // event.buttons is not available in all browsers (ie. Safari), but it does have a non-standard\n        // event.which property instead, which conveys the same information.\n        this.buttons = Number.isInteger(event.buttons) ? event.buttons : event.which;\n        this.width = event.width;\n        this.height = event.height;\n        this.tiltX = event.tiltX;\n        this.tiltY = event.tiltY;\n        this.pointerType = event.pointerType;\n        this.pressure = event.pressure;\n        this.rotationAngle = event.rotationAngle;\n        this.twist = event.twist || 0;\n        this.tangentialPressure = event.tangentialPressure || 0;\n    }\n\n    /**\n     * Resets the data for pooling.\n     */\n    reset()\n    {\n        // isPrimary is the only property that we really need to reset - everything else is\n        // guaranteed to be overwritten\n        this.isPrimary = false;\n    }\n}\n","/**\n * Event class that mimics native DOM events.\n *\n * @class\n * @memberof PIXI.interaction\n */\nexport default class InteractionEvent\n{\n    constructor()\n    {\n        /**\n         * Whether this event will continue propagating in the tree.\n         *\n         * Remaining events for the {@link stopsPropagatingAt} object\n         * will still be dispatched.\n         *\n         * @member {boolean}\n         */\n        this.stopped = false;\n\n        /**\n         * At which object this event stops propagating.\n         *\n         * @private\n         * @member {PIXI.DisplayObject}\n         */\n        this.stopsPropagatingAt = null;\n\n        /**\n         * Whether we already reached the element we want to\n         * stop propagating at. This is important for delayed events,\n         * where we start over deeper in the tree again.\n         *\n         * @private\n         * @member {boolean}\n         */\n        this.stopPropagationHint = false;\n\n        /**\n         * The object which caused this event to be dispatched.\n         * For listener callback see {@link PIXI.interaction.InteractionEvent.currentTarget}.\n         *\n         * @member {PIXI.DisplayObject}\n         */\n        this.target = null;\n\n        /**\n         * The object whose event listener’s callback is currently being invoked.\n         *\n         * @member {PIXI.DisplayObject}\n         */\n        this.currentTarget = null;\n\n        /**\n         * Type of the event\n         *\n         * @member {string}\n         */\n        this.type = null;\n\n        /**\n         * InteractionData related to this event\n         *\n         * @member {PIXI.interaction.InteractionData}\n         */\n        this.data = null;\n    }\n\n    /**\n     * Prevents event from reaching any objects other than the current object.\n     *\n     */\n    stopPropagation()\n    {\n        this.stopped = true;\n        this.stopPropagationHint = true;\n        this.stopsPropagatingAt = this.currentTarget;\n    }\n\n    /**\n     * Resets the event.\n     */\n    reset()\n    {\n        this.stopped = false;\n        this.stopsPropagatingAt = null;\n        this.stopPropagationHint = false;\n        this.currentTarget = null;\n        this.target = null;\n    }\n}\n","/**\n * DisplayObjects with the {@link PIXI.interaction.interactiveTarget} mixin use this class to track interactions\n *\n * @class\n * @private\n * @memberof PIXI.interaction\n */\nexport default class InteractionTrackingData\n{\n    /**\n     * @param {number} pointerId - Unique pointer id of the event\n     * @private\n     */\n    constructor(pointerId)\n    {\n        this._pointerId = pointerId;\n        this._flags = InteractionTrackingData.FLAGS.NONE;\n    }\n\n    /**\n     *\n     * @private\n     * @param {number} flag - The interaction flag to set\n     * @param {boolean} yn - Should the flag be set or unset\n     */\n    _doSet(flag, yn)\n    {\n        if (yn)\n        {\n            this._flags = this._flags | flag;\n        }\n        else\n        {\n            this._flags = this._flags & (~flag);\n        }\n    }\n\n    /**\n     * Unique pointer id of the event\n     *\n     * @readonly\n     * @private\n     * @member {number}\n     */\n    get pointerId()\n    {\n        return this._pointerId;\n    }\n\n    /**\n     * State of the tracking data, expressed as bit flags\n     *\n     * @private\n     * @member {number}\n     */\n    get flags()\n    {\n        return this._flags;\n    }\n\n    set flags(flags) // eslint-disable-line require-jsdoc\n    {\n        this._flags = flags;\n    }\n\n    /**\n     * Is the tracked event inactive (not over or down)?\n     *\n     * @private\n     * @member {number}\n     */\n    get none()\n    {\n        return this._flags === this.constructor.FLAGS.NONE;\n    }\n\n    /**\n     * Is the tracked event over the DisplayObject?\n     *\n     * @private\n     * @member {boolean}\n     */\n    get over()\n    {\n        return (this._flags & this.constructor.FLAGS.OVER) !== 0;\n    }\n\n    set over(yn) // eslint-disable-line require-jsdoc\n    {\n        this._doSet(this.constructor.FLAGS.OVER, yn);\n    }\n\n    /**\n     * Did the right mouse button come down in the DisplayObject?\n     *\n     * @private\n     * @member {boolean}\n     */\n    get rightDown()\n    {\n        return (this._flags & this.constructor.FLAGS.RIGHT_DOWN) !== 0;\n    }\n\n    set rightDown(yn) // eslint-disable-line require-jsdoc\n    {\n        this._doSet(this.constructor.FLAGS.RIGHT_DOWN, yn);\n    }\n\n    /**\n     * Did the left mouse button come down in the DisplayObject?\n     *\n     * @private\n     * @member {boolean}\n     */\n    get leftDown()\n    {\n        return (this._flags & this.constructor.FLAGS.LEFT_DOWN) !== 0;\n    }\n\n    set leftDown(yn) // eslint-disable-line require-jsdoc\n    {\n        this._doSet(this.constructor.FLAGS.LEFT_DOWN, yn);\n    }\n}\n\nInteractionTrackingData.FLAGS = Object.freeze({\n    NONE: 0,\n    OVER: 1 << 0,\n    LEFT_DOWN: 1 << 1,\n    RIGHT_DOWN: 1 << 2,\n});\n","/**\n * Interface for classes that represent a hit area.\n *\n * It is implemented by the following classes:\n * - {@link PIXI.Circle}\n * - {@link PIXI.Ellipse}\n * - {@link PIXI.Polygon}\n * - {@link PIXI.RoundedRectangle}\n *\n * @interface IHitArea\n * @memberof PIXI\n */\n\n/**\n * Checks whether the x and y coordinates given are contained within this area\n *\n * @method\n * @name contains\n * @memberof PIXI.IHitArea#\n * @param {number} x - The X coordinate of the point to test\n * @param {number} y - The Y coordinate of the point to test\n * @return {boolean} Whether the x/y coordinates are within this area\n */\n\n/**\n * Default property values of interactive objects\n * Used by {@link PIXI.interaction.InteractionManager} to automatically give all DisplayObjects these properties\n *\n * @private\n * @name interactiveTarget\n * @type {Object}\n * @memberof PIXI.interaction\n * @example\n *      function MyObject() {}\n *\n *      Object.assign(\n *          DisplayObject.prototype,\n *          PIXI.interaction.interactiveTarget\n *      );\n */\nexport default {\n\n    /**\n     * Enable interaction events for the DisplayObject. Touch, pointer and mouse\n     * events will not be emitted unless `interactive` is set to `true`.\n     *\n     * @example\n     * const sprite = new PIXI.Sprite(texture);\n     * sprite.interactive = true;\n     * sprite.on('tap', (event) => {\n     *    //handle event\n     * });\n     * @member {boolean}\n     * @memberof PIXI.DisplayObject#\n     */\n    interactive: false,\n\n    /**\n     * Determines if the children to the displayObject can be clicked/touched\n     * Setting this to false allows PixiJS to bypass a recursive `hitTest` function\n     *\n     * @member {boolean}\n     * @memberof PIXI.Container#\n     */\n    interactiveChildren: true,\n\n    /**\n     * Interaction shape. Children will be hit first, then this shape will be checked.\n     * Setting this will cause this shape to be checked in hit tests rather than the displayObject's bounds.\n     *\n     * @example\n     * const sprite = new PIXI.Sprite(texture);\n     * sprite.interactive = true;\n     * sprite.hitArea = new PIXI.Rectangle(0, 0, 100, 100);\n     * @member {PIXI.IHitArea}\n     * @memberof PIXI.DisplayObject#\n     */\n    hitArea: null,\n\n    /**\n     * If enabled, the mouse cursor use the pointer behavior when hovered over the displayObject if it is interactive\n     * Setting this changes the 'cursor' property to `'pointer'`.\n     *\n     * @example\n     * const sprite = new PIXI.Sprite(texture);\n     * sprite.interactive = true;\n     * sprite.buttonMode = true;\n     * @member {boolean}\n     * @memberof PIXI.DisplayObject#\n     */\n    get buttonMode()\n    {\n        return this.cursor === 'pointer';\n    },\n    set buttonMode(value)\n    {\n        if (value)\n        {\n            this.cursor = 'pointer';\n        }\n        else if (this.cursor === 'pointer')\n        {\n            this.cursor = null;\n        }\n    },\n\n    /**\n     * This defines what cursor mode is used when the mouse cursor\n     * is hovered over the displayObject.\n     *\n     * @example\n     * const sprite = new PIXI.Sprite(texture);\n     * sprite.interactive = true;\n     * sprite.cursor = 'wait';\n     * @see https://developer.mozilla.org/en/docs/Web/CSS/cursor\n     *\n     * @member {string}\n     * @memberof PIXI.DisplayObject#\n     */\n    cursor: null,\n\n    /**\n     * Internal set of all active pointers, by identifier\n     *\n     * @member {Map<number, InteractionTrackingData>}\n     * @memberof PIXI.DisplayObject#\n     * @private\n     */\n    get trackedPointers()\n    {\n        if (this._trackedPointers === undefined) this._trackedPointers = {};\n\n        return this._trackedPointers;\n    },\n\n    /**\n     * Map of all tracked pointers, by identifier. Use trackedPointers to access.\n     *\n     * @private\n     * @type {Map<number, InteractionTrackingData>}\n     */\n    _trackedPointers: undefined,\n};\n","import { Ticker, UPDATE_PRIORITY } from '@pixi/ticker';\nimport { Point } from '@pixi/math';\nimport { DisplayObject } from '@pixi/display';\nimport InteractionData from './InteractionData';\nimport InteractionEvent from './InteractionEvent';\nimport InteractionTrackingData from './InteractionTrackingData';\nimport { EventEmitter } from '@pixi/utils';\nimport interactiveTarget from './interactiveTarget';\n\n// Mix interactiveTarget into DisplayObject.prototype,\n// after deprecation has been handled\nDisplayObject.mixin(interactiveTarget);\n\nconst MOUSE_POINTER_ID = 1;\n\n// helpers for hitTest() - only used inside hitTest()\nconst hitTestEvent = {\n    target: null,\n    data: {\n        global: null,\n    },\n};\n\n/**\n * The interaction manager deals with mouse, touch and pointer events.\n *\n * Any DisplayObject can be interactive if its `interactive` property is set to true.\n *\n * This manager also supports multitouch.\n *\n * An instance of this class is automatically created by default, and can be found at `renderer.plugins.interaction`\n *\n * @class\n * @extends PIXI.utils.EventEmitter\n * @memberof PIXI.interaction\n */\nexport default class InteractionManager extends EventEmitter\n{\n    /**\n     * @param {PIXI.CanvasRenderer|PIXI.Renderer} renderer - A reference to the current renderer\n     * @param {object} [options] - The options for the manager.\n     * @param {boolean} [options.autoPreventDefault=true] - Should the manager automatically prevent default browser actions.\n     * @param {number} [options.interactionFrequency=10] - Frequency increases the interaction events will be checked.\n     */\n    constructor(renderer, options)\n    {\n        super();\n\n        options = options || {};\n\n        /**\n         * The renderer this interaction manager works for.\n         *\n         * @member {PIXI.AbstractRenderer}\n         */\n        this.renderer = renderer;\n\n        /**\n         * Should default browser actions automatically be prevented.\n         * Does not apply to pointer events for backwards compatibility\n         * preventDefault on pointer events stops mouse events from firing\n         * Thus, for every pointer event, there will always be either a mouse of touch event alongside it.\n         *\n         * @member {boolean}\n         * @default true\n         */\n        this.autoPreventDefault = options.autoPreventDefault !== undefined ? options.autoPreventDefault : true;\n\n        /**\n         * Frequency in milliseconds that the mousemove, mouseover & mouseout interaction events will be checked.\n         *\n         * @member {number}\n         * @default 10\n         */\n        this.interactionFrequency = options.interactionFrequency || 10;\n\n        /**\n         * The mouse data\n         *\n         * @member {PIXI.interaction.InteractionData}\n         */\n        this.mouse = new InteractionData();\n        this.mouse.identifier = MOUSE_POINTER_ID;\n\n        // setting the mouse to start off far off screen will mean that mouse over does\n        //  not get called before we even move the mouse.\n        this.mouse.global.set(-999999);\n\n        /**\n         * Actively tracked InteractionData\n         *\n         * @private\n         * @member {Object.<number,PIXI.interaction.InteractionData>}\n         */\n        this.activeInteractionData = {};\n        this.activeInteractionData[MOUSE_POINTER_ID] = this.mouse;\n\n        /**\n         * Pool of unused InteractionData\n         *\n         * @private\n         * @member {PIXI.interaction.InteractionData[]}\n         */\n        this.interactionDataPool = [];\n\n        /**\n         * An event data object to handle all the event tracking/dispatching\n         *\n         * @member {object}\n         */\n        this.eventData = new InteractionEvent();\n\n        /**\n         * The DOM element to bind to.\n         *\n         * @protected\n         * @member {HTMLElement}\n         */\n        this.interactionDOMElement = null;\n\n        /**\n         * This property determines if mousemove and touchmove events are fired only when the cursor\n         * is over the object.\n         * Setting to true will make things work more in line with how the DOM version works.\n         * Setting to false can make things easier for things like dragging\n         * It is currently set to false as this is how PixiJS used to work. This will be set to true in\n         * future versions of pixi.\n         *\n         * @member {boolean}\n         * @default false\n         */\n        this.moveWhenInside = false;\n\n        /**\n         * Have events been attached to the dom element?\n         *\n         * @protected\n         * @member {boolean}\n         */\n        this.eventsAdded = false;\n\n        /**\n         * Is the mouse hovering over the renderer?\n         *\n         * @protected\n         * @member {boolean}\n         */\n        this.mouseOverRenderer = false;\n\n        /**\n         * Does the device support touch events\n         * https://www.w3.org/TR/touch-events/\n         *\n         * @readonly\n         * @member {boolean}\n         */\n        this.supportsTouchEvents = 'ontouchstart' in window;\n\n        /**\n         * Does the device support pointer events\n         * https://www.w3.org/Submission/pointer-events/\n         *\n         * @readonly\n         * @member {boolean}\n         */\n        this.supportsPointerEvents = !!window.PointerEvent;\n\n        // this will make it so that you don't have to call bind all the time\n\n        /**\n         * @private\n         * @member {Function}\n         */\n        this.onPointerUp = this.onPointerUp.bind(this);\n        this.processPointerUp = this.processPointerUp.bind(this);\n\n        /**\n         * @private\n         * @member {Function}\n         */\n        this.onPointerCancel = this.onPointerCancel.bind(this);\n        this.processPointerCancel = this.processPointerCancel.bind(this);\n\n        /**\n         * @private\n         * @member {Function}\n         */\n        this.onPointerDown = this.onPointerDown.bind(this);\n        this.processPointerDown = this.processPointerDown.bind(this);\n\n        /**\n         * @private\n         * @member {Function}\n         */\n        this.onPointerMove = this.onPointerMove.bind(this);\n        this.processPointerMove = this.processPointerMove.bind(this);\n\n        /**\n         * @private\n         * @member {Function}\n         */\n        this.onPointerOut = this.onPointerOut.bind(this);\n        this.processPointerOverOut = this.processPointerOverOut.bind(this);\n\n        /**\n         * @private\n         * @member {Function}\n         */\n        this.onPointerOver = this.onPointerOver.bind(this);\n\n        /**\n         * Dictionary of how different cursor modes are handled. Strings are handled as CSS cursor\n         * values, objects are handled as dictionaries of CSS values for interactionDOMElement,\n         * and functions are called instead of changing the CSS.\n         * Default CSS cursor values are provided for 'default' and 'pointer' modes.\n         * @member {Object.<string, Object>}\n         */\n        this.cursorStyles = {\n            default: 'inherit',\n            pointer: 'pointer',\n        };\n\n        /**\n         * The mode of the cursor that is being used.\n         * The value of this is a key from the cursorStyles dictionary.\n         *\n         * @member {string}\n         */\n        this.currentCursorMode = null;\n\n        /**\n         * Internal cached let.\n         *\n         * @private\n         * @member {string}\n         */\n        this.cursor = null;\n\n        /**\n         * Internal cached let.\n         *\n         * @private\n         * @member {PIXI.Point}\n         */\n        this._tempPoint = new Point();\n\n        /**\n         * The current resolution / device pixel ratio.\n         *\n         * @member {number}\n         * @default 1\n         */\n        this.resolution = 1;\n\n        /**\n         * Delayed pointer events. Used to guarantee correct ordering of over/out events.\n         *\n         * @private\n         * @member {Array}\n         */\n        this.delayedEvents = [];\n\n        /**\n         * Fired when a pointer device button (usually a mouse left-button) is pressed on the display\n         * object.\n         *\n         * @event PIXI.interaction.InteractionManager#mousedown\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device secondary button (usually a mouse right-button) is pressed\n         * on the display object.\n         *\n         * @event PIXI.interaction.InteractionManager#rightdown\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device button (usually a mouse left-button) is released over the display\n         * object.\n         *\n         * @event PIXI.interaction.InteractionManager#mouseup\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device secondary button (usually a mouse right-button) is released\n         * over the display object.\n         *\n         * @event PIXI.interaction.InteractionManager#rightup\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device button (usually a mouse left-button) is pressed and released on\n         * the display object.\n         *\n         * @event PIXI.interaction.InteractionManager#click\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device secondary button (usually a mouse right-button) is pressed\n         * and released on the display object.\n         *\n         * @event PIXI.interaction.InteractionManager#rightclick\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device button (usually a mouse left-button) is released outside the\n         * display object that initially registered a\n         * [mousedown]{@link PIXI.interaction.InteractionManager#event:mousedown}.\n         *\n         * @event PIXI.interaction.InteractionManager#mouseupoutside\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device secondary button (usually a mouse right-button) is released\n         * outside the display object that initially registered a\n         * [rightdown]{@link PIXI.interaction.InteractionManager#event:rightdown}.\n         *\n         * @event PIXI.interaction.InteractionManager#rightupoutside\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device (usually a mouse) is moved while over the display object\n         *\n         * @event PIXI.interaction.InteractionManager#mousemove\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device (usually a mouse) is moved onto the display object\n         *\n         * @event PIXI.interaction.InteractionManager#mouseover\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device (usually a mouse) is moved off the display object\n         *\n         * @event PIXI.interaction.InteractionManager#mouseout\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device button is pressed on the display object.\n         *\n         * @event PIXI.interaction.InteractionManager#pointerdown\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device button is released over the display object.\n         * Not always fired when some buttons are held down while others are released. In those cases,\n         * use [mousedown]{@link PIXI.interaction.InteractionManager#event:mousedown} and\n         * [mouseup]{@link PIXI.interaction.InteractionManager#event:mouseup} instead.\n         *\n         * @event PIXI.interaction.InteractionManager#pointerup\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when the operating system cancels a pointer event\n         *\n         * @event PIXI.interaction.InteractionManager#pointercancel\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device button is pressed and released on the display object.\n         *\n         * @event PIXI.interaction.InteractionManager#pointertap\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device button is released outside the display object that initially\n         * registered a [pointerdown]{@link PIXI.interaction.InteractionManager#event:pointerdown}.\n         *\n         * @event PIXI.interaction.InteractionManager#pointerupoutside\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device is moved while over the display object\n         *\n         * @event PIXI.interaction.InteractionManager#pointermove\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device is moved onto the display object\n         *\n         * @event PIXI.interaction.InteractionManager#pointerover\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device is moved off the display object\n         *\n         * @event PIXI.interaction.InteractionManager#pointerout\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a touch point is placed on the display object.\n         *\n         * @event PIXI.interaction.InteractionManager#touchstart\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a touch point is removed from the display object.\n         *\n         * @event PIXI.interaction.InteractionManager#touchend\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when the operating system cancels a touch\n         *\n         * @event PIXI.interaction.InteractionManager#touchcancel\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a touch point is placed and removed from the display object.\n         *\n         * @event PIXI.interaction.InteractionManager#tap\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a touch point is removed outside of the display object that initially\n         * registered a [touchstart]{@link PIXI.interaction.InteractionManager#event:touchstart}.\n         *\n         * @event PIXI.interaction.InteractionManager#touchendoutside\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a touch point is moved along the display object.\n         *\n         * @event PIXI.interaction.InteractionManager#touchmove\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device button (usually a mouse left-button) is pressed on the display.\n         * object. DisplayObject's `interactive` property must be set to `true` to fire event.\n         *\n         * @event PIXI.DisplayObject#mousedown\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device secondary button (usually a mouse right-button) is pressed\n         * on the display object. DisplayObject's `interactive` property must be set to `true` to fire event.\n         *\n         * @event PIXI.DisplayObject#rightdown\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device button (usually a mouse left-button) is released over the display\n         * object. DisplayObject's `interactive` property must be set to `true` to fire event.\n         *\n         * @event PIXI.DisplayObject#mouseup\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device secondary button (usually a mouse right-button) is released\n         * over the display object. DisplayObject's `interactive` property must be set to `true` to fire event.\n         *\n         * @event PIXI.DisplayObject#rightup\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device button (usually a mouse left-button) is pressed and released on\n         * the display object. DisplayObject's `interactive` property must be set to `true` to fire event.\n         *\n         * @event PIXI.DisplayObject#click\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device secondary button (usually a mouse right-button) is pressed\n         * and released on the display object. DisplayObject's `interactive` property must be set to `true` to fire event.\n         *\n         * @event PIXI.DisplayObject#rightclick\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device button (usually a mouse left-button) is released outside the\n         * display object that initially registered a\n         * [mousedown]{@link PIXI.DisplayObject#event:mousedown}.\n         * DisplayObject's `interactive` property must be set to `true` to fire event.\n         *\n         * @event PIXI.DisplayObject#mouseupoutside\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device secondary button (usually a mouse right-button) is released\n         * outside the display object that initially registered a\n         * [rightdown]{@link PIXI.DisplayObject#event:rightdown}.\n         * DisplayObject's `interactive` property must be set to `true` to fire event.\n         *\n         * @event PIXI.DisplayObject#rightupoutside\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device (usually a mouse) is moved while over the display object.\n         * DisplayObject's `interactive` property must be set to `true` to fire event.\n         *\n         * @event PIXI.DisplayObject#mousemove\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device (usually a mouse) is moved onto the display object.\n         * DisplayObject's `interactive` property must be set to `true` to fire event.\n         *\n         * @event PIXI.DisplayObject#mouseover\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device (usually a mouse) is moved off the display object.\n         * DisplayObject's `interactive` property must be set to `true` to fire event.\n         *\n         * @event PIXI.DisplayObject#mouseout\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device button is pressed on the display object.\n         * DisplayObject's `interactive` property must be set to `true` to fire event.\n         *\n         * @event PIXI.DisplayObject#pointerdown\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device button is released over the display object.\n         * DisplayObject's `interactive` property must be set to `true` to fire event.\n         *\n         * @event PIXI.DisplayObject#pointerup\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when the operating system cancels a pointer event.\n         * DisplayObject's `interactive` property must be set to `true` to fire event.\n         *\n         * @event PIXI.DisplayObject#pointercancel\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device button is pressed and released on the display object.\n         * DisplayObject's `interactive` property must be set to `true` to fire event.\n         *\n         * @event PIXI.DisplayObject#pointertap\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device button is released outside the display object that initially\n         * registered a [pointerdown]{@link PIXI.DisplayObject#event:pointerdown}.\n         * DisplayObject's `interactive` property must be set to `true` to fire event.\n         *\n         * @event PIXI.DisplayObject#pointerupoutside\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device is moved while over the display object.\n         * DisplayObject's `interactive` property must be set to `true` to fire event.\n         *\n         * @event PIXI.DisplayObject#pointermove\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device is moved onto the display object.\n         * DisplayObject's `interactive` property must be set to `true` to fire event.\n         *\n         * @event PIXI.DisplayObject#pointerover\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device is moved off the display object.\n         * DisplayObject's `interactive` property must be set to `true` to fire event.\n         *\n         * @event PIXI.DisplayObject#pointerout\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a touch point is placed on the display object.\n         * DisplayObject's `interactive` property must be set to `true` to fire event.\n         *\n         * @event PIXI.DisplayObject#touchstart\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a touch point is removed from the display object.\n         * DisplayObject's `interactive` property must be set to `true` to fire event.\n         *\n         * @event PIXI.DisplayObject#touchend\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when the operating system cancels a touch.\n         * DisplayObject's `interactive` property must be set to `true` to fire event.\n         *\n         * @event PIXI.DisplayObject#touchcancel\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a touch point is placed and removed from the display object.\n         * DisplayObject's `interactive` property must be set to `true` to fire event.\n         *\n         * @event PIXI.DisplayObject#tap\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a touch point is removed outside of the display object that initially\n         * registered a [touchstart]{@link PIXI.DisplayObject#event:touchstart}.\n         * DisplayObject's `interactive` property must be set to `true` to fire event.\n         *\n         * @event PIXI.DisplayObject#touchendoutside\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a touch point is moved along the display object.\n         * DisplayObject's `interactive` property must be set to `true` to fire event.\n         *\n         * @event PIXI.DisplayObject#touchmove\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        this.setTargetElement(this.renderer.view, this.renderer.resolution);\n    }\n\n    /**\n     * Hit tests a point against the display tree, returning the first interactive object that is hit.\n     *\n     * @param {PIXI.Point} globalPoint - A point to hit test with, in global space.\n     * @param {PIXI.Container} [root] - The root display object to start from. If omitted, defaults\n     * to the last rendered root of the associated renderer.\n     * @return {PIXI.DisplayObject} The hit display object, if any.\n     */\n    hitTest(globalPoint, root)\n    {\n        // clear the target for our hit test\n        hitTestEvent.target = null;\n        // assign the global point\n        hitTestEvent.data.global = globalPoint;\n        // ensure safety of the root\n        if (!root)\n        {\n            root = this.renderer._lastObjectRendered;\n        }\n        // run the hit test\n        this.processInteractive(hitTestEvent, root, null, true);\n        // return our found object - it'll be null if we didn't hit anything\n\n        return hitTestEvent.target;\n    }\n\n    /**\n     * Sets the DOM element which will receive mouse/touch events. This is useful for when you have\n     * other DOM elements on top of the renderers Canvas element. With this you'll be bale to delegate\n     * another DOM element to receive those events.\n     *\n     * @param {HTMLElement} element - the DOM element which will receive mouse and touch events.\n     * @param {number} [resolution=1] - The resolution / device pixel ratio of the new element (relative to the canvas).\n     */\n    setTargetElement(element, resolution = 1)\n    {\n        this.removeEvents();\n\n        this.interactionDOMElement = element;\n\n        this.resolution = resolution;\n\n        this.addEvents();\n    }\n\n    /**\n     * Registers all the DOM events\n     *\n     * @private\n     */\n    addEvents()\n    {\n        if (!this.interactionDOMElement)\n        {\n            return;\n        }\n\n        Ticker.system.add(this.update, this, UPDATE_PRIORITY.INTERACTION);\n\n        if (window.navigator.msPointerEnabled)\n        {\n            this.interactionDOMElement.style['-ms-content-zooming'] = 'none';\n            this.interactionDOMElement.style['-ms-touch-action'] = 'none';\n        }\n        else if (this.supportsPointerEvents)\n        {\n            this.interactionDOMElement.style['touch-action'] = 'none';\n        }\n\n        /**\n         * These events are added first, so that if pointer events are normalized, they are fired\n         * in the same order as non-normalized events. ie. pointer event 1st, mouse / touch 2nd\n         */\n        if (this.supportsPointerEvents)\n        {\n            window.document.addEventListener('pointermove', this.onPointerMove, true);\n            this.interactionDOMElement.addEventListener('pointerdown', this.onPointerDown, true);\n            // pointerout is fired in addition to pointerup (for touch events) and pointercancel\n            // we already handle those, so for the purposes of what we do in onPointerOut, we only\n            // care about the pointerleave event\n            this.interactionDOMElement.addEventListener('pointerleave', this.onPointerOut, true);\n            this.interactionDOMElement.addEventListener('pointerover', this.onPointerOver, true);\n            window.addEventListener('pointercancel', this.onPointerCancel, true);\n            window.addEventListener('pointerup', this.onPointerUp, true);\n        }\n        else\n        {\n            window.document.addEventListener('mousemove', this.onPointerMove, true);\n            this.interactionDOMElement.addEventListener('mousedown', this.onPointerDown, true);\n            this.interactionDOMElement.addEventListener('mouseout', this.onPointerOut, true);\n            this.interactionDOMElement.addEventListener('mouseover', this.onPointerOver, true);\n            window.addEventListener('mouseup', this.onPointerUp, true);\n        }\n\n        // always look directly for touch events so that we can provide original data\n        // In a future version we should change this to being just a fallback and rely solely on\n        // PointerEvents whenever available\n        if (this.supportsTouchEvents)\n        {\n            this.interactionDOMElement.addEventListener('touchstart', this.onPointerDown, true);\n            this.interactionDOMElement.addEventListener('touchcancel', this.onPointerCancel, true);\n            this.interactionDOMElement.addEventListener('touchend', this.onPointerUp, true);\n            this.interactionDOMElement.addEventListener('touchmove', this.onPointerMove, true);\n        }\n\n        this.eventsAdded = true;\n    }\n\n    /**\n     * Removes all the DOM events that were previously registered\n     *\n     * @private\n     */\n    removeEvents()\n    {\n        if (!this.interactionDOMElement)\n        {\n            return;\n        }\n\n        Ticker.system.remove(this.update, this);\n\n        if (window.navigator.msPointerEnabled)\n        {\n            this.interactionDOMElement.style['-ms-content-zooming'] = '';\n            this.interactionDOMElement.style['-ms-touch-action'] = '';\n        }\n        else if (this.supportsPointerEvents)\n        {\n            this.interactionDOMElement.style['touch-action'] = '';\n        }\n\n        if (this.supportsPointerEvents)\n        {\n            window.document.removeEventListener('pointermove', this.onPointerMove, true);\n            this.interactionDOMElement.removeEventListener('pointerdown', this.onPointerDown, true);\n            this.interactionDOMElement.removeEventListener('pointerleave', this.onPointerOut, true);\n            this.interactionDOMElement.removeEventListener('pointerover', this.onPointerOver, true);\n            window.removeEventListener('pointercancel', this.onPointerCancel, true);\n            window.removeEventListener('pointerup', this.onPointerUp, true);\n        }\n        else\n        {\n            window.document.removeEventListener('mousemove', this.onPointerMove, true);\n            this.interactionDOMElement.removeEventListener('mousedown', this.onPointerDown, true);\n            this.interactionDOMElement.removeEventListener('mouseout', this.onPointerOut, true);\n            this.interactionDOMElement.removeEventListener('mouseover', this.onPointerOver, true);\n            window.removeEventListener('mouseup', this.onPointerUp, true);\n        }\n\n        if (this.supportsTouchEvents)\n        {\n            this.interactionDOMElement.removeEventListener('touchstart', this.onPointerDown, true);\n            this.interactionDOMElement.removeEventListener('touchcancel', this.onPointerCancel, true);\n            this.interactionDOMElement.removeEventListener('touchend', this.onPointerUp, true);\n            this.interactionDOMElement.removeEventListener('touchmove', this.onPointerMove, true);\n        }\n\n        this.interactionDOMElement = null;\n\n        this.eventsAdded = false;\n    }\n\n    /**\n     * Updates the state of interactive objects.\n     * Invoked by a throttled ticker update from {@link PIXI.Ticker.system}.\n     *\n     * @param {number} deltaTime - time delta since last tick\n     */\n    update(deltaTime)\n    {\n        this._deltaTime += deltaTime;\n\n        if (this._deltaTime < this.interactionFrequency)\n        {\n            return;\n        }\n\n        this._deltaTime = 0;\n\n        if (!this.interactionDOMElement)\n        {\n            return;\n        }\n\n        // if the user move the mouse this check has already been done using the mouse move!\n        if (this.didMove)\n        {\n            this.didMove = false;\n\n            return;\n        }\n\n        this.cursor = null;\n\n        // Resets the flag as set by a stopPropagation call. This flag is usually reset by a user interaction of any kind,\n        // but there was a scenario of a display object moving under a static mouse cursor.\n        // In this case, mouseover and mouseevents would not pass the flag test in dispatchEvent function\n        for (const k in this.activeInteractionData)\n        {\n            // eslint-disable-next-line no-prototype-builtins\n            if (this.activeInteractionData.hasOwnProperty(k))\n            {\n                const interactionData = this.activeInteractionData[k];\n\n                if (interactionData.originalEvent && interactionData.pointerType !== 'touch')\n                {\n                    const interactionEvent = this.configureInteractionEventForDOMEvent(\n                        this.eventData,\n                        interactionData.originalEvent,\n                        interactionData\n                    );\n\n                    this.processInteractive(\n                        interactionEvent,\n                        this.renderer._lastObjectRendered,\n                        this.processPointerOverOut,\n                        true\n                    );\n                }\n            }\n        }\n\n        this.setCursorMode(this.cursor);\n    }\n\n    /**\n     * Sets the current cursor mode, handling any callbacks or CSS style changes.\n     *\n     * @param {string} mode - cursor mode, a key from the cursorStyles dictionary\n     */\n    setCursorMode(mode)\n    {\n        mode = mode || 'default';\n        // if the mode didn't actually change, bail early\n        if (this.currentCursorMode === mode)\n        {\n            return;\n        }\n        this.currentCursorMode = mode;\n        const style = this.cursorStyles[mode];\n\n        // only do things if there is a cursor style for it\n        if (style)\n        {\n            switch (typeof style)\n            {\n                case 'string':\n                    // string styles are handled as cursor CSS\n                    this.interactionDOMElement.style.cursor = style;\n                    break;\n                case 'function':\n                    // functions are just called, and passed the cursor mode\n                    style(mode);\n                    break;\n                case 'object':\n                    // if it is an object, assume that it is a dictionary of CSS styles,\n                    // apply it to the interactionDOMElement\n                    Object.assign(this.interactionDOMElement.style, style);\n                    break;\n            }\n        }\n        else if (typeof mode === 'string' && !Object.prototype.hasOwnProperty.call(this.cursorStyles, mode))\n        {\n            // if it mode is a string (not a Symbol) and cursorStyles doesn't have any entry\n            // for the mode, then assume that the dev wants it to be CSS for the cursor.\n            this.interactionDOMElement.style.cursor = mode;\n        }\n    }\n\n    /**\n     * Dispatches an event on the display object that was interacted with\n     *\n     * @param {PIXI.Container|PIXI.Sprite|PIXI.TilingSprite} displayObject - the display object in question\n     * @param {string} eventString - the name of the event (e.g, mousedown)\n     * @param {object} eventData - the event data object\n     * @private\n     */\n    dispatchEvent(displayObject, eventString, eventData)\n    {\n        // Even if the event was stopped, at least dispatch any remaining events\n        // for the same display object.\n        if (!eventData.stopPropagationHint || displayObject === eventData.stopsPropagatingAt)\n        {\n            eventData.currentTarget = displayObject;\n            eventData.type = eventString;\n\n            displayObject.emit(eventString, eventData);\n\n            if (displayObject[eventString])\n            {\n                displayObject[eventString](eventData);\n            }\n        }\n    }\n\n    /**\n     * Puts a event on a queue to be dispatched later. This is used to guarantee correct\n     * ordering of over/out events.\n     *\n     * @param {PIXI.Container|PIXI.Sprite|PIXI.TilingSprite} displayObject - the display object in question\n     * @param {string} eventString - the name of the event (e.g, mousedown)\n     * @param {object} eventData - the event data object\n     * @private\n     */\n    delayDispatchEvent(displayObject, eventString, eventData)\n    {\n        this.delayedEvents.push({ displayObject, eventString, eventData });\n    }\n\n    /**\n     * Maps x and y coords from a DOM object and maps them correctly to the PixiJS view. The\n     * resulting value is stored in the point. This takes into account the fact that the DOM\n     * element could be scaled and positioned anywhere on the screen.\n     *\n     * @param  {PIXI.Point} point - the point that the result will be stored in\n     * @param  {number} x - the x coord of the position to map\n     * @param  {number} y - the y coord of the position to map\n     */\n    mapPositionToPoint(point, x, y)\n    {\n        let rect;\n\n        // IE 11 fix\n        if (!this.interactionDOMElement.parentElement)\n        {\n            rect = { x: 0, y: 0, width: 0, height: 0 };\n        }\n        else\n        {\n            rect = this.interactionDOMElement.getBoundingClientRect();\n        }\n\n        const resolutionMultiplier = 1.0 / this.resolution;\n\n        point.x = ((x - rect.left) * (this.interactionDOMElement.width / rect.width)) * resolutionMultiplier;\n        point.y = ((y - rect.top) * (this.interactionDOMElement.height / rect.height)) * resolutionMultiplier;\n    }\n\n    /**\n     * This function is provides a neat way of crawling through the scene graph and running a\n     * specified function on all interactive objects it finds. It will also take care of hit\n     * testing the interactive objects and passes the hit across in the function.\n     *\n     * @protected\n     * @param {PIXI.interaction.InteractionEvent} interactionEvent - event containing the point that\n     *  is tested for collision\n     * @param {PIXI.Container|PIXI.Sprite|PIXI.TilingSprite} displayObject - the displayObject\n     *  that will be hit test (recursively crawls its children)\n     * @param {Function} [func] - the function that will be called on each interactive object. The\n     *  interactionEvent, displayObject and hit will be passed to the function\n     * @param {boolean} [hitTest] - this indicates if the objects inside should be hit test against the point\n     * @param {boolean} [interactive] - Whether the displayObject is interactive\n     * @param {boolean} [skipDelayed] - Whether to process delayed events before returning. This is\n     *  used to avoid processing them too early during recursive calls.\n     * @return {boolean} returns true if the displayObject hit the point\n     */\n    processInteractive(interactionEvent, displayObject, func, hitTest, interactive, skipDelayed)\n    {\n        if (!displayObject || !displayObject.visible)\n        {\n            return false;\n        }\n\n        const point = interactionEvent.data.global;\n\n        // Took a little while to rework this function correctly! But now it is done and nice and optimized! ^_^\n        //\n        // This function will now loop through all objects and then only hit test the objects it HAS\n        // to, not all of them. MUCH faster..\n        // An object will be hit test if the following is true:\n        //\n        // 1: It is interactive.\n        // 2: It belongs to a parent that is interactive AND one of the parents children have not already been hit.\n        //\n        // As another little optimization once an interactive object has been hit we can carry on\n        // through the scenegraph, but we know that there will be no more hits! So we can avoid extra hit tests\n        // A final optimization is that an object is not hit test directly if a child has already been hit.\n\n        interactive = displayObject.interactive || interactive;\n\n        let hit = false;\n        let interactiveParent = interactive;\n\n        // Flag here can set to false if the event is outside the parents hitArea or mask\n        let hitTestChildren = true;\n\n        // If there is a hitArea, no need to test against anything else if the pointer is not within the hitArea\n        // There is also no longer a need to hitTest children.\n        if (displayObject.hitArea)\n        {\n            if (hitTest)\n            {\n                displayObject.worldTransform.applyInverse(point, this._tempPoint);\n                if (!displayObject.hitArea.contains(this._tempPoint.x, this._tempPoint.y))\n                {\n                    hitTest = false;\n                    hitTestChildren = false;\n                }\n                else\n                {\n                    hit = true;\n                }\n            }\n            interactiveParent = false;\n        }\n        // If there is a mask, no need to hitTest against anything else if the pointer is not within the mask.\n        // We still want to hitTestChildren, however, to ensure a mouseout can still be generated.\n        // https://github.com/pixijs/pixi.js/issues/5135\n        else if (displayObject._mask)\n        {\n            if (hitTest)\n            {\n                if (!(displayObject._mask.containsPoint && displayObject._mask.containsPoint(point)))\n                {\n                    hitTest = false;\n                }\n            }\n        }\n\n        // ** FREE TIP **! If an object is not interactive or has no buttons in it\n        // (such as a game scene!) set interactiveChildren to false for that displayObject.\n        // This will allow PixiJS to completely ignore and bypass checking the displayObjects children.\n        if (hitTestChildren && displayObject.interactiveChildren && displayObject.children)\n        {\n            const children = displayObject.children;\n\n            for (let i = children.length - 1; i >= 0; i--)\n            {\n                const child = children[i];\n\n                // time to get recursive.. if this function will return if something is hit..\n                const childHit = this.processInteractive(interactionEvent, child, func, hitTest, interactiveParent, true);\n\n                if (childHit)\n                {\n                    // its a good idea to check if a child has lost its parent.\n                    // this means it has been removed whilst looping so its best\n                    if (!child.parent)\n                    {\n                        continue;\n                    }\n\n                    // we no longer need to hit test any more objects in this container as we we\n                    // now know the parent has been hit\n                    interactiveParent = false;\n\n                    // If the child is interactive , that means that the object hit was actually\n                    // interactive and not just the child of an interactive object.\n                    // This means we no longer need to hit test anything else. We still need to run\n                    // through all objects, but we don't need to perform any hit tests.\n\n                    if (childHit)\n                    {\n                        if (interactionEvent.target)\n                        {\n                            hitTest = false;\n                        }\n                        hit = true;\n                    }\n                }\n            }\n        }\n\n        // no point running this if the item is not interactive or does not have an interactive parent.\n        if (interactive)\n        {\n            // if we are hit testing (as in we have no hit any objects yet)\n            // We also don't need to worry about hit testing if once of the displayObjects children\n            // has already been hit - but only if it was interactive, otherwise we need to keep\n            // looking for an interactive child, just in case we hit one\n            if (hitTest && !interactionEvent.target)\n            {\n                // already tested against hitArea if it is defined\n                if (!displayObject.hitArea && displayObject.containsPoint)\n                {\n                    if (displayObject.containsPoint(point))\n                    {\n                        hit = true;\n                    }\n                }\n            }\n\n            if (displayObject.interactive)\n            {\n                if (hit && !interactionEvent.target)\n                {\n                    interactionEvent.target = displayObject;\n                }\n\n                if (func)\n                {\n                    func(interactionEvent, displayObject, !!hit);\n                }\n            }\n        }\n\n        const delayedEvents = this.delayedEvents;\n\n        if (delayedEvents.length && !skipDelayed)\n        {\n            // Reset the propagation hint, because we start deeper in the tree again.\n            interactionEvent.stopPropagationHint = false;\n\n            const delayedLen = delayedEvents.length;\n\n            this.delayedEvents = [];\n\n            for (let i = 0; i < delayedLen; i++)\n            {\n                const { displayObject, eventString, eventData } = delayedEvents[i];\n\n                // When we reach the object we wanted to stop propagating at,\n                // set the propagation hint.\n                if (eventData.stopsPropagatingAt === displayObject)\n                {\n                    eventData.stopPropagationHint = true;\n                }\n\n                this.dispatchEvent(displayObject, eventString, eventData);\n            }\n        }\n\n        return hit;\n    }\n\n    /**\n     * Is called when the pointer button is pressed down on the renderer element\n     *\n     * @private\n     * @param {PointerEvent} originalEvent - The DOM event of a pointer button being pressed down\n     */\n    onPointerDown(originalEvent)\n    {\n        // if we support touch events, then only use those for touch events, not pointer events\n        if (this.supportsTouchEvents && originalEvent.pointerType === 'touch') return;\n\n        const events = this.normalizeToPointerData(originalEvent);\n\n        /**\n         * No need to prevent default on natural pointer events, as there are no side effects\n         * Normalized events, however, may have the double mousedown/touchstart issue on the native android browser,\n         * so still need to be prevented.\n         */\n\n        // Guaranteed that there will be at least one event in events, and all events must have the same pointer type\n\n        if (this.autoPreventDefault && events[0].isNormalized)\n        {\n            const cancelable = originalEvent.cancelable || !('cancelable' in originalEvent);\n\n            if (cancelable)\n            {\n                originalEvent.preventDefault();\n            }\n        }\n\n        const eventLen = events.length;\n\n        for (let i = 0; i < eventLen; i++)\n        {\n            const event = events[i];\n\n            const interactionData = this.getInteractionDataForPointerId(event);\n\n            const interactionEvent = this.configureInteractionEventForDOMEvent(this.eventData, event, interactionData);\n\n            interactionEvent.data.originalEvent = originalEvent;\n\n            this.processInteractive(interactionEvent, this.renderer._lastObjectRendered, this.processPointerDown, true);\n\n            this.emit('pointerdown', interactionEvent);\n            if (event.pointerType === 'touch')\n            {\n                this.emit('touchstart', interactionEvent);\n            }\n            // emit a mouse event for \"pen\" pointers, the way a browser would emit a fallback event\n            else if (event.pointerType === 'mouse' || event.pointerType === 'pen')\n            {\n                const isRightButton = event.button === 2;\n\n                this.emit(isRightButton ? 'rightdown' : 'mousedown', this.eventData);\n            }\n        }\n    }\n\n    /**\n     * Processes the result of the pointer down check and dispatches the event if need be\n     *\n     * @private\n     * @param {PIXI.interaction.InteractionEvent} interactionEvent - The interaction event wrapping the DOM event\n     * @param {PIXI.Container|PIXI.Sprite|PIXI.TilingSprite} displayObject - The display object that was tested\n     * @param {boolean} hit - the result of the hit test on the display object\n     */\n    processPointerDown(interactionEvent, displayObject, hit)\n    {\n        const data = interactionEvent.data;\n        const id = interactionEvent.data.identifier;\n\n        if (hit)\n        {\n            if (!displayObject.trackedPointers[id])\n            {\n                displayObject.trackedPointers[id] = new InteractionTrackingData(id);\n            }\n            this.dispatchEvent(displayObject, 'pointerdown', interactionEvent);\n\n            if (data.pointerType === 'touch')\n            {\n                this.dispatchEvent(displayObject, 'touchstart', interactionEvent);\n            }\n            else if (data.pointerType === 'mouse' || data.pointerType === 'pen')\n            {\n                const isRightButton = data.button === 2;\n\n                if (isRightButton)\n                {\n                    displayObject.trackedPointers[id].rightDown = true;\n                }\n                else\n                {\n                    displayObject.trackedPointers[id].leftDown = true;\n                }\n\n                this.dispatchEvent(displayObject, isRightButton ? 'rightdown' : 'mousedown', interactionEvent);\n            }\n        }\n    }\n\n    /**\n     * Is called when the pointer button is released on the renderer element\n     *\n     * @private\n     * @param {PointerEvent} originalEvent - The DOM event of a pointer button being released\n     * @param {boolean} cancelled - true if the pointer is cancelled\n     * @param {Function} func - Function passed to {@link processInteractive}\n     */\n    onPointerComplete(originalEvent, cancelled, func)\n    {\n        const events = this.normalizeToPointerData(originalEvent);\n\n        const eventLen = events.length;\n\n        // if the event wasn't targeting our canvas, then consider it to be pointerupoutside\n        // in all cases (unless it was a pointercancel)\n        const eventAppend = originalEvent.target !== this.interactionDOMElement ? 'outside' : '';\n\n        for (let i = 0; i < eventLen; i++)\n        {\n            const event = events[i];\n\n            const interactionData = this.getInteractionDataForPointerId(event);\n\n            const interactionEvent = this.configureInteractionEventForDOMEvent(this.eventData, event, interactionData);\n\n            interactionEvent.data.originalEvent = originalEvent;\n\n            // perform hit testing for events targeting our canvas or cancel events\n            this.processInteractive(interactionEvent, this.renderer._lastObjectRendered, func, cancelled || !eventAppend);\n\n            this.emit(cancelled ? 'pointercancel' : `pointerup${eventAppend}`, interactionEvent);\n\n            if (event.pointerType === 'mouse' || event.pointerType === 'pen')\n            {\n                const isRightButton = event.button === 2;\n\n                this.emit(isRightButton ? `rightup${eventAppend}` : `mouseup${eventAppend}`, interactionEvent);\n            }\n            else if (event.pointerType === 'touch')\n            {\n                this.emit(cancelled ? 'touchcancel' : `touchend${eventAppend}`, interactionEvent);\n                this.releaseInteractionDataForPointerId(event.pointerId, interactionData);\n            }\n        }\n    }\n\n    /**\n     * Is called when the pointer button is cancelled\n     *\n     * @private\n     * @param {PointerEvent} event - The DOM event of a pointer button being released\n     */\n    onPointerCancel(event)\n    {\n        // if we support touch events, then only use those for touch events, not pointer events\n        if (this.supportsTouchEvents && event.pointerType === 'touch') return;\n\n        this.onPointerComplete(event, true, this.processPointerCancel);\n    }\n\n    /**\n     * Processes the result of the pointer cancel check and dispatches the event if need be\n     *\n     * @private\n     * @param {PIXI.interaction.InteractionEvent} interactionEvent - The interaction event wrapping the DOM event\n     * @param {PIXI.Container|PIXI.Sprite|PIXI.TilingSprite} displayObject - The display object that was tested\n     */\n    processPointerCancel(interactionEvent, displayObject)\n    {\n        const data = interactionEvent.data;\n\n        const id = interactionEvent.data.identifier;\n\n        if (displayObject.trackedPointers[id] !== undefined)\n        {\n            delete displayObject.trackedPointers[id];\n            this.dispatchEvent(displayObject, 'pointercancel', interactionEvent);\n\n            if (data.pointerType === 'touch')\n            {\n                this.dispatchEvent(displayObject, 'touchcancel', interactionEvent);\n            }\n        }\n    }\n\n    /**\n     * Is called when the pointer button is released on the renderer element\n     *\n     * @private\n     * @param {PointerEvent} event - The DOM event of a pointer button being released\n     */\n    onPointerUp(event)\n    {\n        // if we support touch events, then only use those for touch events, not pointer events\n        if (this.supportsTouchEvents && event.pointerType === 'touch') return;\n\n        this.onPointerComplete(event, false, this.processPointerUp);\n    }\n\n    /**\n     * Processes the result of the pointer up check and dispatches the event if need be\n     *\n     * @private\n     * @param {PIXI.interaction.InteractionEvent} interactionEvent - The interaction event wrapping the DOM event\n     * @param {PIXI.Container|PIXI.Sprite|PIXI.TilingSprite} displayObject - The display object that was tested\n     * @param {boolean} hit - the result of the hit test on the display object\n     */\n    processPointerUp(interactionEvent, displayObject, hit)\n    {\n        const data = interactionEvent.data;\n\n        const id = interactionEvent.data.identifier;\n\n        const trackingData = displayObject.trackedPointers[id];\n\n        const isTouch = data.pointerType === 'touch';\n\n        const isMouse = (data.pointerType === 'mouse' || data.pointerType === 'pen');\n        // need to track mouse down status in the mouse block so that we can emit\n        // event in a later block\n        let isMouseTap = false;\n\n        // Mouse only\n        if (isMouse)\n        {\n            const isRightButton = data.button === 2;\n\n            const flags = InteractionTrackingData.FLAGS;\n\n            const test = isRightButton ? flags.RIGHT_DOWN : flags.LEFT_DOWN;\n\n            const isDown = trackingData !== undefined && (trackingData.flags & test);\n\n            if (hit)\n            {\n                this.dispatchEvent(displayObject, isRightButton ? 'rightup' : 'mouseup', interactionEvent);\n\n                if (isDown)\n                {\n                    this.dispatchEvent(displayObject, isRightButton ? 'rightclick' : 'click', interactionEvent);\n                    // because we can confirm that the mousedown happened on this object, flag for later emit of pointertap\n                    isMouseTap = true;\n                }\n            }\n            else if (isDown)\n            {\n                this.dispatchEvent(displayObject, isRightButton ? 'rightupoutside' : 'mouseupoutside', interactionEvent);\n            }\n            // update the down state of the tracking data\n            if (trackingData)\n            {\n                if (isRightButton)\n                {\n                    trackingData.rightDown = false;\n                }\n                else\n                {\n                    trackingData.leftDown = false;\n                }\n            }\n        }\n\n        // Pointers and Touches, and Mouse\n        if (hit)\n        {\n            this.dispatchEvent(displayObject, 'pointerup', interactionEvent);\n            if (isTouch) this.dispatchEvent(displayObject, 'touchend', interactionEvent);\n\n            if (trackingData)\n            {\n                // emit pointertap if not a mouse, or if the mouse block decided it was a tap\n                if (!isMouse || isMouseTap)\n                {\n                    this.dispatchEvent(displayObject, 'pointertap', interactionEvent);\n                }\n                if (isTouch)\n                {\n                    this.dispatchEvent(displayObject, 'tap', interactionEvent);\n                    // touches are no longer over (if they ever were) when we get the touchend\n                    // so we should ensure that we don't keep pretending that they are\n                    trackingData.over = false;\n                }\n            }\n        }\n        else if (trackingData)\n        {\n            this.dispatchEvent(displayObject, 'pointerupoutside', interactionEvent);\n            if (isTouch) this.dispatchEvent(displayObject, 'touchendoutside', interactionEvent);\n        }\n        // Only remove the tracking data if there is no over/down state still associated with it\n        if (trackingData && trackingData.none)\n        {\n            delete displayObject.trackedPointers[id];\n        }\n    }\n\n    /**\n     * Is called when the pointer moves across the renderer element\n     *\n     * @private\n     * @param {PointerEvent} originalEvent - The DOM event of a pointer moving\n     */\n    onPointerMove(originalEvent)\n    {\n        // if we support touch events, then only use those for touch events, not pointer events\n        if (this.supportsTouchEvents && originalEvent.pointerType === 'touch') return;\n\n        const events = this.normalizeToPointerData(originalEvent);\n\n        if (events[0].pointerType === 'mouse' || events[0].pointerType === 'pen')\n        {\n            this.didMove = true;\n\n            this.cursor = null;\n        }\n\n        const eventLen = events.length;\n\n        for (let i = 0; i < eventLen; i++)\n        {\n            const event = events[i];\n\n            const interactionData = this.getInteractionDataForPointerId(event);\n\n            const interactionEvent = this.configureInteractionEventForDOMEvent(this.eventData, event, interactionData);\n\n            interactionEvent.data.originalEvent = originalEvent;\n\n            this.processInteractive(interactionEvent, this.renderer._lastObjectRendered, this.processPointerMove, true);\n\n            this.emit('pointermove', interactionEvent);\n            if (event.pointerType === 'touch') this.emit('touchmove', interactionEvent);\n            if (event.pointerType === 'mouse' || event.pointerType === 'pen') this.emit('mousemove', interactionEvent);\n        }\n\n        if (events[0].pointerType === 'mouse')\n        {\n            this.setCursorMode(this.cursor);\n\n            // TODO BUG for parents interactive object (border order issue)\n        }\n    }\n\n    /**\n     * Processes the result of the pointer move check and dispatches the event if need be\n     *\n     * @private\n     * @param {PIXI.interaction.InteractionEvent} interactionEvent - The interaction event wrapping the DOM event\n     * @param {PIXI.Container|PIXI.Sprite|PIXI.TilingSprite} displayObject - The display object that was tested\n     * @param {boolean} hit - the result of the hit test on the display object\n     */\n    processPointerMove(interactionEvent, displayObject, hit)\n    {\n        const data = interactionEvent.data;\n\n        const isTouch = data.pointerType === 'touch';\n\n        const isMouse = (data.pointerType === 'mouse' || data.pointerType === 'pen');\n\n        if (isMouse)\n        {\n            this.processPointerOverOut(interactionEvent, displayObject, hit);\n        }\n\n        if (!this.moveWhenInside || hit)\n        {\n            this.dispatchEvent(displayObject, 'pointermove', interactionEvent);\n            if (isTouch) this.dispatchEvent(displayObject, 'touchmove', interactionEvent);\n            if (isMouse) this.dispatchEvent(displayObject, 'mousemove', interactionEvent);\n        }\n    }\n\n    /**\n     * Is called when the pointer is moved out of the renderer element\n     *\n     * @private\n     * @param {PointerEvent} originalEvent - The DOM event of a pointer being moved out\n     */\n    onPointerOut(originalEvent)\n    {\n        // if we support touch events, then only use those for touch events, not pointer events\n        if (this.supportsTouchEvents && originalEvent.pointerType === 'touch') return;\n\n        const events = this.normalizeToPointerData(originalEvent);\n\n        // Only mouse and pointer can call onPointerOut, so events will always be length 1\n        const event = events[0];\n\n        if (event.pointerType === 'mouse')\n        {\n            this.mouseOverRenderer = false;\n            this.setCursorMode(null);\n        }\n\n        const interactionData = this.getInteractionDataForPointerId(event);\n\n        const interactionEvent = this.configureInteractionEventForDOMEvent(this.eventData, event, interactionData);\n\n        interactionEvent.data.originalEvent = event;\n\n        this.processInteractive(interactionEvent, this.renderer._lastObjectRendered, this.processPointerOverOut, false);\n\n        this.emit('pointerout', interactionEvent);\n        if (event.pointerType === 'mouse' || event.pointerType === 'pen')\n        {\n            this.emit('mouseout', interactionEvent);\n        }\n        else\n        {\n            // we can get touchleave events after touchend, so we want to make sure we don't\n            // introduce memory leaks\n            this.releaseInteractionDataForPointerId(interactionData.identifier);\n        }\n    }\n\n    /**\n     * Processes the result of the pointer over/out check and dispatches the event if need be\n     *\n     * @private\n     * @param {PIXI.interaction.InteractionEvent} interactionEvent - The interaction event wrapping the DOM event\n     * @param {PIXI.Container|PIXI.Sprite|PIXI.TilingSprite} displayObject - The display object that was tested\n     * @param {boolean} hit - the result of the hit test on the display object\n     */\n    processPointerOverOut(interactionEvent, displayObject, hit)\n    {\n        const data = interactionEvent.data;\n\n        const id = interactionEvent.data.identifier;\n\n        const isMouse = (data.pointerType === 'mouse' || data.pointerType === 'pen');\n\n        let trackingData = displayObject.trackedPointers[id];\n\n        // if we just moused over the display object, then we need to track that state\n        if (hit && !trackingData)\n        {\n            trackingData = displayObject.trackedPointers[id] = new InteractionTrackingData(id);\n        }\n\n        if (trackingData === undefined) return;\n\n        if (hit && this.mouseOverRenderer)\n        {\n            if (!trackingData.over)\n            {\n                trackingData.over = true;\n                this.delayDispatchEvent(displayObject, 'pointerover', interactionEvent);\n                if (isMouse)\n                {\n                    this.delayDispatchEvent(displayObject, 'mouseover', interactionEvent);\n                }\n            }\n\n            // only change the cursor if it has not already been changed (by something deeper in the\n            // display tree)\n            if (isMouse && this.cursor === null)\n            {\n                this.cursor = displayObject.cursor;\n            }\n        }\n        else if (trackingData.over)\n        {\n            trackingData.over = false;\n            this.dispatchEvent(displayObject, 'pointerout', this.eventData);\n            if (isMouse)\n            {\n                this.dispatchEvent(displayObject, 'mouseout', interactionEvent);\n            }\n            // if there is no mouse down information for the pointer, then it is safe to delete\n            if (trackingData.none)\n            {\n                delete displayObject.trackedPointers[id];\n            }\n        }\n    }\n\n    /**\n     * Is called when the pointer is moved into the renderer element\n     *\n     * @private\n     * @param {PointerEvent} originalEvent - The DOM event of a pointer button being moved into the renderer view\n     */\n    onPointerOver(originalEvent)\n    {\n        const events = this.normalizeToPointerData(originalEvent);\n\n        // Only mouse and pointer can call onPointerOver, so events will always be length 1\n        const event = events[0];\n\n        const interactionData = this.getInteractionDataForPointerId(event);\n\n        const interactionEvent = this.configureInteractionEventForDOMEvent(this.eventData, event, interactionData);\n\n        interactionEvent.data.originalEvent = event;\n\n        if (event.pointerType === 'mouse')\n        {\n            this.mouseOverRenderer = true;\n        }\n\n        this.emit('pointerover', interactionEvent);\n        if (event.pointerType === 'mouse' || event.pointerType === 'pen')\n        {\n            this.emit('mouseover', interactionEvent);\n        }\n    }\n\n    /**\n     * Get InteractionData for a given pointerId. Store that data as well\n     *\n     * @private\n     * @param {PointerEvent} event - Normalized pointer event, output from normalizeToPointerData\n     * @return {PIXI.interaction.InteractionData} - Interaction data for the given pointer identifier\n     */\n    getInteractionDataForPointerId(event)\n    {\n        const pointerId = event.pointerId;\n\n        let interactionData;\n\n        if (pointerId === MOUSE_POINTER_ID || event.pointerType === 'mouse')\n        {\n            interactionData = this.mouse;\n        }\n        else if (this.activeInteractionData[pointerId])\n        {\n            interactionData = this.activeInteractionData[pointerId];\n        }\n        else\n        {\n            interactionData = this.interactionDataPool.pop() || new InteractionData();\n            interactionData.identifier = pointerId;\n            this.activeInteractionData[pointerId] = interactionData;\n        }\n        // copy properties from the event, so that we can make sure that touch/pointer specific\n        // data is available\n        interactionData.copyEvent(event);\n\n        return interactionData;\n    }\n\n    /**\n     * Return unused InteractionData to the pool, for a given pointerId\n     *\n     * @private\n     * @param {number} pointerId - Identifier from a pointer event\n     */\n    releaseInteractionDataForPointerId(pointerId)\n    {\n        const interactionData = this.activeInteractionData[pointerId];\n\n        if (interactionData)\n        {\n            delete this.activeInteractionData[pointerId];\n            interactionData.reset();\n            this.interactionDataPool.push(interactionData);\n        }\n    }\n\n    /**\n     * Configure an InteractionEvent to wrap a DOM PointerEvent and InteractionData\n     *\n     * @private\n     * @param {PIXI.interaction.InteractionEvent} interactionEvent - The event to be configured\n     * @param {PointerEvent} pointerEvent - The DOM event that will be paired with the InteractionEvent\n     * @param {PIXI.interaction.InteractionData} interactionData - The InteractionData that will be paired\n     *        with the InteractionEvent\n     * @return {PIXI.interaction.InteractionEvent} the interaction event that was passed in\n     */\n    configureInteractionEventForDOMEvent(interactionEvent, pointerEvent, interactionData)\n    {\n        interactionEvent.data = interactionData;\n\n        this.mapPositionToPoint(interactionData.global, pointerEvent.clientX, pointerEvent.clientY);\n\n        // Not really sure why this is happening, but it's how a previous version handled things\n        if (pointerEvent.pointerType === 'touch')\n        {\n            pointerEvent.globalX = interactionData.global.x;\n            pointerEvent.globalY = interactionData.global.y;\n        }\n\n        interactionData.originalEvent = pointerEvent;\n        interactionEvent.reset();\n\n        return interactionEvent;\n    }\n\n    /**\n     * Ensures that the original event object contains all data that a regular pointer event would have\n     *\n     * @private\n     * @param {TouchEvent|MouseEvent|PointerEvent} event - The original event data from a touch or mouse event\n     * @return {PointerEvent[]} An array containing a single normalized pointer event, in the case of a pointer\n     *  or mouse event, or a multiple normalized pointer events if there are multiple changed touches\n     */\n    normalizeToPointerData(event)\n    {\n        const normalizedEvents = [];\n\n        if (this.supportsTouchEvents && event instanceof TouchEvent)\n        {\n            for (let i = 0, li = event.changedTouches.length; i < li; i++)\n            {\n                const touch = event.changedTouches[i];\n\n                if (typeof touch.button === 'undefined') touch.button = event.touches.length ? 1 : 0;\n                if (typeof touch.buttons === 'undefined') touch.buttons = event.touches.length ? 1 : 0;\n                if (typeof touch.isPrimary === 'undefined')\n                {\n                    touch.isPrimary = event.touches.length === 1 && event.type === 'touchstart';\n                }\n                if (typeof touch.width === 'undefined') touch.width = touch.radiusX || 1;\n                if (typeof touch.height === 'undefined') touch.height = touch.radiusY || 1;\n                if (typeof touch.tiltX === 'undefined') touch.tiltX = 0;\n                if (typeof touch.tiltY === 'undefined') touch.tiltY = 0;\n                if (typeof touch.pointerType === 'undefined') touch.pointerType = 'touch';\n                if (typeof touch.pointerId === 'undefined') touch.pointerId = touch.identifier || 0;\n                if (typeof touch.pressure === 'undefined') touch.pressure = touch.force || 0.5;\n                if (typeof touch.twist === 'undefined') touch.twist = 0;\n                if (typeof touch.tangentialPressure === 'undefined') touch.tangentialPressure = 0;\n                // TODO: Remove these, as layerX/Y is not a standard, is deprecated, has uneven\n                // support, and the fill ins are not quite the same\n                // offsetX/Y might be okay, but is not the same as clientX/Y when the canvas's top\n                // left is not 0,0 on the page\n                if (typeof touch.layerX === 'undefined') touch.layerX = touch.offsetX = touch.clientX;\n                if (typeof touch.layerY === 'undefined') touch.layerY = touch.offsetY = touch.clientY;\n\n                // mark the touch as normalized, just so that we know we did it\n                touch.isNormalized = true;\n\n                normalizedEvents.push(touch);\n            }\n        }\n        // apparently PointerEvent subclasses MouseEvent, so yay\n        else if (event instanceof MouseEvent && (!this.supportsPointerEvents || !(event instanceof window.PointerEvent)))\n        {\n            if (typeof event.isPrimary === 'undefined') event.isPrimary = true;\n            if (typeof event.width === 'undefined') event.width = 1;\n            if (typeof event.height === 'undefined') event.height = 1;\n            if (typeof event.tiltX === 'undefined') event.tiltX = 0;\n            if (typeof event.tiltY === 'undefined') event.tiltY = 0;\n            if (typeof event.pointerType === 'undefined') event.pointerType = 'mouse';\n            if (typeof event.pointerId === 'undefined') event.pointerId = MOUSE_POINTER_ID;\n            if (typeof event.pressure === 'undefined') event.pressure = 0.5;\n            if (typeof event.twist === 'undefined') event.twist = 0;\n            if (typeof event.tangentialPressure === 'undefined') event.tangentialPressure = 0;\n\n            // mark the mouse event as normalized, just so that we know we did it\n            event.isNormalized = true;\n\n            normalizedEvents.push(event);\n        }\n        else\n        {\n            normalizedEvents.push(event);\n        }\n\n        return normalizedEvents;\n    }\n\n    /**\n     * Destroys the interaction manager\n     *\n     */\n    destroy()\n    {\n        this.removeEvents();\n\n        this.removeAllListeners();\n\n        this.renderer = null;\n\n        this.mouse = null;\n\n        this.eventData = null;\n\n        this.interactionDOMElement = null;\n\n        this.onPointerDown = null;\n        this.processPointerDown = null;\n\n        this.onPointerUp = null;\n        this.processPointerUp = null;\n\n        this.onPointerCancel = null;\n        this.processPointerCancel = null;\n\n        this.onPointerMove = null;\n        this.processPointerMove = null;\n\n        this.onPointerOut = null;\n        this.processPointerOverOut = null;\n\n        this.onPointerOver = null;\n\n        this._tempPoint = null;\n    }\n}\n","/**\n * Graphics curves resolution settings. If `adaptive` flag is set to `true`,\n * the resolution is calculated based on the curve's length to ensure better visual quality.\n * Adaptive draw works with `bezierCurveTo` and `quadraticCurveTo`.\n *\n * @static\n * @constant\n * @memberof PIXI\n * @name GRAPHICS_CURVES\n * @type {object}\n * @property {boolean} adaptive=false - flag indicating if the resolution should be adaptive\n * @property {number} maxLength=10 - maximal length of a single segment of the curve (if adaptive = false, ignored)\n * @property {number} minSegments=8 - minimal number of segments in the curve (if adaptive = false, ignored)\n * @property {number} maxSegments=2048 - maximal number of segments in the curve (if adaptive = false, ignored)\n */\nexport const GRAPHICS_CURVES = {\n    adaptive: true,\n    maxLength: 10,\n    minSegments: 8,\n    maxSegments: 2048,\n    _segmentsCount(length, defaultSegments = 20)\n    {\n        if (!this.adaptive)\n        {\n            return defaultSegments;\n        }\n\n        let result = Math.ceil(length / this.maxLength);\n\n        if (result < this.minSegments)\n        {\n            result = this.minSegments;\n        }\n        else if (result > this.maxSegments)\n        {\n            result = this.maxSegments;\n        }\n\n        return result;\n    },\n};\n","import { Texture } from '@pixi/core';\n\n/**\n * Fill style object for Graphics.\n *\n * @class\n * @memberof PIXI\n */\nexport default class FillStyle\n{\n    constructor()\n    {\n        this.reset();\n    }\n\n    /**\n     * Clones the object\n     *\n     * @return {PIXI.FillStyle}\n     */\n    clone()\n    {\n        const obj = new FillStyle();\n\n        obj.color = this.color;\n        obj.alpha = this.alpha;\n        obj.texture = this.texture;\n        obj.matrix = this.matrix;\n        obj.visible = this.visible;\n\n        return obj;\n    }\n\n    /**\n     * Reset\n     */\n    reset()\n    {\n        /**\n         * The hex color value used when coloring the Graphics object.\n         *\n         * @member {number}\n         * @default 1\n         */\n        this.color = 0xFFFFFF;\n\n        /**\n         * The alpha value used when filling the Graphics object.\n         *\n         * @member {number}\n         * @default 1\n         */\n        this.alpha = 1;\n\n        /**\n         * The texture to be used for the fill.\n         *\n         * @member {string}\n         * @default 0\n         */\n        this.texture = Texture.WHITE;\n\n        /**\n         * The transform aplpied to the texture.\n         *\n         * @member {string}\n         * @default 0\n         */\n        this.matrix = null;\n\n        /**\n         * If the current fill is visible.\n         *\n         * @member {boolean}\n         * @default false\n         */\n        this.visible = false;\n    }\n\n    /**\n     * Destroy and don't use after this\n     */\n    destroy()\n    {\n        this.texture = null;\n        this.matrix = null;\n    }\n}\n","/**\n * A class to contain data useful for Graphics objects\n *\n * @class\n * @memberof PIXI\n */\nexport default class GraphicsData\n{\n    /**\n     *\n     * @param {PIXI.Circle|PIXI.Rectangle|PIXI.Ellipse|PIXI.Polygon} shape - The shape object to draw.\n     * @param {PIXI.FillStyle} [fillStyle] - the width of the line to draw\n     * @param {PIXI.LineStyle} [lineStyle] - the color of the line to draw\n     * @param {PIXI.Matrix} [matrix] - Transform matrix\n     */\n    constructor(shape, fillStyle = null, lineStyle = null, matrix = null)\n    {\n        /**\n         * The shape object to draw.\n         * @member {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle}\n         */\n        this.shape = shape;\n\n        /**\n         * The style of the line.\n         * @member {PIXI.LineStyle}\n         */\n        this.lineStyle = lineStyle;\n\n        /**\n         * The style of the fill.\n         * @member {PIXI.FillStyle}\n         */\n        this.fillStyle = fillStyle;\n\n        /**\n         * The transform matrix.\n         * @member {PIXI.Matrix}\n         */\n        this.matrix = matrix;\n\n        /**\n         * The type of the shape, see the Const.Shapes file for all the existing types,\n         * @member {number}\n         */\n        this.type = shape.type;\n\n        /**\n         * The collection of points.\n         * @member {number[]}\n         */\n        this.points = [];\n\n        /**\n         * The collection of holes.\n         * @member {PIXI.GraphicsData[]}\n         */\n        this.holes = [];\n    }\n\n    /**\n     * Creates a new GraphicsData object with the same values as this one.\n     *\n     * @return {PIXI.GraphicsData} Cloned GraphicsData object\n     */\n    clone()\n    {\n        return new GraphicsData(\n            this.shape,\n            this.fillStyle,\n            this.lineStyle,\n            this.matrix\n        );\n    }\n\n    /**\n     * Destroys the Graphics data.\n     */\n    destroy()\n    {\n        this.shape = null;\n        this.holes.length = 0;\n        this.holes = null;\n        this.points.length = 0;\n        this.points = null;\n        this.lineStyle = null;\n        this.fillStyle = null;\n    }\n}\n","import { SHAPES } from '@pixi/math';\n\n/**\n * Builds a circle to draw\n *\n * Ignored from docs since it is not directly exposed.\n *\n * @ignore\n * @private\n * @param {PIXI.WebGLGraphicsData} graphicsData - The graphics object to draw\n * @param {object} webGLData - an object containing all the WebGL-specific information to create this shape\n * @param {object} webGLDataNativeLines - an object containing all the WebGL-specific information to create nativeLines\n */\nexport default {\n\n    build(graphicsData)\n    {\n        // need to convert points to a nice regular data\n        const circleData = graphicsData.shape;\n        const points = graphicsData.points;\n        const x = circleData.x;\n        const y = circleData.y;\n        let width;\n        let height;\n\n        points.length = 0;\n\n        // TODO - bit hacky??\n        if (graphicsData.type === SHAPES.CIRC)\n        {\n            width = circleData.radius;\n            height = circleData.radius;\n        }\n        else\n        {\n            width = circleData.width;\n            height = circleData.height;\n        }\n\n        if (width === 0 || height === 0)\n        {\n            return;\n        }\n\n        let totalSegs = Math.floor(30 * Math.sqrt(circleData.radius))\n            || Math.floor(15 * Math.sqrt(circleData.width + circleData.height));\n\n        totalSegs /= 2.3;\n\n        const seg = (Math.PI * 2) / totalSegs;\n\n        for (let i = 0; i < totalSegs; i++)\n        {\n            points.push(\n                x + (Math.sin(-seg * i) * width),\n                y + (Math.cos(-seg * i) * height)\n            );\n        }\n\n        points.push(\n            points[0],\n            points[1]\n        );\n    },\n\n    triangulate(graphicsData, graphicsGeometry)\n    {\n        const points = graphicsData.points;\n        const verts = graphicsGeometry.points;\n        const indices = graphicsGeometry.indices;\n\n        let vertPos = verts.length / 2;\n        const center = vertPos;\n\n        verts.push(graphicsData.shape.x, graphicsData.shape.y);\n\n        for (let i = 0; i < points.length; i += 2)\n        {\n            verts.push(points[i], points[i + 1]);\n\n            // add some uvs\n            indices.push(vertPos++, center, vertPos);\n        }\n    },\n};\n","import { Point, SHAPES } from '@pixi/math';\n\n/**\n * Builds a line to draw\n *\n * Ignored from docs since it is not directly exposed.\n *\n * @ignore\n * @private\n * @param {PIXI.GraphicsData} graphicsData - The graphics object containing all the necessary properties\n * @param {PIXI.GraphicsGeometry} graphicsGeometry - Geometry where to append output\n */\nexport default function (graphicsData, graphicsGeometry)\n{\n    if (graphicsData.lineStyle.native)\n    {\n        buildNativeLine(graphicsData, graphicsGeometry);\n    }\n    else\n    {\n        buildLine(graphicsData, graphicsGeometry);\n    }\n}\n\n/**\n * Builds a line to draw using the polygon method.\n *\n * Ignored from docs since it is not directly exposed.\n *\n * @ignore\n * @private\n * @param {PIXI.GraphicsData} graphicsData - The graphics object containing all the necessary properties\n * @param {PIXI.GraphicsGeometry} graphicsGeometry - Geometry where to append output\n */\nfunction buildLine(graphicsData, graphicsGeometry)\n{\n    const shape = graphicsData.shape;\n    let points = graphicsData.points || shape.points.slice();\n    const eps = graphicsGeometry.closePointEps;\n\n    if (points.length === 0)\n    {\n        return;\n    }\n    // if the line width is an odd number add 0.5 to align to a whole pixel\n    // commenting this out fixes #711 and #1620\n    // if (graphicsData.lineWidth%2)\n    // {\n    //     for (i = 0; i < points.length; i++)\n    //     {\n    //         points[i] += 0.5;\n    //     }\n    // }\n\n    const style = graphicsData.lineStyle;\n\n    // get first and last point.. figure out the middle!\n    const firstPoint = new Point(points[0], points[1]);\n    const lastPoint = new Point(points[points.length - 2], points[points.length - 1]);\n    const closedShape = shape.type !== SHAPES.POLY || shape.closeStroke;\n    const closedPath = Math.abs(firstPoint.x - lastPoint.x) < eps\n        && Math.abs(firstPoint.y - lastPoint.y) < eps;\n\n    // if the first point is the last point - gonna have issues :)\n    if (closedShape)\n    {\n        // need to clone as we are going to slightly modify the shape..\n        points = points.slice();\n\n        if (closedPath)\n        {\n            points.pop();\n            points.pop();\n            lastPoint.set(points[points.length - 2], points[points.length - 1]);\n        }\n\n        const midPointX = lastPoint.x + ((firstPoint.x - lastPoint.x) * 0.5);\n        const midPointY = lastPoint.y + ((firstPoint.y - lastPoint.y) * 0.5);\n\n        points.unshift(midPointX, midPointY);\n        points.push(midPointX, midPointY);\n    }\n\n    const verts = graphicsGeometry.points;\n    const length = points.length / 2;\n    let indexCount = points.length;\n    let indexStart = verts.length / 2;\n\n    // DRAW the Line\n    const width = style.width / 2;\n\n    // sort color\n    let p1x = points[0];\n    let p1y = points[1];\n    let p2x = points[2];\n    let p2y = points[3];\n    let p3x = 0;\n    let p3y = 0;\n\n    let perpx = -(p1y - p2y);\n    let perpy = p1x - p2x;\n    let perp2x = 0;\n    let perp2y = 0;\n    let perp3x = 0;\n    let perp3y = 0;\n\n    let dist = Math.sqrt((perpx * perpx) + (perpy * perpy));\n\n    perpx /= dist;\n    perpy /= dist;\n    perpx *= width;\n    perpy *= width;\n\n    const ratio = style.alignment;// 0.5;\n    const r1 = (1 - ratio) * 2;\n    const r2 = ratio * 2;\n\n    // start\n    verts.push(\n        p1x - (perpx * r1),\n        p1y - (perpy * r1));\n\n    verts.push(\n        p1x + (perpx * r2),\n        p1y + (perpy * r2));\n\n    for (let i = 1; i < length - 1; ++i)\n    {\n        p1x = points[(i - 1) * 2];\n        p1y = points[((i - 1) * 2) + 1];\n\n        p2x = points[i * 2];\n        p2y = points[(i * 2) + 1];\n\n        p3x = points[(i + 1) * 2];\n        p3y = points[((i + 1) * 2) + 1];\n\n        perpx = -(p1y - p2y);\n        perpy = p1x - p2x;\n\n        dist = Math.sqrt((perpx * perpx) + (perpy * perpy));\n        perpx /= dist;\n        perpy /= dist;\n        perpx *= width;\n        perpy *= width;\n\n        perp2x = -(p2y - p3y);\n        perp2y = p2x - p3x;\n\n        dist = Math.sqrt((perp2x * perp2x) + (perp2y * perp2y));\n        perp2x /= dist;\n        perp2y /= dist;\n        perp2x *= width;\n        perp2y *= width;\n\n        const a1 = (-perpy + p1y) - (-perpy + p2y);\n        const b1 = (-perpx + p2x) - (-perpx + p1x);\n        const c1 = ((-perpx + p1x) * (-perpy + p2y)) - ((-perpx + p2x) * (-perpy + p1y));\n        const a2 = (-perp2y + p3y) - (-perp2y + p2y);\n        const b2 = (-perp2x + p2x) - (-perp2x + p3x);\n        const c2 = ((-perp2x + p3x) * (-perp2y + p2y)) - ((-perp2x + p2x) * (-perp2y + p3y));\n\n        let denom = (a1 * b2) - (a2 * b1);\n\n        if (Math.abs(denom) < 0.1)\n        {\n            denom += 10.1;\n            verts.push(\n                p2x - (perpx * r1),\n                p2y - (perpy * r1));\n\n            verts.push(\n                p2x + (perpx * r2),\n                p2y + (perpy * r2));\n\n            continue;\n        }\n\n        const px = ((b1 * c2) - (b2 * c1)) / denom;\n        const py = ((a2 * c1) - (a1 * c2)) / denom;\n        const pdist = ((px - p2x) * (px - p2x)) + ((py - p2y) * (py - p2y));\n\n        if (pdist > (196 * width * width))\n        {\n            perp3x = perpx - perp2x;\n            perp3y = perpy - perp2y;\n\n            dist = Math.sqrt((perp3x * perp3x) + (perp3y * perp3y));\n            perp3x /= dist;\n            perp3y /= dist;\n            perp3x *= width;\n            perp3y *= width;\n\n            verts.push(p2x - (perp3x * r1), p2y - (perp3y * r1));\n\n            verts.push(p2x + (perp3x * r2), p2y + (perp3y * r2));\n\n            verts.push(p2x - (perp3x * r2 * r1), p2y - (perp3y * r1));\n\n            indexCount++;\n        }\n        else\n        {\n            verts.push(p2x + ((px - p2x) * r1), p2y + ((py - p2y) * r1));\n\n            verts.push(p2x - ((px - p2x) * r2), p2y - ((py - p2y) * r2));\n        }\n    }\n\n    p1x = points[(length - 2) * 2];\n    p1y = points[((length - 2) * 2) + 1];\n\n    p2x = points[(length - 1) * 2];\n    p2y = points[((length - 1) * 2) + 1];\n\n    perpx = -(p1y - p2y);\n    perpy = p1x - p2x;\n\n    dist = Math.sqrt((perpx * perpx) + (perpy * perpy));\n    perpx /= dist;\n    perpy /= dist;\n    perpx *= width;\n    perpy *= width;\n\n    verts.push(p2x - (perpx * r1), p2y - (perpy * r1));\n\n    verts.push(p2x + (perpx * r2), p2y + (perpy * r2));\n\n    const indices = graphicsGeometry.indices;\n\n    // indices.push(indexStart);\n\n    for (let i = 0; i < indexCount - 2; ++i)\n    {\n        indices.push(indexStart, indexStart + 1, indexStart + 2);\n\n        indexStart++;\n    }\n}\n\n/**\n * Builds a line to draw using the gl.drawArrays(gl.LINES) method\n *\n * Ignored from docs since it is not directly exposed.\n *\n * @ignore\n * @private\n * @param {PIXI.GraphicsData} graphicsData - The graphics object containing all the necessary properties\n * @param {PIXI.GraphicsGeometry} graphicsGeometry - Geometry where to append output\n */\nfunction buildNativeLine(graphicsData, graphicsGeometry)\n{\n    let i = 0;\n\n    const shape = graphicsData.shape;\n    const points = graphicsData.points || shape.points;\n    const closedShape = shape.type !== SHAPES.POLY || shape.closeStroke;\n\n    if (points.length === 0) return;\n\n    const verts = graphicsGeometry.points;\n    const indices = graphicsGeometry.indices;\n    const length = points.length / 2;\n\n    const startIndex = verts.length / 2;\n    let currentIndex = startIndex;\n\n    verts.push(points[0], points[1]);\n\n    for (i = 1; i < length; i++)\n    {\n        verts.push(points[i * 2], points[(i * 2) + 1]);\n        indices.push(currentIndex, currentIndex + 1);\n\n        currentIndex++;\n    }\n\n    if (closedShape)\n    {\n        indices.push(currentIndex, startIndex);\n    }\n}\n","import { earcut } from '@pixi/utils';\n\n/**\n * Builds a polygon to draw\n *\n * Ignored from docs since it is not directly exposed.\n *\n * @ignore\n * @private\n * @param {PIXI.WebGLGraphicsData} graphicsData - The graphics object containing all the necessary properties\n * @param {object} webGLData - an object containing all the WebGL-specific information to create this shape\n * @param {object} webGLDataNativeLines - an object containing all the WebGL-specific information to create nativeLines\n */\nexport default {\n\n    build(graphicsData)\n    {\n        graphicsData.points = graphicsData.shape.points.slice();\n    },\n\n    triangulate(graphicsData, graphicsGeometry)\n    {\n        let points = graphicsData.points;\n        const holes = graphicsData.holes;\n        const verts = graphicsGeometry.points;\n        const indices = graphicsGeometry.indices;\n\n        if (points.length >= 6)\n        {\n            const holeArray = [];\n            // Process holes..\n\n            for (let i = 0; i < holes.length; i++)\n            {\n                const hole = holes[i];\n\n                holeArray.push(points.length / 2);\n                points = points.concat(hole.points);\n            }\n\n            // sort color\n            const triangles = earcut(points, holeArray, 2);\n\n            if (!triangles)\n            {\n                return;\n            }\n\n            const vertPos = verts.length / 2;\n\n            for (let i = 0; i < triangles.length; i += 3)\n            {\n                indices.push(triangles[i] + vertPos);\n                indices.push(triangles[i + 1] + vertPos);\n                indices.push(triangles[i + 2] + vertPos);\n            }\n\n            for (let i = 0; i < points.length; i++)\n            {\n                verts.push(points[i]);\n            }\n        }\n    },\n};\n","/**\n * Builds a rectangle to draw\n *\n * Ignored from docs since it is not directly exposed.\n *\n * @ignore\n * @private\n * @param {PIXI.WebGLGraphicsData} graphicsData - The graphics object containing all the necessary properties\n * @param {object} webGLData - an object containing all the WebGL-specific information to create this shape\n * @param {object} webGLDataNativeLines - an object containing all the WebGL-specific information to create nativeLines\n */\nexport default {\n\n    build(graphicsData)\n    {\n        // --- //\n        // need to convert points to a nice regular data\n        //\n        const rectData = graphicsData.shape;\n        const x = rectData.x;\n        const y = rectData.y;\n        const width = rectData.width;\n        const height = rectData.height;\n\n        const points = graphicsData.points;\n\n        points.length = 0;\n\n        points.push(x, y,\n            x + width, y,\n            x + width, y + height,\n            x, y + height);\n    },\n\n    triangulate(graphicsData, graphicsGeometry)\n    {\n        const points = graphicsData.points;\n        const verts = graphicsGeometry.points;\n\n        const vertPos = verts.length / 2;\n\n        verts.push(points[0], points[1],\n            points[2], points[3],\n            points[6], points[7],\n            points[4], points[5]);\n\n        graphicsGeometry.indices.push(vertPos, vertPos + 1, vertPos + 2,\n            vertPos + 1, vertPos + 2, vertPos + 3);\n    },\n};\n","import { earcut } from '@pixi/utils';\n\n/**\n * Builds a rounded rectangle to draw\n *\n * Ignored from docs since it is not directly exposed.\n *\n * @ignore\n * @private\n * @param {PIXI.WebGLGraphicsData} graphicsData - The graphics object containing all the necessary properties\n * @param {object} webGLData - an object containing all the WebGL-specific information to create this shape\n * @param {object} webGLDataNativeLines - an object containing all the WebGL-specific information to create nativeLines\n */\nexport default {\n\n    build(graphicsData)\n    {\n        const rrectData = graphicsData.shape;\n        const points = graphicsData.points;\n        const x = rrectData.x;\n        const y = rrectData.y;\n        const width = rrectData.width;\n        const height = rrectData.height;\n\n        const radius = rrectData.radius;\n\n        points.length = 0;\n\n        quadraticBezierCurve(x, y + radius,\n            x, y,\n            x + radius, y,\n            points);\n        quadraticBezierCurve(x + width - radius,\n            y, x + width, y,\n            x + width, y + radius,\n            points);\n        quadraticBezierCurve(x + width, y + height - radius,\n            x + width, y + height,\n            x + width - radius, y + height,\n            points);\n        quadraticBezierCurve(x + radius, y + height,\n            x, y + height,\n            x, y + height - radius,\n            points);\n\n        // this tiny number deals with the issue that occurs when points overlap and earcut fails to triangulate the item.\n        // TODO - fix this properly, this is not very elegant.. but it works for now.\n    },\n\n    triangulate(graphicsData, graphicsGeometry)\n    {\n        const points = graphicsData.points;\n\n        const verts = graphicsGeometry.points;\n        const indices = graphicsGeometry.indices;\n\n        const vecPos = verts.length / 2;\n\n        const triangles = earcut(points, null, 2);\n\n        for (let i = 0, j = triangles.length; i < j; i += 3)\n        {\n            indices.push(triangles[i] + vecPos);\n            //     indices.push(triangles[i] + vecPos);\n            indices.push(triangles[i + 1] + vecPos);\n            //   indices.push(triangles[i + 2] + vecPos);\n            indices.push(triangles[i + 2] + vecPos);\n        }\n\n        for (let i = 0, j = points.length; i < j; i++)\n        {\n            verts.push(points[i], points[++i]);\n        }\n    },\n};\n\n/**\n * Calculate a single point for a quadratic bezier curve.\n * Utility function used by quadraticBezierCurve.\n * Ignored from docs since it is not directly exposed.\n *\n * @ignore\n * @private\n * @param {number} n1 - first number\n * @param {number} n2 - second number\n * @param {number} perc - percentage\n * @return {number} the result\n *\n */\nfunction getPt(n1, n2, perc)\n{\n    const diff = n2 - n1;\n\n    return n1 + (diff * perc);\n}\n\n/**\n * Calculate the points for a quadratic bezier curve. (helper function..)\n * Based on: https://stackoverflow.com/questions/785097/how-do-i-implement-a-bezier-curve-in-c\n *\n * Ignored from docs since it is not directly exposed.\n *\n * @ignore\n * @private\n * @param {number} fromX - Origin point x\n * @param {number} fromY - Origin point x\n * @param {number} cpX - Control point x\n * @param {number} cpY - Control point y\n * @param {number} toX - Destination point x\n * @param {number} toY - Destination point y\n * @param {number[]} [out=[]] - The output array to add points into. If not passed, a new array is created.\n * @return {number[]} an array of points\n */\nfunction quadraticBezierCurve(fromX, fromY, cpX, cpY, toX, toY, out = [])\n{\n    const n = 20;\n    const points = out;\n\n    let xa = 0;\n    let ya = 0;\n    let xb = 0;\n    let yb = 0;\n    let x = 0;\n    let y = 0;\n\n    for (let i = 0, j = 0; i <= n; ++i)\n    {\n        j = i / n;\n\n        // The Green Line\n        xa = getPt(fromX, cpX, j);\n        ya = getPt(fromY, cpY, j);\n        xb = getPt(cpX, toX, j);\n        yb = getPt(cpY, toY, j);\n\n        // The Black Dot\n        x = getPt(xa, xb, j);\n        y = getPt(ya, yb, j);\n\n        points.push(x, y);\n    }\n\n    return points;\n}\n","import { SHAPES, Point } from '@pixi/math';\nimport { Bounds } from '@pixi/display';\nimport { BatchGeometry, BatchDrawCall, BaseTexture } from '@pixi/core';\nimport { DRAW_MODES, WRAP_MODES } from '@pixi/constants';\n\nimport GraphicsData from './GraphicsData';\nimport buildCircle from './utils/buildCircle';\nimport buildLine from './utils/buildLine';\nimport buildPoly from './utils/buildPoly';\nimport buildRectangle from './utils/buildRectangle';\nimport buildRoundedRectangle from './utils/buildRoundedRectangle';\nimport { premultiplyTint } from '@pixi/utils';\n\nconst BATCH_POOL = [];\nconst DRAW_CALL_POOL = [];\nconst tmpPoint = new Point();\n\n/**\n * Map of fill commands for each shape type.\n *\n * @member {Object}\n * @private\n */\nconst fillCommands = {};\n\nfillCommands[SHAPES.POLY] = buildPoly;\nfillCommands[SHAPES.CIRC] = buildCircle;\nfillCommands[SHAPES.ELIP] = buildCircle;\nfillCommands[SHAPES.RECT] = buildRectangle;\nfillCommands[SHAPES.RREC] = buildRoundedRectangle;\n\n/**\n * A little internal structure to hold interim batch objects.\n *\n * @private\n */\nclass BatchPart\n{\n    constructor()\n    {\n        this.style = null;\n        this.size = 0;\n        this.start = 0;\n        this.attribStart = 0;\n        this.attribSize = 0;\n    }\n}\n\n/**\n * The Graphics class contains methods used to draw primitive shapes such as lines, circles and\n * rectangles to the display, and to color and fill them.\n *\n * GraphicsGeometry is designed to not be continually updating the geometry since it's expensive\n * to re-tesselate using **earcut**. Consider using {@link PIXI.Mesh} for this use-case, it's much faster.\n *\n * @class\n * @extends PIXI.BatchGeometry\n * @memberof PIXI\n */\nexport default class GraphicsGeometry extends BatchGeometry\n{\n    constructor()\n    {\n        super();\n\n        /**\n         * An array of points to draw, 2 numbers per point\n         *\n         * @member {number[]}\n         * @protected\n         */\n        this.points = [];\n\n        /**\n         * The collection of colors\n         *\n         * @member {number[]}\n         * @protected\n         */\n        this.colors = [];\n\n        /**\n         * The UVs collection\n         *\n         * @member {number[]}\n         * @protected\n         */\n        this.uvs = [];\n\n        /**\n         * The indices of the vertices\n         *\n         * @member {number[]}\n         * @protected\n         */\n        this.indices = [];\n\n        /**\n         * Reference to the texture IDs.\n         *\n         * @member {number[]}\n         * @protected\n         */\n        this.textureIds = [];\n\n        /**\n         * The collection of drawn shapes.\n         *\n         * @member {PIXI.GraphicsData[]}\n         * @protected\n         */\n        this.graphicsData = [];\n\n        /**\n         * Used to detect if the graphics object has changed.\n         *\n         * @member {number}\n         * @protected\n         */\n        this.dirty = 0;\n\n        /**\n         * Batches need to regenerated if the geometry is updated.\n         *\n         * @member {number}\n         * @protected\n         */\n        this.batchDirty = -1;\n\n        /**\n         * Used to check if the cache is dirty.\n         *\n         * @member {number}\n         * @protected\n         */\n        this.cacheDirty = -1;\n\n        /**\n         * Used to detect if we cleared the graphicsData.\n         *\n         * @member {number}\n         * @default 0\n         * @protected\n         */\n        this.clearDirty = 0;\n\n        /**\n         * List of current draw calls drived from the batches.\n         *\n         * @member {object[]}\n         * @protected\n         */\n        this.drawCalls = [];\n\n        /**\n         * Intermediate abstract format sent to batch system.\n         * Can be converted to drawCalls or to batchable objects.\n         *\n         * @member {object[]}\n         * @protected\n         */\n        this.batches = [];\n\n        /**\n         * Index of the last batched shape in the stack of calls.\n         *\n         * @member {number}\n         * @protected\n         */\n        this.shapeIndex = 0;\n\n        /**\n         * Cached bounds.\n         *\n         * @member {PIXI.Bounds}\n         * @protected\n         */\n        this._bounds = new Bounds();\n\n        /**\n         * The bounds dirty flag.\n         *\n         * @member {number}\n         * @protected\n         */\n        this.boundsDirty = -1;\n\n        /**\n         * Padding to add to the bounds.\n         *\n         * @member {number}\n         * @default 0\n         */\n        this.boundsPadding = 0;\n\n        this.batchable = false;\n\n        this.indicesUint16 = null;\n\n        this.uvsFloat32 = null;\n\n        /**\n         * Minimal distance between points that are considered different.\n         * Affects line tesselation.\n         *\n         * @member {number}\n         */\n        this.closePointEps = 1e-4;\n    }\n\n    /**\n     * Get the current bounds of the graphic geometry.\n     *\n     * @member {PIXI.Bounds}\n     * @readonly\n     */\n    get bounds()\n    {\n        if (this.boundsDirty !== this.dirty)\n        {\n            this.boundsDirty = this.dirty;\n            this.calculateBounds();\n        }\n\n        return this._bounds;\n    }\n\n    /**\n     * Call if you changed graphicsData manually.\n     * Empties all batch buffers.\n     */\n    invalidate()\n    {\n        this.boundsDirty = -1;\n        this.dirty++;\n        this.batchDirty++;\n        this.shapeIndex = 0;\n\n        this.points.length = 0;\n        this.colors.length = 0;\n        this.uvs.length = 0;\n        this.indices.length = 0;\n        this.textureIds.length = 0;\n\n        for (let i = 0; i < this.drawCalls.length; i++)\n        {\n            this.drawCalls[i].textures.length = 0;\n            DRAW_CALL_POOL.push(this.drawCalls[i]);\n        }\n\n        this.drawCalls.length = 0;\n\n        for (let i = 0; i < this.batches.length; i++)\n        {\n            const batch =  this.batches[i];\n\n            batch.start = 0;\n            batch.attribStart = 0;\n            batch.style = null;\n            BATCH_POOL.push(batch);\n        }\n\n        this.batches.length = 0;\n    }\n\n    /**\n     * Clears the graphics that were drawn to this Graphics object, and resets fill and line style settings.\n     *\n     * @return {PIXI.GraphicsGeometry} This GraphicsGeometry object. Good for chaining method calls\n     */\n    clear()\n    {\n        if (this.graphicsData.length > 0)\n        {\n            this.invalidate();\n            this.clearDirty++;\n            this.graphicsData.length = 0;\n        }\n\n        return this;\n    }\n\n    /**\n     * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon.\n     *\n     * @param {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} shape - The shape object to draw.\n     * @param {PIXI.FillStyle} fillStyle - Defines style of the fill.\n     * @param {PIXI.LineStyle} lineStyle - Defines style of the lines.\n     * @param {PIXI.Matrix} matrix - Transform applied to the points of the shape.\n     * @return {PIXI.GraphicsGeometry} Returns geometry for chaining.\n     */\n    drawShape(shape, fillStyle, lineStyle, matrix)\n    {\n        const data = new GraphicsData(shape, fillStyle, lineStyle, matrix);\n\n        this.graphicsData.push(data);\n        this.dirty++;\n\n        return this;\n    }\n\n    /**\n     * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon.\n     *\n     * @param {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} shape - The shape object to draw.\n     * @param {PIXI.Matrix} matrix - Transform applied to the points of the shape.\n     * @return {PIXI.GraphicsGeometry} Returns geometry for chaining.\n     */\n    drawHole(shape, matrix)\n    {\n        if (!this.graphicsData.length)\n        {\n            return null;\n        }\n\n        const data = new GraphicsData(shape, null, null, matrix);\n\n        const lastShape = this.graphicsData[this.graphicsData.length - 1];\n\n        data.lineStyle = lastShape.lineStyle;\n\n        lastShape.holes.push(data);\n\n        this.dirty++;\n\n        return this;\n    }\n\n    /**\n     * Destroys the Graphics object.\n     *\n     * @param {object|boolean} [options] - Options parameter. A boolean will act as if all\n     *  options have been set to that value\n     * @param {boolean} [options.children=false] - if set to true, all the children will have\n     *  their destroy method called as well. 'options' will be passed on to those calls.\n     * @param {boolean} [options.texture=false] - Only used for child Sprites if options.children is set to true\n     *  Should it destroy the texture of the child sprite\n     * @param {boolean} [options.baseTexture=false] - Only used for child Sprites if options.children is set to true\n     *  Should it destroy the base texture of the child sprite\n     */\n    destroy(options)\n    {\n        super.destroy(options);\n\n        // destroy each of the GraphicsData objects\n        for (let i = 0; i < this.graphicsData.length; ++i)\n        {\n            this.graphicsData[i].destroy();\n        }\n\n        this.points.length = 0;\n        this.points = null;\n        this.colors.length = 0;\n        this.colors = null;\n        this.uvs.length = 0;\n        this.uvs = null;\n        this.indices.length = 0;\n        this.indices = null;\n        this.indexBuffer.destroy();\n        this.indexBuffer = null;\n        this.graphicsData.length = 0;\n        this.graphicsData = null;\n        this.drawCalls.length = 0;\n        this.drawCalls = null;\n        this.batches.length = 0;\n        this.batches = null;\n        this._bounds = null;\n    }\n\n    /**\n     * Check to see if a point is contained within this geometry.\n     *\n     * @param {PIXI.Point} point - Point to check if it's contained.\n     * @return {Boolean} `true` if the point is contained within geometry.\n     */\n    containsPoint(point)\n    {\n        const graphicsData = this.graphicsData;\n\n        for (let i = 0; i < graphicsData.length; ++i)\n        {\n            const data = graphicsData[i];\n\n            if (!data.fillStyle.visible)\n            {\n                continue;\n            }\n\n            // only deal with fills..\n            if (data.shape)\n            {\n                if (data.matrix)\n                {\n                    data.matrix.applyInverse(point, tmpPoint);\n                }\n                else\n                {\n                    tmpPoint.copyFrom(point);\n                }\n\n                if (data.shape.contains(tmpPoint.x, tmpPoint.y))\n                {\n                    if (data.holes)\n                    {\n                        for (let i = 0; i < data.holes.length; i++)\n                        {\n                            const hole = data.holes[i];\n\n                            if (hole.shape.contains(tmpPoint.x, tmpPoint.y))\n                            {\n                                return false;\n                            }\n                        }\n                    }\n\n                    return true;\n                }\n            }\n        }\n\n        return false;\n    }\n\n    /**\n     * Generates intermediate batch data. Either gets converted to drawCalls\n     * or used to convert to batch objects directly by the Graphics object.\n     */\n    updateBatches()\n    {\n        if (this.dirty === this.cacheDirty) return;\n        if (this.graphicsData.length === 0)\n        {\n            this.batchable = true;\n\n            return;\n        }\n\n        if (this.dirty !== this.cacheDirty)\n        {\n            for (let i = 0; i < this.graphicsData.length; i++)\n            {\n                const data = this.graphicsData[i];\n\n                if (data.fillStyle && !data.fillStyle.texture.baseTexture.valid) return;\n                if (data.lineStyle && !data.lineStyle.texture.baseTexture.valid) return;\n            }\n        }\n\n        this.cacheDirty = this.dirty;\n\n        const uvs = this.uvs;\n\n        let batchPart = null;\n        let currentTexture = null;\n        let currentColor = 0;\n        let currentNative = false;\n\n        if (this.batches.length > 0)\n        {\n            batchPart = this.batches[this.batches.length - 1];\n\n            const style = batchPart.style;\n\n            currentTexture = style.texture.baseTexture;\n            currentColor = style.color + style.alpha;\n            currentNative = !!style.native;\n        }\n\n        for (let i = this.shapeIndex; i < this.graphicsData.length; i++)\n        {\n            this.shapeIndex++;\n\n            const data = this.graphicsData[i];\n            const command = fillCommands[data.type];\n\n            const fillStyle = data.fillStyle;\n            const lineStyle = data.lineStyle;\n\n            // build out the shapes points..\n            command.build(data);\n\n            if (data.matrix)\n            {\n                this.transformPoints(data.points, data.matrix);\n            }\n\n            for (let j = 0; j < 2; j++)\n            {\n                const style = (j === 0) ? fillStyle : lineStyle;\n\n                if (!style.visible) continue;\n\n                const nextTexture = style.texture.baseTexture;\n\n                const index = this.indices.length;\n                const attribIndex = this.points.length / 2;\n\n                // close batch if style is different\n                if (batchPart\n                    && (currentTexture !== nextTexture\n                    || currentColor !== (style.color + style.alpha)\n                    || currentNative !== !!style.native))\n                {\n                    batchPart.size = index - batchPart.start;\n                    batchPart.attribSize = attribIndex - batchPart.attribStart;\n\n                    if (batchPart.size > 0)\n                    {\n                        batchPart = null;\n                    }\n                }\n                // spawn new batch if its first batch or previous was closed\n                if (!batchPart)\n                {\n                    batchPart = BATCH_POOL.pop() || new BatchPart();\n                    this.batches.push(batchPart);\n                    nextTexture.wrapMode = WRAP_MODES.REPEAT;\n                    currentTexture = nextTexture;\n                    currentColor = style.color + style.alpha;\n                    currentNative = style.native;\n\n                    batchPart.style = style;\n                    batchPart.start = index;\n                    batchPart.attribStart = attribIndex;\n                }\n\n                const start = this.points.length / 2;\n\n                if (j === 0)\n                {\n                    if (data.holes.length)\n                    {\n                        this.processHoles(data.holes);\n\n                        buildPoly.triangulate(data, this);\n                    }\n                    else\n                    {\n                        command.triangulate(data, this);\n                    }\n                }\n                else\n                {\n                    buildLine(data, this);\n\n                    for (let i = 0; i < data.holes.length; i++)\n                    {\n                        buildLine(data.holes[i], this);\n                    }\n                }\n\n                const size = (this.points.length / 2) - start;\n\n                this.addUvs(this.points, uvs, style.texture, start, size, style.matrix);\n            }\n        }\n\n        const index = this.indices.length;\n        const attrib = this.points.length / 2;\n\n        if (!batchPart)\n        {\n            // there are no visible styles in GraphicsData\n            // its possible that someone wants Graphics just for the bounds\n            this.batchable = true;\n\n            return;\n        }\n\n        batchPart.size = index - batchPart.start;\n        batchPart.attribSize = attrib - batchPart.attribStart;\n        this.indicesUint16 = new Uint16Array(this.indices);\n\n        // TODO make this a const..\n        this.batchable = this.isBatchable();\n\n        if (this.batchable)\n        {\n            this.batchDirty++;\n\n            this.uvsFloat32 = new Float32Array(this.uvs);\n\n            // offset the indices so that it works with the batcher...\n            for (let i = 0; i < this.batches.length; i++)\n            {\n                const batch = this.batches[i];\n\n                for (let j = 0; j < batch.size; j++)\n                {\n                    const index = batch.start + j;\n\n                    this.indicesUint16[index] = this.indicesUint16[index] - batch.attribStart;\n                }\n            }\n        }\n        else\n        {\n            this.buildDrawCalls();\n        }\n    }\n\n    /**\n     * Checks to see if this graphics geometry can be batched.\n     * Currently it needs to be small enough and not contain any native lines.\n     * @protected\n     */\n    isBatchable()\n    {\n        const batches = this.batches;\n\n        for (let i = 0; i < batches.length; i++)\n        {\n            if (batches[i].style.native)\n            {\n                return false;\n            }\n        }\n\n        return (this.points.length < GraphicsGeometry.BATCHABLE_SIZE * 2);\n    }\n\n    /**\n     * Converts intermediate batches data to drawCalls.\n     * @protected\n     */\n    buildDrawCalls()\n    {\n        let TICK = ++BaseTexture._globalBatch;\n\n        for (let i = 0; i < this.drawCalls.length; i++)\n        {\n            this.drawCalls[i].textures.length = 0;\n            DRAW_CALL_POOL.push(this.drawCalls[i]);\n        }\n\n        this.drawCalls.length = 0;\n\n        const uvs = this.uvs;\n        const colors = this.colors;\n        const textureIds = this.textureIds;\n\n        let currentGroup =  DRAW_CALL_POOL.pop() || new BatchDrawCall();\n\n        currentGroup.textureCount = 0;\n        currentGroup.start = 0;\n        currentGroup.size = 0;\n        currentGroup.type = DRAW_MODES.TRIANGLES;\n\n        let textureCount = 0;\n        let currentTexture = null;\n        let textureId = 0;\n        let native = false;\n        let drawMode = DRAW_MODES.TRIANGLES;\n\n        let index = 0;\n\n        this.drawCalls.push(currentGroup);\n\n        // TODO - this can be simplified\n        for (let i = 0; i < this.batches.length; i++)\n        {\n            const data = this.batches[i];\n\n            // TODO add some full on MAX_TEXTURE CODE..\n            const MAX_TEXTURES = 8;\n\n            const style = data.style;\n\n            const nextTexture = style.texture.baseTexture;\n\n            if (native !== !!style.native)\n            {\n                native = style.native;\n                drawMode = native ? DRAW_MODES.LINES : DRAW_MODES.TRIANGLES;\n\n                // force the batch to break!\n                currentTexture = null;\n                textureCount = MAX_TEXTURES;\n                TICK++;\n            }\n\n            if (currentTexture !== nextTexture)\n            {\n                currentTexture = nextTexture;\n\n                if (nextTexture._batchEnabled !== TICK)\n                {\n                    if (textureCount === MAX_TEXTURES)\n                    {\n                        TICK++;\n\n                        textureCount = 0;\n\n                        if (currentGroup.size > 0)\n                        {\n                            currentGroup = DRAW_CALL_POOL.pop() || new BatchDrawCall();\n                            this.drawCalls.push(currentGroup);\n                        }\n\n                        currentGroup.start = index;\n                        currentGroup.size = 0;\n                        currentGroup.textureCount = 0;\n                        currentGroup.type = drawMode;\n                    }\n\n                    // TODO add this to the render part..\n                    nextTexture.touched = 1;// touch;\n                    nextTexture._batchEnabled = TICK;\n                    nextTexture._id = textureCount;\n                    nextTexture.wrapMode = 10497;\n\n                    currentGroup.textures[currentGroup.textureCount++] = nextTexture;\n                    textureCount++;\n                }\n            }\n\n            currentGroup.size += data.size;\n            index += data.size;\n\n            textureId = nextTexture._id;\n\n            this.addColors(colors, style.color, style.alpha, data.attribSize);\n            this.addTextureIds(textureIds, textureId, data.attribSize);\n        }\n\n        BaseTexture._globalBatch = TICK;\n\n        // upload..\n        // merge for now!\n        const verts = this.points;\n\n        // verts are 2 positions.. so we * by 3 as there are 6 properties.. then 4 cos its bytes\n        const glPoints = new ArrayBuffer(verts.length * 3 * 4);\n        const f32 = new Float32Array(glPoints);\n        const u32 = new Uint32Array(glPoints);\n\n        let p = 0;\n\n        for (let i = 0; i < verts.length / 2; i++)\n        {\n            f32[p++] = verts[i * 2];\n            f32[p++] = verts[(i * 2) + 1];\n\n            f32[p++] = uvs[i * 2];\n            f32[p++] = uvs[(i * 2) + 1];\n\n            u32[p++] = colors[i];\n\n            f32[p++] = textureIds[i];\n        }\n\n        this._buffer.update(glPoints);\n        this._indexBuffer.update(this.indicesUint16);\n    }\n\n    /**\n     * Process the holes data.\n     *\n     * @param {PIXI.GraphicsData[]} holes - Holes to render\n     * @protected\n     */\n    processHoles(holes)\n    {\n        for (let i = 0; i < holes.length; i++)\n        {\n            const hole = holes[i];\n\n            const command = fillCommands[hole.type];\n\n            command.build(hole);\n\n            if (hole.matrix)\n            {\n                this.transformPoints(hole.points, hole.matrix);\n            }\n        }\n    }\n\n    /**\n     * Update the local bounds of the object. Expensive to use performance-wise.\n     * @protected\n     */\n    calculateBounds()\n    {\n        let minX = Infinity;\n        let maxX = -Infinity;\n\n        let minY = Infinity;\n        let maxY = -Infinity;\n\n        if (this.graphicsData.length)\n        {\n            let shape = null;\n            let x = 0;\n            let y = 0;\n            let w = 0;\n            let h = 0;\n\n            for (let i = 0; i < this.graphicsData.length; i++)\n            {\n                const data = this.graphicsData[i];\n\n                const type = data.type;\n                const lineWidth = data.lineStyle ? data.lineStyle.width : 0;\n\n                shape = data.shape;\n\n                if (type === SHAPES.RECT || type === SHAPES.RREC)\n                {\n                    x = shape.x - (lineWidth / 2);\n                    y = shape.y - (lineWidth / 2);\n                    w = shape.width + lineWidth;\n                    h = shape.height + lineWidth;\n\n                    minX = x < minX ? x : minX;\n                    maxX = x + w > maxX ? x + w : maxX;\n\n                    minY = y < minY ? y : minY;\n                    maxY = y + h > maxY ? y + h : maxY;\n                }\n                else if (type === SHAPES.CIRC)\n                {\n                    x = shape.x;\n                    y = shape.y;\n                    w = shape.radius + (lineWidth / 2);\n                    h = shape.radius + (lineWidth / 2);\n\n                    minX = x - w < minX ? x - w : minX;\n                    maxX = x + w > maxX ? x + w : maxX;\n\n                    minY = y - h < minY ? y - h : minY;\n                    maxY = y + h > maxY ? y + h : maxY;\n                }\n                else if (type === SHAPES.ELIP)\n                {\n                    x = shape.x;\n                    y = shape.y;\n                    w = shape.width + (lineWidth / 2);\n                    h = shape.height + (lineWidth / 2);\n\n                    minX = x - w < minX ? x - w : minX;\n                    maxX = x + w > maxX ? x + w : maxX;\n\n                    minY = y - h < minY ? y - h : minY;\n                    maxY = y + h > maxY ? y + h : maxY;\n                }\n                else\n                {\n                    // POLY\n                    const points = shape.points;\n                    let x2 = 0;\n                    let y2 = 0;\n                    let dx = 0;\n                    let dy = 0;\n                    let rw = 0;\n                    let rh = 0;\n                    let cx = 0;\n                    let cy = 0;\n\n                    for (let j = 0; j + 2 < points.length; j += 2)\n                    {\n                        x = points[j];\n                        y = points[j + 1];\n                        x2 = points[j + 2];\n                        y2 = points[j + 3];\n                        dx = Math.abs(x2 - x);\n                        dy = Math.abs(y2 - y);\n                        h = lineWidth;\n                        w = Math.sqrt((dx * dx) + (dy * dy));\n\n                        if (w < 1e-9)\n                        {\n                            continue;\n                        }\n\n                        rw = ((h / w * dy) + dx) / 2;\n                        rh = ((h / w * dx) + dy) / 2;\n                        cx = (x2 + x) / 2;\n                        cy = (y2 + y) / 2;\n\n                        minX = cx - rw < minX ? cx - rw : minX;\n                        maxX = cx + rw > maxX ? cx + rw : maxX;\n\n                        minY = cy - rh < minY ? cy - rh : minY;\n                        maxY = cy + rh > maxY ? cy + rh : maxY;\n                    }\n                }\n            }\n        }\n        else\n        {\n            minX = 0;\n            maxX = 0;\n            minY = 0;\n            maxY = 0;\n        }\n\n        const padding = this.boundsPadding;\n\n        this._bounds.minX = minX - padding;\n        this._bounds.maxX = maxX + padding;\n\n        this._bounds.minY = minY - padding;\n        this._bounds.maxY = maxY + padding;\n    }\n\n    /**\n     * Transform points using matrix.\n     *\n     * @protected\n     * @param {number[]} points - Points to transform\n     * @param {PIXI.Matrix} matrix - Transform matrix\n     */\n    transformPoints(points, matrix)\n    {\n        for (let i = 0; i < points.length / 2; i++)\n        {\n            const x = points[(i * 2)];\n            const y = points[(i * 2) + 1];\n\n            points[(i * 2)] = (matrix.a * x) + (matrix.c * y) + matrix.tx;\n            points[(i * 2) + 1] = (matrix.b * x) + (matrix.d * y) + matrix.ty;\n        }\n    }\n\n    /**\n     * Add colors.\n     *\n     * @protected\n     * @param {number[]} colors - List of colors to add to\n     * @param {number} color - Color to add\n     * @param {number} alpha - Alpha to use\n     * @param {number} size - Number of colors to add\n     */\n    addColors(colors, color, alpha, size)\n    {\n        // TODO use the premultiply bits Ivan added\n        const rgb = (color >> 16) + (color & 0xff00) + ((color & 0xff) << 16);\n\n        const rgba =  premultiplyTint(rgb, alpha);\n\n        while (size-- > 0)\n        {\n            colors.push(rgba);\n        }\n    }\n\n    /**\n     * Add texture id that the shader/fragment wants to use.\n     *\n     * @protected\n     * @param {number[]} textureIds\n     * @param {number} id\n     * @param {number} size\n     */\n    addTextureIds(textureIds, id, size)\n    {\n        while (size-- > 0)\n        {\n            textureIds.push(id);\n        }\n    }\n\n    /**\n     * Generates the UVs for a shape.\n     *\n     * @protected\n     * @param {number[]} verts - Vertices\n     * @param {number[]} uvs - UVs\n     * @param {PIXI.Texture} texture - Reference to Texture\n     * @param {number} start - Index buffer start index.\n     * @param {number} size - The size/length for index buffer.\n     * @param {PIXI.Matrix} [matrix] - Optional transform for all points.\n     */\n    addUvs(verts, uvs, texture, start, size, matrix)\n    {\n        let index = 0;\n        const uvsStart = uvs.length;\n        const frame = texture.frame;\n\n        while (index < size)\n        {\n            let x = verts[(start + index) * 2];\n            let y = verts[((start + index) * 2) + 1];\n\n            if (matrix)\n            {\n                const nx = (matrix.a * x) + (matrix.c * y) + matrix.tx;\n\n                y = (matrix.b * x) + (matrix.d * y) + matrix.ty;\n                x = nx;\n            }\n\n            index++;\n\n            uvs.push(x / frame.width, y / frame.height);\n        }\n\n        const baseTexture = texture.baseTexture;\n\n        if (frame.width < baseTexture.width\n            || frame.height < baseTexture.height)\n        {\n            this.adjustUvs(uvs, texture, uvsStart, size);\n        }\n    }\n\n    /**\n     * Modify uvs array according to position of texture region\n     * Does not work with rotated or trimmed textures\n     * @param {number[]} uvs array\n     * @param {PIXI.Texture} texture region\n     * @param {number} start starting index for uvs\n     * @param {number} size how many points to adjust\n     */\n    adjustUvs(uvs, texture, start, size)\n    {\n        const baseTexture = texture.baseTexture;\n        const eps = 1e-6;\n        const finish = start + (size * 2);\n        const frame = texture.frame;\n        const scaleX = frame.width / baseTexture.width;\n        const scaleY = frame.height / baseTexture.height;\n        let offsetX = frame.x / frame.width;\n        let offsetY = frame.y / frame.height;\n        let minX = Math.floor(uvs[start] + eps);\n        let minY = Math.floor(uvs[start + 1] + eps);\n\n        for (let i = start + 2; i < finish; i += 2)\n        {\n            minX = Math.min(minX, Math.floor(uvs[i] + eps));\n            minY = Math.min(minY, Math.floor(uvs[i + 1] + eps));\n        }\n        offsetX -= minX;\n        offsetY -= minY;\n        for (let i = start; i < finish; i += 2)\n        {\n            uvs[i] = (uvs[i] + offsetX) * scaleX;\n            uvs[i + 1] = (uvs[i + 1] + offsetY) * scaleY;\n        }\n    }\n}\n\n/**\n * The maximum number of points to consider an object \"batchable\",\n * able to be batched by the renderer's batch system.\n *\n * @memberof PIXI.GraphicsGeometry\n * @static\n * @member {number} BATCHABLE_SIZE\n * @default 100\n */\nGraphicsGeometry.BATCHABLE_SIZE = 100;\n","import FillStyle from './FillStyle';\n\n/**\n * Represents the line style for Graphics.\n * @memberof PIXI\n * @class\n * @extends PIXI.FillStyle\n */\nexport default class LineStyle extends FillStyle\n{\n    /**\n     * Clones the object\n     *\n     * @return {PIXI.LineStyle}\n     */\n    clone()\n    {\n        const obj = new LineStyle();\n\n        obj.color = this.color;\n        obj.alpha = this.alpha;\n        obj.texture = this.texture;\n        obj.matrix = this.matrix;\n        obj.visible = this.visible;\n        obj.width = this.width;\n        obj.alignment = this.alignment;\n        obj.native = this.native;\n\n        return obj;\n    }\n    /**\n     * Reset the line style to default.\n     */\n    reset()\n    {\n        super.reset();\n\n        // Override default line style color\n        this.color = 0x0;\n\n        /**\n         * The width (thickness) of any lines drawn.\n         *\n         * @member {number}\n         * @default 0\n         */\n        this.width = 0;\n\n        /**\n         * The alignment of any lines drawn (0.5 = middle, 1 = outter, 0 = inner).\n         *\n         * @member {number}\n         * @default 0\n         */\n        this.alignment = 0.5;\n\n        /**\n         * If true the lines will be draw using LINES instead of TRIANGLE_STRIP\n         *\n         * @member {boolean}\n         * @default false\n         */\n        this.native = false;\n    }\n}\n","import { GRAPHICS_CURVES } from '../const';\n\n/**\n * Utilities for bezier curves\n * @class\n * @private\n */\nexport default class BezierUtils\n{\n    /**\n     * Calculate length of bezier curve.\n     * Analytical solution is impossible, since it involves an integral that does not integrate in general.\n     * Therefore numerical solution is used.\n     *\n     * @private\n     * @param {number} fromX - Starting point x\n     * @param {number} fromY - Starting point y\n     * @param {number} cpX - Control point x\n     * @param {number} cpY - Control point y\n     * @param {number} cpX2 - Second Control point x\n     * @param {number} cpY2 - Second Control point y\n     * @param {number} toX - Destination point x\n     * @param {number} toY - Destination point y\n     * @return {number} Length of bezier curve\n     */\n    static curveLength(fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY)\n    {\n        const n = 10;\n        let result = 0.0;\n        let t = 0.0;\n        let t2 = 0.0;\n        let t3 = 0.0;\n        let nt = 0.0;\n        let nt2 = 0.0;\n        let nt3 = 0.0;\n        let x = 0.0;\n        let y = 0.0;\n        let dx = 0.0;\n        let dy = 0.0;\n        let prevX = fromX;\n        let prevY = fromY;\n\n        for (let i = 1; i <= n; ++i)\n        {\n            t = i / n;\n            t2 = t * t;\n            t3 = t2 * t;\n            nt = (1.0 - t);\n            nt2 = nt * nt;\n            nt3 = nt2 * nt;\n\n            x = (nt3 * fromX) + (3.0 * nt2 * t * cpX) + (3.0 * nt * t2 * cpX2) + (t3 * toX);\n            y = (nt3 * fromY) + (3.0 * nt2 * t * cpY) + (3 * nt * t2 * cpY2) + (t3 * toY);\n            dx = prevX - x;\n            dy = prevY - y;\n            prevX = x;\n            prevY = y;\n\n            result += Math.sqrt((dx * dx) + (dy * dy));\n        }\n\n        return result;\n    }\n\n    /**\n     * Calculate the points for a bezier curve and then draws it.\n     *\n     * Ignored from docs since it is not directly exposed.\n     *\n     * @ignore\n     * @param {number} cpX - Control point x\n     * @param {number} cpY - Control point y\n     * @param {number} cpX2 - Second Control point x\n     * @param {number} cpY2 - Second Control point y\n     * @param {number} toX - Destination point x\n     * @param {number} toY - Destination point y\n     * @param {number[]} points - Path array to push points into\n     */\n    static curveTo(cpX, cpY, cpX2, cpY2, toX, toY, points)\n    {\n        const fromX = points[points.length - 2];\n        const fromY = points[points.length - 1];\n\n        points.length -= 2;\n\n        const n = GRAPHICS_CURVES._segmentsCount(\n            BezierUtils.curveLength(fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY)\n        );\n\n        let dt = 0;\n        let dt2 = 0;\n        let dt3 = 0;\n        let t2 = 0;\n        let t3 = 0;\n\n        points.push(fromX, fromY);\n\n        for (let i = 1, j = 0; i <= n; ++i)\n        {\n            j = i / n;\n\n            dt = (1 - j);\n            dt2 = dt * dt;\n            dt3 = dt2 * dt;\n\n            t2 = j * j;\n            t3 = t2 * j;\n\n            points.push(\n                (dt3 * fromX) + (3 * dt2 * j * cpX) + (3 * dt * t2 * cpX2) + (t3 * toX),\n                (dt3 * fromY) + (3 * dt2 * j * cpY) + (3 * dt * t2 * cpY2) + (t3 * toY)\n            );\n        }\n    }\n}\n","import { GRAPHICS_CURVES } from '../const';\n\n/**\n * Utilities for quadratic curves\n * @class\n * @private\n */\nexport default class QuadraticUtils\n{\n    /**\n     * Calculate length of quadratic curve\n     * @see {@link http://www.malczak.linuxpl.com/blog/quadratic-bezier-curve-length/}\n     * for the detailed explanation of math behind this.\n     *\n     * @private\n     * @param {number} fromX - x-coordinate of curve start point\n     * @param {number} fromY - y-coordinate of curve start point\n     * @param {number} cpX - x-coordinate of curve control point\n     * @param {number} cpY - y-coordinate of curve control point\n     * @param {number} toX - x-coordinate of curve end point\n     * @param {number} toY - y-coordinate of curve end point\n     * @return {number} Length of quadratic curve\n     */\n    static curveLength(fromX, fromY, cpX, cpY, toX, toY)\n    {\n        const ax = fromX - (2.0 * cpX) + toX;\n        const ay = fromY - (2.0 * cpY) + toY;\n        const bx = (2.0 * cpX) - (2.0 * fromX);\n        const by = (2.0 * cpY) - (2.0 * fromY);\n        const a = 4.0 * ((ax * ax) + (ay * ay));\n        const b = 4.0 * ((ax * bx) + (ay * by));\n        const c = (bx * bx) + (by * by);\n\n        const s = 2.0 * Math.sqrt(a + b + c);\n        const a2 = Math.sqrt(a);\n        const a32 = 2.0 * a * a2;\n        const c2 = 2.0 * Math.sqrt(c);\n        const ba = b / a2;\n\n        return (\n            (a32 * s)\n                + (a2 * b * (s - c2))\n                + (\n                    ((4.0 * c * a) - (b * b))\n                   * Math.log(((2.0 * a2) + ba + s) / (ba + c2))\n                )\n        ) / (4.0 * a32);\n    }\n\n    /**\n     * Calculate the points for a quadratic bezier curve and then draws it.\n     * Based on: https://stackoverflow.com/questions/785097/how-do-i-implement-a-bezier-curve-in-c\n     *\n     * @private\n     * @param {number} cpX - Control point x\n     * @param {number} cpY - Control point y\n     * @param {number} toX - Destination point x\n     * @param {number} toY - Destination point y\n     * @param {number[]} points - Points to add segments to.\n     */\n    static curveTo(cpX, cpY, toX, toY, points)\n    {\n        const fromX = points[points.length - 2];\n        const fromY = points[points.length - 1];\n\n        const n = GRAPHICS_CURVES._segmentsCount(\n            QuadraticUtils.curveLength(fromX, fromY, cpX, cpY, toX, toY)\n        );\n\n        let xa = 0;\n        let ya = 0;\n\n        for (let i = 1; i <= n; ++i)\n        {\n            const j = i / n;\n\n            xa = fromX + ((cpX - fromX) * j);\n            ya = fromY + ((cpY - fromY) * j);\n\n            points.push(xa + (((cpX + ((toX - cpX) * j)) - xa) * j),\n                ya + (((cpY + ((toY - cpY) * j)) - ya) * j));\n        }\n    }\n}\n","import { GRAPHICS_CURVES } from '../const';\nimport { PI_2 } from '@pixi/math';\n\n/**\n * Utilities for arc curves\n * @class\n * @private\n */\nexport default class ArcUtils\n{\n    /**\n     * The arcTo() method creates an arc/curve between two tangents on the canvas.\n     *\n     * \"borrowed\" from https://code.google.com/p/fxcanvas/ - thanks google!\n     *\n     * @private\n     * @param {number} x1 - The x-coordinate of the beginning of the arc\n     * @param {number} y1 - The y-coordinate of the beginning of the arc\n     * @param {number} x2 - The x-coordinate of the end of the arc\n     * @param {number} y2 - The y-coordinate of the end of the arc\n     * @param {number} radius - The radius of the arc\n     * @return {object} If the arc length is valid, return center of circle, radius and other info otherwise `null`.\n     */\n    static curveTo(x1, y1, x2, y2, radius, points)\n    {\n        const fromX = points[points.length - 2];\n        const fromY = points[points.length - 1];\n\n        const a1 = fromY - y1;\n        const b1 = fromX - x1;\n        const a2 = y2 - y1;\n        const b2 = x2 - x1;\n        const mm = Math.abs((a1 * b2) - (b1 * a2));\n\n        if (mm < 1.0e-8 || radius === 0)\n        {\n            if (points[points.length - 2] !== x1 || points[points.length - 1] !== y1)\n            {\n                points.push(x1, y1);\n            }\n\n            return null;\n        }\n\n        const dd = (a1 * a1) + (b1 * b1);\n        const cc = (a2 * a2) + (b2 * b2);\n        const tt = (a1 * a2) + (b1 * b2);\n        const k1 = radius * Math.sqrt(dd) / mm;\n        const k2 = radius * Math.sqrt(cc) / mm;\n        const j1 = k1 * tt / dd;\n        const j2 = k2 * tt / cc;\n        const cx = (k1 * b2) + (k2 * b1);\n        const cy = (k1 * a2) + (k2 * a1);\n        const px = b1 * (k2 + j1);\n        const py = a1 * (k2 + j1);\n        const qx = b2 * (k1 + j2);\n        const qy = a2 * (k1 + j2);\n        const startAngle = Math.atan2(py - cy, px - cx);\n        const endAngle = Math.atan2(qy - cy, qx - cx);\n\n        return {\n            cx: (cx + x1),\n            cy: (cy + y1),\n            radius,\n            startAngle,\n            endAngle,\n            anticlockwise: (b1 * a2 > b2 * a1),\n        };\n    }\n\n    /**\n     * The arc method creates an arc/curve (used to create circles, or parts of circles).\n     *\n     * @private\n     * @param {number} startX - Start x location of arc\n     * @param {number} startY - Start y location of arc\n     * @param {number} cx - The x-coordinate of the center of the circle\n     * @param {number} cy - The y-coordinate of the center of the circle\n     * @param {number} radius - The radius of the circle\n     * @param {number} startAngle - The starting angle, in radians (0 is at the 3 o'clock position\n     *  of the arc's circle)\n     * @param {number} endAngle - The ending angle, in radians\n     * @param {boolean} anticlockwise - Specifies whether the drawing should be\n     *  counter-clockwise or clockwise. False is default, and indicates clockwise, while true\n     *  indicates counter-clockwise.\n     * @param {number} n - Number of segments\n     * @param {number[]} points - Collection of points to add to\n     */\n    static arc(startX, startY, cx, cy, radius, startAngle, endAngle, anticlockwise, points)\n    {\n        const sweep = endAngle - startAngle;\n        const n = GRAPHICS_CURVES._segmentsCount(\n            Math.abs(sweep) * radius,\n            Math.ceil(Math.abs(sweep) / PI_2) * 40\n        );\n\n        const theta = (sweep) / (n * 2);\n        const theta2 = theta * 2;\n        const cTheta = Math.cos(theta);\n        const sTheta = Math.sin(theta);\n        const segMinus = n - 1;\n        const remainder = (segMinus % 1) / segMinus;\n\n        for (let i = 0; i <= segMinus; ++i)\n        {\n            const real = i + (remainder * i);\n            const angle = ((theta) + startAngle + (theta2 * real));\n            const c = Math.cos(angle);\n            const s = -Math.sin(angle);\n\n            points.push(\n                (((cTheta * c) + (sTheta * s)) * radius) + cx,\n                (((cTheta * -s) + (sTheta * c)) * radius) + cy\n            );\n        }\n    }\n}\n","import { Polygon, PI_2 } from '@pixi/math';\n\n/**\n * Draw a star shape with an arbitrary number of points.\n *\n * @class\n * @extends PIXI.Polygon\n * @memberof PIXI\n * @param {number} x - Center X position of the star\n * @param {number} y - Center Y position of the star\n * @param {number} points - The number of points of the star, must be > 1\n * @param {number} radius - The outer radius of the star\n * @param {number} [innerRadius] - The inner radius between points, default half `radius`\n * @param {number} [rotation=0] - The rotation of the star in radians, where 0 is vertical\n * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n */\nexport default class Star extends Polygon\n{\n    constructor(x, y, points, radius, innerRadius, rotation)\n    {\n        innerRadius = innerRadius || radius / 2;\n\n        const startAngle = (-1 * Math.PI / 2) + rotation;\n        const len = points * 2;\n        const delta = PI_2 / len;\n        const polygon = [];\n\n        for (let i = 0; i < len; i++)\n        {\n            const r = i % 2 ? innerRadius : radius;\n            const angle = (i * delta) + startAngle;\n\n            polygon.push(\n                x + (r * Math.cos(angle)),\n                y + (r * Math.sin(angle))\n            );\n        }\n\n        super(polygon);\n    }\n}\n","import {\n    Circle,\n    Ellipse,\n    PI_2,\n    Point,\n    Polygon,\n    Rectangle,\n    RoundedRectangle,\n    Matrix,\n} from '@pixi/math';\nimport { hex2rgb } from '@pixi/utils';\nimport {\n    Texture,\n    Shader,\n    UniformGroup, State,\n} from '@pixi/core';\nimport FillStyle from './styles/FillStyle';\nimport GraphicsGeometry from './GraphicsGeometry';\nimport LineStyle from './styles/LineStyle';\nimport BezierUtils from './utils/BezierUtils';\nimport QuadraticUtils from './utils/QuadraticUtils';\nimport ArcUtils from './utils/ArcUtils';\nimport Star from './utils/Star';\nimport { BLEND_MODES } from '@pixi/constants';\nimport { Container } from '@pixi/display';\n\nconst temp = new Float32Array(3);\n\n// a default shaders map used by graphics..\nconst DEFAULT_SHADERS = {};\n\n/**\n * The Graphics class contains methods used to draw primitive shapes such as lines, circles and\n * rectangles to the display, and to color and fill them.\n *\n * Note that because Graphics can share a GraphicsGeometry with other instances,\n * it is necessary to call `destroy()` to properly dereference the underlying\n * GraphicsGeometry and avoid a memory leak. Alternatively, keep using the same\n * Graphics instance and call `clear()` between redraws.\n *\n * @class\n * @extends PIXI.Container\n * @memberof PIXI\n */\nexport default class Graphics extends Container\n{\n    /**\n     * @param {PIXI.GraphicsGeometry} [geometry=null] - Geometry to use, if omitted\n     *        will create a new GraphicsGeometry instance.\n     */\n    constructor(geometry = null)\n    {\n        super();\n        /**\n         * Includes vertex positions, face indices, normals, colors, UVs, and\n         * custom attributes within buffers, reducing the cost of passing all\n         * this data to the GPU. Can be shared between multiple Mesh or Graphics objects.\n         * @member {PIXI.GraphicsGeometry}\n         * @readonly\n         */\n        this.geometry = geometry || new GraphicsGeometry();\n\n        this.geometry.refCount++;\n\n        /**\n         * Represents the vertex and fragment shaders that processes the geometry and runs on the GPU.\n         * Can be shared between multiple Graphics objects.\n         * @member {PIXI.Shader}\n         */\n        this.shader = null;\n\n        /**\n         * Represents the WebGL state the Graphics required to render, excludes shader and geometry. E.g.,\n         * blend mode, culling, depth testing, direction of rendering triangles, backface, etc.\n         * @member {PIXI.State}\n         */\n        this.state = State.for2d();\n\n        /**\n         * Current fill style\n         *\n         * @member {PIXI.FillStyle}\n         * @protected\n         */\n        this._fillStyle = new FillStyle();\n\n        /**\n         * Current line style\n         *\n         * @member {PIXI.LineStyle}\n         * @protected\n         */\n        this._lineStyle = new LineStyle();\n\n        /**\n         * Current shape transform matrix.\n         *\n         * @member {PIXI.Matrix}\n         * @protected\n         */\n        this._matrix = null;\n\n        /**\n         * Current hole mode is enabled.\n         *\n         * @member {boolean}\n         * @default false\n         * @protected\n         */\n        this._holeMode = false;\n\n        /**\n         * Current path\n         *\n         * @member {PIXI.Polygon}\n         * @protected\n         */\n        this.currentPath = null;\n\n        /**\n         * When cacheAsBitmap is set to true the graphics object will be rendered as if it was a sprite.\n         * This is useful if your graphics element does not change often, as it will speed up the rendering\n         * of the object in exchange for taking up texture memory. It is also useful if you need the graphics\n         * object to be anti-aliased, because it will be rendered using canvas. This is not recommended if\n         * you are constantly redrawing the graphics element.\n         *\n         * @name cacheAsBitmap\n         * @member {boolean}\n         * @memberof PIXI.Graphics#\n         * @default false\n         */\n\n        /**\n         * A collections of batches! These can be drawn by the renderer batch system.\n         *\n         * @protected\n         * @member {object[]}\n         */\n        this.batches = [];\n\n        /**\n         * Update dirty for limiting calculating tints for batches.\n         *\n         * @protected\n         * @member {number}\n         * @default -1\n         */\n        this.batchTint = -1;\n\n        /**\n         * Copy of the object vertex data.\n         *\n         * @protected\n         * @member {Float32Array}\n         */\n        this.vertexData = null;\n\n        this._transformID = -1;\n        this.batchDirty = -1;\n\n        /**\n         * Renderer plugin for batching\n         *\n         * @member {string}\n         * @default 'batch'\n         */\n        this.pluginName = 'batch';\n\n        // Set default\n        this.tint = 0xFFFFFF;\n        this.blendMode = BLEND_MODES.NORMAL;\n    }\n\n    /**\n     * Creates a new Graphics object with the same values as this one.\n     * Note that the only the properties of the object are cloned, not its transform (position,scale,etc)\n     *\n     * @return {PIXI.Graphics} A clone of the graphics object\n     */\n    clone()\n    {\n        this.finishPoly();\n\n        return new Graphics(this.geometry);\n    }\n\n    /**\n     * The blend mode to be applied to the graphic shape. Apply a value of\n     * `PIXI.BLEND_MODES.NORMAL` to reset the blend mode.\n     *\n     * @member {number}\n     * @default PIXI.BLEND_MODES.NORMAL;\n     * @see PIXI.BLEND_MODES\n     */\n    set blendMode(value)\n    {\n        this.state.blendMode = value;\n    }\n\n    get blendMode()\n    {\n        return this.state.blendMode;\n    }\n\n    /**\n     * The tint applied to the graphic shape. This is a hex value. A value of\n     * 0xFFFFFF will remove any tint effect.\n     *\n     * @member {number}\n     * @default 0xFFFFFF\n     */\n    get tint()\n    {\n        return this._tint;\n    }\n    set tint(value)\n    {\n        this._tint = value;\n    }\n\n    /**\n     * The current fill style.\n     *\n     * @member {PIXI.FillStyle}\n     * @readonly\n     */\n    get fill()\n    {\n        return this._fillStyle;\n    }\n\n    /**\n     * The current line style.\n     *\n     * @member {PIXI.LineStyle}\n     * @readonly\n     */\n    get line()\n    {\n        return this._lineStyle;\n    }\n\n    /**\n     * Specifies the line style used for subsequent calls to Graphics methods such as the lineTo()\n     * method or the drawCircle() method.\n     *\n     * @param {number} [width=0] - width of the line to draw, will update the objects stored style\n     * @param {number} [color=0] - color of the line to draw, will update the objects stored style\n     * @param {number} [alpha=1] - alpha of the line to draw, will update the objects stored style\n     * @param {number} [alignment=0.5] - alignment of the line to draw, (0 = inner, 0.5 = middle, 1 = outter)\n     * @param {boolean} [native=false] - If true the lines will be draw using LINES instead of TRIANGLE_STRIP\n     * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n     */\n    lineStyle(width = 0, color = 0, alpha = 1, alignment = 0.5, native = false)\n    {\n        this.lineTextureStyle(width, Texture.WHITE, color, alpha, null, alignment, native);\n\n        return this;\n    }\n\n    /**\n     * Like line style but support texture for line fill.\n     *\n     * @param {number} [width=0] - width of the line to draw, will update the objects stored style\n     * @param {PIXI.Texture} [texture=PIXI.Texture.WHITE] - Texture to use\n     * @param {number} [color=0] - color of the line to draw, will update the objects stored style\n     * @param {number} [alpha=1] - alpha of the line to draw, will update the objects stored style\n     * @param {PIXI.Matrix} [matrix=null] Texture matrix to transform texture\n     * @param {number} [alignment=0.5] - alignment of the line to draw, (0 = inner, 0.5 = middle, 1 = outter)\n     * @param {boolean} [native=false] - If true the lines will be draw using LINES instead of TRIANGLE_STRIP\n     * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n     */\n    lineTextureStyle(width = 0, texture = Texture.WHITE, color = 0xFFFFFF, alpha = 1,\n        matrix = null, alignment = 0.5, native = false)\n    {\n        if (this.currentPath)\n        {\n            this.startPoly();\n        }\n\n        const visible = width > 0 && alpha > 0;\n\n        if (!visible)\n        {\n            this._lineStyle.reset();\n        }\n        else\n        {\n            if (matrix)\n            {\n                matrix = matrix.clone();\n                matrix.invert();\n            }\n\n            Object.assign(this._lineStyle, {\n                color,\n                width,\n                alpha,\n                matrix,\n                texture,\n                alignment,\n                native,\n                visible,\n            });\n        }\n\n        return this;\n    }\n\n    /**\n     * Start a polygon object internally\n     * @protected\n     */\n    startPoly()\n    {\n        if (this.currentPath)\n        {\n            const points = this.currentPath.points;\n            const len = this.currentPath.points.length;\n\n            if (len > 2)\n            {\n                this.drawShape(this.currentPath);\n                this.currentPath = new Polygon();\n                this.currentPath.closeStroke = false;\n                this.currentPath.points.push(points[len - 2], points[len - 1]);\n            }\n        }\n        else\n        {\n            this.currentPath = new Polygon();\n            this.currentPath.closeStroke = false;\n        }\n    }\n\n    /**\n     * Finish the polygon object.\n     * @protected\n     */\n    finishPoly()\n    {\n        if (this.currentPath)\n        {\n            if (this.currentPath.points.length > 2)\n            {\n                this.drawShape(this.currentPath);\n                this.currentPath = null;\n            }\n            else\n            {\n                this.currentPath.points.length = 0;\n            }\n        }\n    }\n\n    /**\n     * Moves the current drawing position to x, y.\n     *\n     * @param {number} x - the X coordinate to move to\n     * @param {number} y - the Y coordinate to move to\n     * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n     */\n    moveTo(x, y)\n    {\n        this.startPoly();\n        this.currentPath.points[0] = x;\n        this.currentPath.points[1] = y;\n\n        return this;\n    }\n\n    /**\n     * Draws a line using the current line style from the current drawing position to (x, y);\n     * The current drawing position is then set to (x, y).\n     *\n     * @param {number} x - the X coordinate to draw to\n     * @param {number} y - the Y coordinate to draw to\n     * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n     */\n    lineTo(x, y)\n    {\n        if (!this.currentPath)\n        {\n            this.moveTo(0, 0);\n        }\n\n        // remove duplicates..\n        const points = this.currentPath.points;\n        const fromX = points[points.length - 2];\n        const fromY = points[points.length - 1];\n\n        if (fromX !== x || fromY !== y)\n        {\n            points.push(x, y);\n        }\n\n        return this;\n    }\n\n    /**\n     * Initialize the curve\n     *\n     * @protected\n     * @param {number} [x=0]\n     * @param {number} [y=0]\n     */\n    _initCurve(x = 0, y = 0)\n    {\n        if (this.currentPath)\n        {\n            if (this.currentPath.points.length === 0)\n            {\n                this.currentPath.points = [x, y];\n            }\n        }\n        else\n        {\n            this.moveTo(x, y);\n        }\n    }\n\n    /**\n     * Calculate the points for a quadratic bezier curve and then draws it.\n     * Based on: https://stackoverflow.com/questions/785097/how-do-i-implement-a-bezier-curve-in-c\n     *\n     * @param {number} cpX - Control point x\n     * @param {number} cpY - Control point y\n     * @param {number} toX - Destination point x\n     * @param {number} toY - Destination point y\n     * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n     */\n    quadraticCurveTo(cpX, cpY, toX, toY)\n    {\n        this._initCurve();\n\n        const points = this.currentPath.points;\n\n        if (points.length === 0)\n        {\n            this.moveTo(0, 0);\n        }\n\n        QuadraticUtils.curveTo(cpX, cpY, toX, toY, points);\n\n        return this;\n    }\n\n    /**\n     * Calculate the points for a bezier curve and then draws it.\n     *\n     * @param {number} cpX - Control point x\n     * @param {number} cpY - Control point y\n     * @param {number} cpX2 - Second Control point x\n     * @param {number} cpY2 - Second Control point y\n     * @param {number} toX - Destination point x\n     * @param {number} toY - Destination point y\n     * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n     */\n    bezierCurveTo(cpX, cpY, cpX2, cpY2, toX, toY)\n    {\n        this._initCurve();\n\n        BezierUtils.curveTo(cpX, cpY, cpX2, cpY2, toX, toY, this.currentPath.points);\n\n        return this;\n    }\n\n    /**\n     * The arcTo() method creates an arc/curve between two tangents on the canvas.\n     *\n     * \"borrowed\" from https://code.google.com/p/fxcanvas/ - thanks google!\n     *\n     * @param {number} x1 - The x-coordinate of the first tangent point of the arc\n     * @param {number} y1 - The y-coordinate of the first tangent point of the arc\n     * @param {number} x2 - The x-coordinate of the end of the arc\n     * @param {number} y2 - The y-coordinate of the end of the arc\n     * @param {number} radius - The radius of the arc\n     * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n     */\n    arcTo(x1, y1, x2, y2, radius)\n    {\n        this._initCurve(x1, y1);\n\n        const points = this.currentPath.points;\n\n        const result = ArcUtils.curveTo(x1, y1, x2, y2, radius, points);\n\n        if (result)\n        {\n            const { cx, cy, radius, startAngle, endAngle, anticlockwise } = result;\n\n            this.arc(cx, cy, radius, startAngle, endAngle, anticlockwise);\n        }\n\n        return this;\n    }\n\n    /**\n     * The arc method creates an arc/curve (used to create circles, or parts of circles).\n     *\n     * @param {number} cx - The x-coordinate of the center of the circle\n     * @param {number} cy - The y-coordinate of the center of the circle\n     * @param {number} radius - The radius of the circle\n     * @param {number} startAngle - The starting angle, in radians (0 is at the 3 o'clock position\n     *  of the arc's circle)\n     * @param {number} endAngle - The ending angle, in radians\n     * @param {boolean} [anticlockwise=false] - Specifies whether the drawing should be\n     *  counter-clockwise or clockwise. False is default, and indicates clockwise, while true\n     *  indicates counter-clockwise.\n     * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n     */\n    arc(cx, cy, radius, startAngle, endAngle, anticlockwise = false)\n    {\n        if (startAngle === endAngle)\n        {\n            return this;\n        }\n\n        if (!anticlockwise && endAngle <= startAngle)\n        {\n            endAngle += PI_2;\n        }\n        else if (anticlockwise && startAngle <= endAngle)\n        {\n            startAngle += PI_2;\n        }\n\n        const sweep = endAngle - startAngle;\n\n        if (sweep === 0)\n        {\n            return this;\n        }\n\n        const startX = cx + (Math.cos(startAngle) * radius);\n        const startY = cy + (Math.sin(startAngle) * radius);\n        const eps = this.geometry.closePointEps;\n\n        // If the currentPath exists, take its points. Otherwise call `moveTo` to start a path.\n        let points = this.currentPath ? this.currentPath.points : null;\n\n        if (points)\n        {\n            // TODO: make a better fix.\n\n            // We check how far our start is from the last existing point\n            const xDiff = Math.abs(points[points.length - 2] - startX);\n            const yDiff = Math.abs(points[points.length - 1] - startY);\n\n            if (xDiff < eps && yDiff < eps)\n            {\n                // If the point is very close, we don't add it, since this would lead to artifacts\n                // during tessellation due to floating point imprecision.\n            }\n            else\n            {\n                points.push(startX, startY);\n            }\n        }\n        else\n        {\n            this.moveTo(startX, startY);\n            points = this.currentPath.points;\n        }\n\n        ArcUtils.arc(startX, startY, cx, cy, radius, startAngle, endAngle, anticlockwise, points);\n\n        return this;\n    }\n\n    /**\n     * Specifies a simple one-color fill that subsequent calls to other Graphics methods\n     * (such as lineTo() or drawCircle()) use when drawing.\n     *\n     * @param {number} [color=0] - the color of the fill\n     * @param {number} [alpha=1] - the alpha of the fill\n     * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n     */\n    beginFill(color = 0, alpha = 1)\n    {\n        return this.beginTextureFill(Texture.WHITE, color, alpha);\n    }\n\n    /**\n     * Begin the texture fill\n     *\n     * @param {PIXI.Texture} [texture=PIXI.Texture.WHITE] - Texture to fill\n     * @param {number} [color=0xffffff] - Background to fill behind texture\n     * @param {number} [alpha=1] - Alpha of fill\n     * @param {PIXI.Matrix} [matrix=null] - Transform matrix\n     * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n     */\n    beginTextureFill(texture = Texture.WHITE, color = 0xFFFFFF, alpha = 1, matrix = null)\n    {\n        if (this.currentPath)\n        {\n            this.startPoly();\n        }\n\n        const visible = alpha > 0;\n\n        if (!visible)\n        {\n            this._fillStyle.reset();\n        }\n        else\n        {\n            if (matrix)\n            {\n                matrix = matrix.clone();\n                matrix.invert();\n            }\n\n            Object.assign(this._fillStyle, {\n                color,\n                alpha,\n                texture,\n                matrix,\n                visible,\n            });\n        }\n\n        return this;\n    }\n\n    /**\n     * Applies a fill to the lines and shapes that were added since the last call to the beginFill() method.\n     *\n     * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n     */\n    endFill()\n    {\n        this.finishPoly();\n\n        this._fillStyle.reset();\n\n        return this;\n    }\n\n    /**\n     * Draws a rectangle shape.\n     *\n     * @param {number} x - The X coord of the top-left of the rectangle\n     * @param {number} y - The Y coord of the top-left of the rectangle\n     * @param {number} width - The width of the rectangle\n     * @param {number} height - The height of the rectangle\n     * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n     */\n    drawRect(x, y, width, height)\n    {\n        return this.drawShape(new Rectangle(x, y, width, height));\n    }\n\n    /**\n     * Draw a rectangle shape with rounded/beveled corners.\n     *\n     * @param {number} x - The X coord of the top-left of the rectangle\n     * @param {number} y - The Y coord of the top-left of the rectangle\n     * @param {number} width - The width of the rectangle\n     * @param {number} height - The height of the rectangle\n     * @param {number} radius - Radius of the rectangle corners\n     * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n     */\n    drawRoundedRect(x, y, width, height, radius)\n    {\n        return this.drawShape(new RoundedRectangle(x, y, width, height, radius));\n    }\n\n    /**\n     * Draws a circle.\n     *\n     * @param {number} x - The X coordinate of the center of the circle\n     * @param {number} y - The Y coordinate of the center of the circle\n     * @param {number} radius - The radius of the circle\n     * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n     */\n    drawCircle(x, y, radius)\n    {\n        return this.drawShape(new Circle(x, y, radius));\n    }\n\n    /**\n     * Draws an ellipse.\n     *\n     * @param {number} x - The X coordinate of the center of the ellipse\n     * @param {number} y - The Y coordinate of the center of the ellipse\n     * @param {number} width - The half width of the ellipse\n     * @param {number} height - The half height of the ellipse\n     * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n     */\n    drawEllipse(x, y, width, height)\n    {\n        return this.drawShape(new Ellipse(x, y, width, height));\n    }\n\n    /**\n     * Draws a polygon using the given path.\n     *\n     * @param {number[]|PIXI.Point[]|PIXI.Polygon} path - The path data used to construct the polygon.\n     * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n     */\n    drawPolygon(path)\n    {\n        // prevents an argument assignment deopt\n        // see section 3.1: https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#3-managing-arguments\n        let points = path;\n\n        let closeStroke = true;// !!this._fillStyle;\n\n        // check if data has points..\n        if (points.points)\n        {\n            closeStroke = points.closeStroke;\n            points = points.points;\n        }\n\n        if (!Array.isArray(points))\n        {\n            // prevents an argument leak deopt\n            // see section 3.2: https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#3-managing-arguments\n            points = new Array(arguments.length);\n\n            for (let i = 0; i < points.length; ++i)\n            {\n                points[i] = arguments[i]; // eslint-disable-line prefer-rest-params\n            }\n        }\n\n        const shape = new Polygon(points);\n\n        shape.closeStroke = closeStroke;\n\n        this.drawShape(shape);\n\n        return this;\n    }\n\n    /**\n     * Draw any shape.\n     *\n     * @param {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} shape - Shape to draw\n     * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n     */\n    drawShape(shape)\n    {\n        if (!this._holeMode)\n        {\n            this.geometry.drawShape(\n                shape,\n                this._fillStyle.clone(),\n                this._lineStyle.clone(),\n                this._matrix\n            );\n        }\n        else\n        {\n            this.geometry.drawHole(shape, this._matrix);\n        }\n\n        return this;\n    }\n\n    /**\n     * Draw a star shape with an arbitrary number of points.\n     *\n     * @param {number} x - Center X position of the star\n     * @param {number} y - Center Y position of the star\n     * @param {number} points - The number of points of the star, must be > 1\n     * @param {number} radius - The outer radius of the star\n     * @param {number} [innerRadius] - The inner radius between points, default half `radius`\n     * @param {number} [rotation=0] - The rotation of the star in radians, where 0 is vertical\n     * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n     */\n    drawStar(x, y, points, radius, innerRadius, rotation = 0)\n    {\n        return this.drawPolygon(new Star(x, y, points, radius, innerRadius, rotation));\n    }\n\n    /**\n     * Clears the graphics that were drawn to this Graphics object, and resets fill and line style settings.\n     *\n     * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n     */\n    clear()\n    {\n        this.geometry.clear();\n        this._lineStyle.reset();\n        this._fillStyle.reset();\n\n        this._matrix = null;\n        this._holeMode = false;\n        this.currentPath = null;\n\n        return this;\n    }\n\n    /**\n     * True if graphics consists of one rectangle, and thus, can be drawn like a Sprite and\n     * masked with gl.scissor.\n     *\n     * @returns {boolean} True if only 1 rect.\n     */\n    isFastRect()\n    {\n        // will fix this!\n        return false;\n        // this.graphicsData.length === 1\n        //  && this.graphicsData[0].shape.type === SHAPES.RECT\n        // && !this.graphicsData[0].lineWidth;\n    }\n\n    /**\n     * Renders the object using the WebGL renderer\n     *\n     * @protected\n     * @param {PIXI.Renderer} renderer - The renderer\n     */\n    _render(renderer)\n    {\n        this.finishPoly();\n\n        const geometry = this.geometry;\n\n        // batch part..\n        // batch it!\n        geometry.updateBatches();\n\n        if (geometry.batchable)\n        {\n            if (this.batchDirty !== geometry.batchDirty)\n            {\n                this._populateBatches();\n            }\n\n            this._renderBatched(renderer);\n        }\n        else\n        {\n            // no batching...\n            renderer.batch.flush();\n\n            this._renderDirect(renderer);\n        }\n    }\n\n    /**\n     * Populating batches for rendering\n     *\n     * @protected\n     */\n    _populateBatches()\n    {\n        const geometry = this.geometry;\n        const blendMode = this.blendMode;\n\n        this.batches = [];\n        this.batchTint = -1;\n        this._transformID = -1;\n        this.batchDirty = geometry.batchDirty;\n\n        this.vertexData = new Float32Array(geometry.points);\n\n        for (let i = 0, l = geometry.batches.length; i < l; i++)\n        {\n            const gI = geometry.batches[i];\n            const color = gI.style.color;\n            const vertexData = new Float32Array(this.vertexData.buffer,\n                gI.attribStart * 4 * 2,\n                gI.attribSize * 2);\n\n            const uvs = new Float32Array(geometry.uvsFloat32.buffer,\n                gI.attribStart * 4 * 2,\n                gI.attribSize * 2);\n\n            const indices = new Uint16Array(geometry.indicesUint16.buffer,\n                gI.start * 2,\n                gI.size);\n\n            const batch = {\n                vertexData,\n                blendMode,\n                indices,\n                uvs,\n                _batchRGB: hex2rgb(color),\n                _tintRGB: color,\n                _texture: gI.style.texture,\n                alpha: gI.style.alpha,\n                worldAlpha: 1 };\n\n            this.batches[i] = batch;\n        }\n    }\n\n    /**\n     * Renders the batches using the BathedRenderer plugin\n     *\n     * @protected\n     * @param {PIXI.Renderer} renderer - The renderer\n     */\n    _renderBatched(renderer)\n    {\n        if (!this.batches.length)\n        {\n            return;\n        }\n\n        renderer.batch.setObjectRenderer(renderer.plugins[this.pluginName]);\n\n        this.calculateVertices();\n        this.calculateTints();\n\n        for (let i = 0, l = this.batches.length; i < l; i++)\n        {\n            const batch = this.batches[i];\n\n            batch.worldAlpha = this.worldAlpha * batch.alpha;\n\n            renderer.plugins[this.pluginName].render(batch);\n        }\n    }\n\n    /**\n     * Renders the graphics direct\n     *\n     * @protected\n     * @param {PIXI.Renderer} renderer - The renderer\n     */\n    _renderDirect(renderer)\n    {\n        const shader = this._resolveDirectShader(renderer);\n\n        const geometry = this.geometry;\n        const tint = this.tint;\n        const worldAlpha = this.worldAlpha;\n        const uniforms = shader.uniforms;\n        const drawCalls = geometry.drawCalls;\n\n        // lets set the transfomr\n        uniforms.translationMatrix = this.transform.worldTransform;\n\n        // and then lets set the tint..\n        uniforms.tint[0] = (((tint >> 16) & 0xFF) / 255) * worldAlpha;\n        uniforms.tint[1] = (((tint >> 8) & 0xFF) / 255) * worldAlpha;\n        uniforms.tint[2] = ((tint & 0xFF) / 255) * worldAlpha;\n        uniforms.tint[3] = worldAlpha;\n\n        // the first draw call, we can set the uniforms of the shader directly here.\n\n        // this means that we can tack advantage of the sync function of pixi!\n        // bind and sync uniforms..\n        // there is a way to optimise this..\n        renderer.shader.bind(shader);\n        renderer.geometry.bind(geometry, shader);\n\n        // set state..\n        renderer.state.set(this.state);\n\n        // then render the rest of them...\n        for (let i = 0, l = drawCalls.length; i < l; i++)\n        {\n            this._renderDrawCallDirect(renderer, geometry.drawCalls[i]);\n        }\n    }\n\n    /**\n     * Renders specific DrawCall\n     *\n     * @param {PIXI.Renderer} renderer\n     * @param {PIXI.BatchDrawCall} drawCall\n     */\n    _renderDrawCallDirect(renderer, drawCall)\n    {\n        const groupTextureCount = drawCall.textureCount;\n\n        for (let j = 0; j < groupTextureCount; j++)\n        {\n            renderer.texture.bind(drawCall.textures[j], j);\n        }\n\n        renderer.geometry.draw(drawCall.type, drawCall.size, drawCall.start);\n    }\n\n    /**\n     * Resolves shader for direct rendering\n     *\n     * @protected\n     * @param {PIXI.Renderer} renderer - The renderer\n     */\n    _resolveDirectShader(renderer)\n    {\n        let shader = this.shader;\n\n        const pluginName = this.pluginName;\n\n        if (!shader)\n        {\n            // if there is no shader here, we can use the default shader.\n            // and that only gets created if we actually need it..\n            // but may be more than one plugins for graphics\n            if (!DEFAULT_SHADERS[pluginName])\n            {\n                const sampleValues = new Int32Array(16);\n\n                for (let i = 0; i < 16; i++)\n                {\n                    sampleValues[i] = i;\n                }\n\n                const uniforms = {\n                    tint: new Float32Array([1, 1, 1, 1]),\n                    translationMatrix: new Matrix(),\n                    default: UniformGroup.from({ uSamplers: sampleValues }, true),\n                };\n\n                const program = renderer.plugins[pluginName]._shader.program;\n\n                DEFAULT_SHADERS[pluginName] = new Shader(program, uniforms);\n            }\n\n            shader = DEFAULT_SHADERS[pluginName];\n        }\n\n        return shader;\n    }\n\n    /**\n     * Retrieves the bounds of the graphic shape as a rectangle object\n     *\n     * @protected\n     */\n    _calculateBounds()\n    {\n        this.finishPoly();\n        const lb = this.geometry.bounds;\n\n        this._bounds.addFrame(this.transform, lb.minX, lb.minY, lb.maxX, lb.maxY);\n    }\n\n    /**\n     * Tests if a point is inside this graphics object\n     *\n     * @param {PIXI.Point} point - the point to test\n     * @return {boolean} the result of the test\n     */\n    containsPoint(point)\n    {\n        this.worldTransform.applyInverse(point, Graphics._TEMP_POINT);\n\n        return this.geometry.containsPoint(Graphics._TEMP_POINT);\n    }\n\n    /**\n     * Recalcuate the tint by applying tin to batches using Graphics tint.\n     * @protected\n     */\n    calculateTints()\n    {\n        if (this.batchTint !== this.tint)\n        {\n            this.batchTint = this.tint;\n\n            const tintRGB = hex2rgb(this.tint, temp);\n\n            for (let i = 0; i < this.batches.length; i++)\n            {\n                const batch = this.batches[i];\n\n                const batchTint = batch._batchRGB;\n\n                const r = (tintRGB[0] * batchTint[0]) * 255;\n                const g = (tintRGB[1] * batchTint[1]) * 255;\n                const b = (tintRGB[2] * batchTint[2]) * 255;\n\n                // TODO Ivan, can this be done in one go?\n                const color = (r << 16) + (g << 8) + (b | 0);\n\n                batch._tintRGB = (color >> 16)\n                        + (color & 0xff00)\n                        + ((color & 0xff) << 16);\n            }\n        }\n    }\n\n    /**\n     * If there's a transform update or a change to the shape of the\n     * geometry, recaculate the vertices.\n     * @protected\n     */\n    calculateVertices()\n    {\n        if (this._transformID === this.transform._worldID)\n        {\n            return;\n        }\n\n        this._transformID = this.transform._worldID;\n\n        const wt = this.transform.worldTransform;\n        const a = wt.a;\n        const b = wt.b;\n        const c = wt.c;\n        const d = wt.d;\n        const tx = wt.tx;\n        const ty = wt.ty;\n\n        const data = this.geometry.points;// batch.vertexDataOriginal;\n        const vertexData = this.vertexData;\n\n        let count = 0;\n\n        for (let i = 0; i < data.length; i += 2)\n        {\n            const x = data[i];\n            const y = data[i + 1];\n\n            vertexData[count++] = (a * x) + (c * y) + tx;\n            vertexData[count++] = (d * y) + (b * x) + ty;\n        }\n    }\n\n    /**\n     * Closes the current path.\n     *\n     * @return {PIXI.Graphics} Returns itself.\n     */\n    closePath()\n    {\n        const currentPath = this.currentPath;\n\n        if (currentPath)\n        {\n            // we don't need to add extra point in the end because buildLine will take care of that\n            currentPath.closeStroke = true;\n        }\n\n        return this;\n    }\n\n    /**\n     * Apply a matrix to the positional data.\n     *\n     * @param {PIXI.Matrix} matrix - Matrix to use for transform current shape.\n     * @return {PIXI.Graphics} Returns itself.\n     */\n    setMatrix(matrix)\n    {\n        this._matrix = matrix;\n\n        return this;\n    }\n\n    /**\n     * Begin adding holes to the last draw shape\n     * IMPORTANT: holes must be fully inside a shape to work\n     * Also weirdness ensues if holes overlap!\n     * Ellipses, Circles, Rectangles and Rounded Rectangles cannot be holes or host for holes in CanvasRenderer,\n     * please use `moveTo` `lineTo`, `quadraticCurveTo` if you rely on pixi-legacy bundle.\n     * @return {PIXI.Graphics} Returns itself.\n     */\n    beginHole()\n    {\n        this.finishPoly();\n        this._holeMode = true;\n\n        return this;\n    }\n\n    /**\n     * End adding holes to the last draw shape\n     * @return {PIXI.Graphics} Returns itself.\n     */\n    endHole()\n    {\n        this.finishPoly();\n        this._holeMode = false;\n\n        return this;\n    }\n\n    /**\n     * Destroys the Graphics object.\n     *\n     * @param {object|boolean} [options] - Options parameter. A boolean will act as if all\n     *  options have been set to that value\n     * @param {boolean} [options.children=false] - if set to true, all the children will have\n     *  their destroy method called as well. 'options' will be passed on to those calls.\n     * @param {boolean} [options.texture=false] - Only used for child Sprites if options.children is set to true\n     *  Should it destroy the texture of the child sprite\n     * @param {boolean} [options.baseTexture=false] - Only used for child Sprites if options.children is set to true\n     *  Should it destroy the base texture of the child sprite\n     */\n    destroy(options)\n    {\n        super.destroy(options);\n\n        this.geometry.refCount--;\n        if (this.geometry.refCount === 0)\n        {\n            this.geometry.dispose();\n        }\n\n        this._matrix = null;\n        this.currentPath = null;\n        this._lineStyle.destroy();\n        this._lineStyle = null;\n        this._fillStyle.destroy();\n        this._fillStyle = null;\n        this.geometry = null;\n        this.shader = null;\n        this.vertexData = null;\n        this.batches.length = 0;\n        this.batches = null;\n\n        super.destroy(options);\n    }\n}\n\n/**\n * Temporary point to use for containsPoint\n *\n * @static\n * @private\n * @member {PIXI.Point}\n */\nGraphics._TEMP_POINT = new Point();\n","import { Point, ObservablePoint, Rectangle } from '@pixi/math';\nimport { sign } from '@pixi/utils';\nimport { Texture } from '@pixi/core';\nimport { BLEND_MODES } from '@pixi/constants';\nimport { Container } from '@pixi/display';\nimport { settings } from '@pixi/settings';\n\nconst tempPoint = new Point();\nconst indices = new Uint16Array([0, 1, 2, 0, 2, 3]);\n\n/**\n * The Sprite object is the base for all textured objects that are rendered to the screen\n*\n * A sprite can be created directly from an image like this:\n *\n * ```js\n * let sprite = PIXI.Sprite.from('assets/image.png');\n * ```\n *\n * The more efficient way to create sprites is using a {@link PIXI.Spritesheet},\n * as swapping base textures when rendering to the screen is inefficient.\n *\n * ```js\n * PIXI.Loader.shared.add(\"assets/spritesheet.json\").load(setup);\n *\n * function setup() {\n *   let sheet = PIXI.Loader.shared.resources[\"assets/spritesheet.json\"].spritesheet;\n *   let sprite = new PIXI.Sprite(sheet.textures[\"image.png\"]);\n *   ...\n * }\n * ```\n *\n * @class\n * @extends PIXI.Container\n * @memberof PIXI\n */\nexport default class Sprite extends Container\n{\n    /**\n     * @param {PIXI.Texture} [texture] - The texture for this sprite.\n     */\n    constructor(texture)\n    {\n        super();\n\n        /**\n         * The anchor point defines the normalized coordinates\n         * in the texture that map to the position of this\n         * sprite.\n         *\n         * By default, this is `(0,0)` (or `texture.defaultAnchor`\n         * if you have modified that), which means the position\n         * `(x,y)` of this `Sprite` will be the top-left corner.\n         *\n         * Note: Updating `texture.defaultAnchor` after\n         * constructing a `Sprite` does _not_ update its anchor.\n         *\n         * {@link https://docs.cocos2d-x.org/cocos2d-x/en/sprites/manipulation.html}\n         *\n         * @default `texture.defaultAnchor`\n         * @member {PIXI.ObservablePoint}\n         * @private\n         */\n        this._anchor = new ObservablePoint(\n            this._onAnchorUpdate,\n            this,\n            (texture ? texture.defaultAnchor.x : 0),\n            (texture ? texture.defaultAnchor.y : 0)\n        );\n\n        /**\n         * The texture that the sprite is using\n         *\n         * @private\n         * @member {PIXI.Texture}\n         */\n        this._texture = null;\n\n        /**\n         * The width of the sprite (this is initially set by the texture)\n         *\n         * @private\n         * @member {number}\n         */\n        this._width = 0;\n\n        /**\n         * The height of the sprite (this is initially set by the texture)\n         *\n         * @private\n         * @member {number}\n         */\n        this._height = 0;\n\n        /**\n         * The tint applied to the sprite. This is a hex value. A value of 0xFFFFFF will remove any tint effect.\n         *\n         * @private\n         * @member {number}\n         * @default 0xFFFFFF\n         */\n        this._tint = null;\n        this._tintRGB = null;\n        this.tint = 0xFFFFFF;\n\n        /**\n         * The blend mode to be applied to the sprite. Apply a value of `PIXI.BLEND_MODES.NORMAL` to reset the blend mode.\n         *\n         * @member {number}\n         * @default PIXI.BLEND_MODES.NORMAL\n         * @see PIXI.BLEND_MODES\n         */\n        this.blendMode = BLEND_MODES.NORMAL;\n\n        /**\n         * The shader that will be used to render the sprite. Set to null to remove a current shader.\n         *\n         * @member {PIXI.Filter|PIXI.Shader}\n         */\n        this.shader = null;\n\n        /**\n         * Cached tint value so we can tell when the tint is changed.\n         * Value is used for 2d CanvasRenderer.\n         *\n         * @protected\n         * @member {number}\n         * @default 0xFFFFFF\n         */\n        this._cachedTint = 0xFFFFFF;\n\n        /**\n         * this is used to store the uvs data of the sprite, assigned at the same time\n         * as the vertexData in calculateVertices()\n         *\n         * @private\n         * @member {Float32Array}\n         */\n        this.uvs = null;\n\n        // call texture setter\n        this.texture = texture || Texture.EMPTY;\n\n        /**\n         * this is used to store the vertex data of the sprite (basically a quad)\n         *\n         * @private\n         * @member {Float32Array}\n         */\n        this.vertexData = new Float32Array(8);\n\n        /**\n         * This is used to calculate the bounds of the object IF it is a trimmed sprite\n         *\n         * @private\n         * @member {Float32Array}\n         */\n        this.vertexTrimmedData = null;\n\n        this._transformID = -1;\n        this._textureID = -1;\n\n        this._transformTrimmedID = -1;\n        this._textureTrimmedID = -1;\n\n        // Batchable stuff..\n        // TODO could make this a mixin?\n        this.indices = indices;\n        this.size = 4;\n        this.start = 0;\n\n        /**\n         * Plugin that is responsible for rendering this element.\n         * Allows to customize the rendering process without overriding '_render' & '_renderCanvas' methods.\n         *\n         * @member {string}\n         * @default 'batch'\n         */\n        this.pluginName = 'batch';\n\n        /**\n         * used to fast check if a sprite is.. a sprite!\n         * @member {boolean}\n         */\n        this.isSprite = true;\n\n        /**\n         * Internal roundPixels field\n         *\n         * @member {boolean}\n         * @private\n         */\n        this._roundPixels = settings.ROUND_PIXELS;\n    }\n\n    /**\n     * When the texture is updated, this event will fire to update the scale and frame\n     *\n     * @private\n     */\n    _onTextureUpdate()\n    {\n        this._textureID = -1;\n        this._textureTrimmedID = -1;\n        this._cachedTint = 0xFFFFFF;\n\n        // so if _width is 0 then width was not set..\n        if (this._width)\n        {\n            this.scale.x = sign(this.scale.x) * this._width / this._texture.orig.width;\n        }\n\n        if (this._height)\n        {\n            this.scale.y = sign(this.scale.y) * this._height / this._texture.orig.height;\n        }\n    }\n\n    /**\n     * Called when the anchor position updates.\n     *\n     * @private\n     */\n    _onAnchorUpdate()\n    {\n        this._transformID = -1;\n        this._transformTrimmedID = -1;\n    }\n\n    /**\n     * calculates worldTransform * vertices, store it in vertexData\n     */\n    calculateVertices()\n    {\n        const texture = this._texture;\n\n        if (this._transformID === this.transform._worldID && this._textureID === texture._updateID)\n        {\n            return;\n        }\n\n        // update texture UV here, because base texture can be changed without calling `_onTextureUpdate`\n        if (this._textureID !== texture._updateID)\n        {\n            this.uvs = this._texture._uvs.uvsFloat32;\n        }\n\n        this._transformID = this.transform._worldID;\n        this._textureID = texture._updateID;\n\n        // set the vertex data\n\n        const wt = this.transform.worldTransform;\n        const a = wt.a;\n        const b = wt.b;\n        const c = wt.c;\n        const d = wt.d;\n        const tx = wt.tx;\n        const ty = wt.ty;\n        const vertexData = this.vertexData;\n        const trim = texture.trim;\n        const orig = texture.orig;\n        const anchor = this._anchor;\n\n        let w0 = 0;\n        let w1 = 0;\n        let h0 = 0;\n        let h1 = 0;\n\n        if (trim)\n        {\n            // if the sprite is trimmed and is not a tilingsprite then we need to add the extra\n            // space before transforming the sprite coords.\n            w1 = trim.x - (anchor._x * orig.width);\n            w0 = w1 + trim.width;\n\n            h1 = trim.y - (anchor._y * orig.height);\n            h0 = h1 + trim.height;\n        }\n        else\n        {\n            w1 = -anchor._x * orig.width;\n            w0 = w1 + orig.width;\n\n            h1 = -anchor._y * orig.height;\n            h0 = h1 + orig.height;\n        }\n\n        // xy\n        vertexData[0] = (a * w1) + (c * h1) + tx;\n        vertexData[1] = (d * h1) + (b * w1) + ty;\n\n        // xy\n        vertexData[2] = (a * w0) + (c * h1) + tx;\n        vertexData[3] = (d * h1) + (b * w0) + ty;\n\n        // xy\n        vertexData[4] = (a * w0) + (c * h0) + tx;\n        vertexData[5] = (d * h0) + (b * w0) + ty;\n\n        // xy\n        vertexData[6] = (a * w1) + (c * h0) + tx;\n        vertexData[7] = (d * h0) + (b * w1) + ty;\n\n        if (this._roundPixels)\n        {\n            for (let i = 0; i < 8; i++)\n            {\n                vertexData[i] = Math.round(vertexData[i]);\n            }\n        }\n    }\n\n    /**\n     * calculates worldTransform * vertices for a non texture with a trim. store it in vertexTrimmedData\n     * This is used to ensure that the true width and height of a trimmed texture is respected\n     */\n    calculateTrimmedVertices()\n    {\n        if (!this.vertexTrimmedData)\n        {\n            this.vertexTrimmedData = new Float32Array(8);\n        }\n        else if (this._transformTrimmedID === this.transform._worldID && this._textureTrimmedID === this._texture._updateID)\n        {\n            return;\n        }\n\n        this._transformTrimmedID = this.transform._worldID;\n        this._textureTrimmedID = this._texture._updateID;\n\n        // lets do some special trim code!\n        const texture = this._texture;\n        const vertexData = this.vertexTrimmedData;\n        const orig = texture.orig;\n        const anchor = this._anchor;\n\n        // lets calculate the new untrimmed bounds..\n        const wt = this.transform.worldTransform;\n        const a = wt.a;\n        const b = wt.b;\n        const c = wt.c;\n        const d = wt.d;\n        const tx = wt.tx;\n        const ty = wt.ty;\n\n        const w1 = -anchor._x * orig.width;\n        const w0 = w1 + orig.width;\n\n        const h1 = -anchor._y * orig.height;\n        const h0 = h1 + orig.height;\n\n        // xy\n        vertexData[0] = (a * w1) + (c * h1) + tx;\n        vertexData[1] = (d * h1) + (b * w1) + ty;\n\n        // xy\n        vertexData[2] = (a * w0) + (c * h1) + tx;\n        vertexData[3] = (d * h1) + (b * w0) + ty;\n\n        // xy\n        vertexData[4] = (a * w0) + (c * h0) + tx;\n        vertexData[5] = (d * h0) + (b * w0) + ty;\n\n        // xy\n        vertexData[6] = (a * w1) + (c * h0) + tx;\n        vertexData[7] = (d * h0) + (b * w1) + ty;\n    }\n\n    /**\n    *\n    * Renders the object using the WebGL renderer\n    *\n    * @protected\n    * @param {PIXI.Renderer} renderer - The webgl renderer to use.\n    */\n    _render(renderer)\n    {\n        this.calculateVertices();\n\n        renderer.batch.setObjectRenderer(renderer.plugins[this.pluginName]);\n        renderer.plugins[this.pluginName].render(this);\n    }\n\n    /**\n     * Updates the bounds of the sprite.\n     *\n     * @protected\n     */\n    _calculateBounds()\n    {\n        const trim = this._texture.trim;\n        const orig = this._texture.orig;\n\n        // First lets check to see if the current texture has a trim..\n        if (!trim || (trim.width === orig.width && trim.height === orig.height))\n        {\n            // no trim! lets use the usual calculations..\n            this.calculateVertices();\n            this._bounds.addQuad(this.vertexData);\n        }\n        else\n        {\n            // lets calculate a special trimmed bounds...\n            this.calculateTrimmedVertices();\n            this._bounds.addQuad(this.vertexTrimmedData);\n        }\n    }\n\n    /**\n     * Gets the local bounds of the sprite object.\n     *\n     * @param {PIXI.Rectangle} [rect] - The output rectangle.\n     * @return {PIXI.Rectangle} The bounds.\n     */\n    getLocalBounds(rect)\n    {\n        // we can do a fast local bounds if the sprite has no children!\n        if (this.children.length === 0)\n        {\n            this._bounds.minX = this._texture.orig.width * -this._anchor._x;\n            this._bounds.minY = this._texture.orig.height * -this._anchor._y;\n            this._bounds.maxX = this._texture.orig.width * (1 - this._anchor._x);\n            this._bounds.maxY = this._texture.orig.height * (1 - this._anchor._y);\n\n            if (!rect)\n            {\n                if (!this._localBoundsRect)\n                {\n                    this._localBoundsRect = new Rectangle();\n                }\n\n                rect = this._localBoundsRect;\n            }\n\n            return this._bounds.getRectangle(rect);\n        }\n\n        return super.getLocalBounds.call(this, rect);\n    }\n\n    /**\n     * Tests if a point is inside this sprite\n     *\n     * @param {PIXI.Point} point - the point to test\n     * @return {boolean} the result of the test\n     */\n    containsPoint(point)\n    {\n        this.worldTransform.applyInverse(point, tempPoint);\n\n        const width = this._texture.orig.width;\n        const height = this._texture.orig.height;\n        const x1 = -width * this.anchor.x;\n        let y1 = 0;\n\n        if (tempPoint.x >= x1 && tempPoint.x < x1 + width)\n        {\n            y1 = -height * this.anchor.y;\n\n            if (tempPoint.y >= y1 && tempPoint.y < y1 + height)\n            {\n                return true;\n            }\n        }\n\n        return false;\n    }\n\n    /**\n     * Destroys this sprite and optionally its texture and children\n     *\n     * @param {object|boolean} [options] - Options parameter. A boolean will act as if all options\n     *  have been set to that value\n     * @param {boolean} [options.children=false] - if set to true, all the children will have their destroy\n     *      method called as well. 'options' will be passed on to those calls.\n     * @param {boolean} [options.texture=false] - Should it destroy the current texture of the sprite as well\n     * @param {boolean} [options.baseTexture=false] - Should it destroy the base texture of the sprite as well\n     */\n    destroy(options)\n    {\n        super.destroy(options);\n\n        this._texture.off('update', this._onTextureUpdate, this);\n\n        this._anchor = null;\n\n        const destroyTexture = typeof options === 'boolean' ? options : options && options.texture;\n\n        if (destroyTexture)\n        {\n            const destroyBaseTexture = typeof options === 'boolean' ? options : options && options.baseTexture;\n\n            this._texture.destroy(!!destroyBaseTexture);\n        }\n\n        this._texture = null;\n        this.shader = null;\n    }\n\n    // some helper functions..\n\n    /**\n     * Helper function that creates a new sprite based on the source you provide.\n     * The source can be - frame id, image url, video url, canvas element, video element, base texture\n     *\n     * @static\n     * @param {number|string|PIXI.Texture|HTMLCanvasElement|HTMLVideoElement} source Source to create texture from\n     * @param {object} [options] See {@link PIXI.BaseTexture}'s constructor for options.\n     * @return {PIXI.Sprite} The newly created sprite\n     */\n    static from(source, options)\n    {\n        const texture = (source instanceof Texture)\n            ? source\n            : Texture.from(source, options);\n\n        return new Sprite(texture);\n    }\n\n    /**\n     * If true PixiJS will Math.floor() x/y values when rendering, stopping pixel interpolation.\n     * Advantages can include sharper image quality (like text) and faster rendering on canvas.\n     * The main disadvantage is movement of objects may appear less smooth.\n     * To set the global default, change {@link PIXI.settings.ROUND_PIXELS}\n     *\n     * @member {boolean}\n     * @default false\n     */\n    set roundPixels(value)\n    {\n        if (this._roundPixels !== value)\n        {\n            this._transformID = -1;\n        }\n        this._roundPixels = value;\n    }\n\n    get roundPixels()\n    {\n        return this._roundPixels;\n    }\n\n    /**\n     * The width of the sprite, setting this will actually modify the scale to achieve the value set\n     *\n     * @member {number}\n     */\n    get width()\n    {\n        return Math.abs(this.scale.x) * this._texture.orig.width;\n    }\n\n    set width(value) // eslint-disable-line require-jsdoc\n    {\n        const s = sign(this.scale.x) || 1;\n\n        this.scale.x = s * value / this._texture.orig.width;\n        this._width = value;\n    }\n\n    /**\n     * The height of the sprite, setting this will actually modify the scale to achieve the value set\n     *\n     * @member {number}\n     */\n    get height()\n    {\n        return Math.abs(this.scale.y) * this._texture.orig.height;\n    }\n\n    set height(value) // eslint-disable-line require-jsdoc\n    {\n        const s = sign(this.scale.y) || 1;\n\n        this.scale.y = s * value / this._texture.orig.height;\n        this._height = value;\n    }\n\n    /**\n     * The anchor sets the origin point of the text. The default value is taken from the {@link PIXI.Texture|Texture}\n     * and passed to the constructor.\n     *\n     * The default is `(0,0)`, this means the text's origin is the top left.\n     *\n     * Setting the anchor to `(0.5,0.5)` means the text's origin is centered.\n     *\n     * Setting the anchor to `(1,1)` would mean the text's origin point will be the bottom right corner.\n     *\n     * If you pass only single parameter, it will set both x and y to the same value as shown in the example below.\n     *\n     * @example\n     * const sprite = new PIXI.Sprite(texture);\n     * sprite.anchor.set(0.5); // This will set the origin to center. (0.5) is same as (0.5, 0.5).\n     *\n     * @member {PIXI.ObservablePoint}\n     */\n    get anchor()\n    {\n        return this._anchor;\n    }\n\n    set anchor(value) // eslint-disable-line require-jsdoc\n    {\n        this._anchor.copyFrom(value);\n    }\n\n    /**\n     * The tint applied to the sprite. This is a hex value.\n     * A value of 0xFFFFFF will remove any tint effect.\n     *\n     * @member {number}\n     * @default 0xFFFFFF\n     */\n    get tint()\n    {\n        return this._tint;\n    }\n\n    set tint(value) // eslint-disable-line require-jsdoc\n    {\n        this._tint = value;\n        this._tintRGB = (value >> 16) + (value & 0xff00) + ((value & 0xff) << 16);\n    }\n\n    /**\n     * The texture that the sprite is using\n     *\n     * @member {PIXI.Texture}\n     */\n    get texture()\n    {\n        return this._texture;\n    }\n\n    set texture(value) // eslint-disable-line require-jsdoc\n    {\n        if (this._texture === value)\n        {\n            return;\n        }\n\n        this._texture = value || Texture.EMPTY;\n        this._cachedTint = 0xFFFFFF;\n\n        this._textureID = -1;\n        this._textureTrimmedID = -1;\n\n        if (value)\n        {\n            // wait for the texture to load\n            if (value.baseTexture.valid)\n            {\n                this._onTextureUpdate();\n            }\n            else\n            {\n                value.once('update', this._onTextureUpdate, this);\n            }\n        }\n    }\n}\n","/**\n * Constants that define the type of gradient on text.\n *\n * @static\n * @constant\n * @name TEXT_GRADIENT\n * @memberof PIXI\n * @type {object}\n * @property {number} LINEAR_VERTICAL Vertical gradient\n * @property {number} LINEAR_HORIZONTAL Linear gradient\n */\nexport const TEXT_GRADIENT = {\n    LINEAR_VERTICAL: 0,\n    LINEAR_HORIZONTAL: 1,\n};\n","// disabling eslint for now, going to rewrite this in v5\n/* eslint-disable */\n\nimport { TEXT_GRADIENT } from './const';\nimport { hex2string } from '@pixi/utils';\n\nconst defaultStyle = {\n    align: 'left',\n    breakWords: false,\n    dropShadow: false,\n    dropShadowAlpha: 1,\n    dropShadowAngle: Math.PI / 6,\n    dropShadowBlur: 0,\n    dropShadowColor: 'black',\n    dropShadowDistance: 5,\n    fill: 'black',\n    fillGradientType: TEXT_GRADIENT.LINEAR_VERTICAL,\n    fillGradientStops: [],\n    fontFamily: 'Arial',\n    fontSize: 26,\n    fontStyle: 'normal',\n    fontVariant: 'normal',\n    fontWeight: 'normal',\n    letterSpacing: 0,\n    lineHeight: 0,\n    lineJoin: 'miter',\n    miterLimit: 10,\n    padding: 0,\n    stroke: 'black',\n    strokeThickness: 0,\n    textBaseline: 'alphabetic',\n    trim: false,\n    whiteSpace: 'pre',\n    wordWrap: false,\n    wordWrapWidth: 100,\n    leading: 0,\n};\n\nconst genericFontFamilies = [\n    'serif',\n    'sans-serif',\n    'monospace',\n    'cursive',\n    'fantasy',\n    'system-ui',\n]\n\n/**\n * A TextStyle Object contains information to decorate a Text objects.\n *\n * An instance can be shared between multiple Text objects; then changing the style will update all text objects using it.\n *\n * A tool can be used to generate a text style [here](https://pixijs.io/pixi-text-style).\n *\n * @class\n * @memberof PIXI\n */\nexport default class TextStyle\n{\n    /**\n     * @param {object} [style] - The style parameters\n     * @param {string} [style.align='left'] - Alignment for multiline text ('left', 'center' or 'right'),\n     *  does not affect single line text\n     * @param {boolean} [style.breakWords=false] - Indicates if lines can be wrapped within words, it\n     *  needs wordWrap to be set to true\n     * @param {boolean} [style.dropShadow=false] - Set a drop shadow for the text\n     * @param {number} [style.dropShadowAlpha=1] - Set alpha for the drop shadow\n     * @param {number} [style.dropShadowAngle=Math.PI/6] - Set a angle of the drop shadow\n     * @param {number} [style.dropShadowBlur=0] - Set a shadow blur radius\n     * @param {string|number} [style.dropShadowColor='black'] - A fill style to be used on the dropshadow e.g 'red', '#00FF00'\n     * @param {number} [style.dropShadowDistance=5] - Set a distance of the drop shadow\n     * @param {string|string[]|number|number[]|CanvasGradient|CanvasPattern} [style.fill='black'] - A canvas\n     *  fillstyle that will be used on the text e.g 'red', '#00FF00'. Can be an array to create a gradient\n     *  eg ['#000000','#FFFFFF']\n     * {@link https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/fillStyle|MDN}\n     * @param {number} [style.fillGradientType=PIXI.TEXT_GRADIENT.LINEAR_VERTICAL] - If fill is an array of colours\n     *  to create a gradient, this can change the type/direction of the gradient. See {@link PIXI.TEXT_GRADIENT}\n     * @param {number[]} [style.fillGradientStops] - If fill is an array of colours to create a gradient, this array can set\n     * the stop points (numbers between 0 and 1) for the color, overriding the default behaviour of evenly spacing them.\n     * @param {string|string[]} [style.fontFamily='Arial'] - The font family\n     * @param {number|string} [style.fontSize=26] - The font size (as a number it converts to px, but as a string,\n     *  equivalents are '26px','20pt','160%' or '1.6em')\n     * @param {string} [style.fontStyle='normal'] - The font style ('normal', 'italic' or 'oblique')\n     * @param {string} [style.fontVariant='normal'] - The font variant ('normal' or 'small-caps')\n     * @param {string} [style.fontWeight='normal'] - The font weight ('normal', 'bold', 'bolder', 'lighter' and '100',\n     *  '200', '300', '400', '500', '600', '700', 800' or '900')\n     * @param {number} [style.leading=0] - The space between lines\n     * @param {number} [style.letterSpacing=0] - The amount of spacing between letters, default is 0\n     * @param {number} [style.lineHeight] - The line height, a number that represents the vertical space that a letter uses\n     * @param {string} [style.lineJoin='miter'] - The lineJoin property sets the type of corner created, it can resolve\n     *      spiked text issues. Possible values \"miter\" (creates a sharp corner), \"round\" (creates a round corner) or \"bevel\"\n     *      (creates a squared corner).\n     * @param {number} [style.miterLimit=10] - The miter limit to use when using the 'miter' lineJoin mode. This can reduce\n     *      or increase the spikiness of rendered text.\n     * @param {number} [style.padding=0] - Occasionally some fonts are cropped. Adding some padding will prevent this from\n     *     happening by adding padding to all sides of the text.\n     * @param {string|number} [style.stroke='black'] - A canvas fillstyle that will be used on the text stroke\n     *  e.g 'blue', '#FCFF00'\n     * @param {number} [style.strokeThickness=0] - A number that represents the thickness of the stroke.\n     *  Default is 0 (no stroke)\n     * @param {boolean} [style.trim=false] - Trim transparent borders\n     * @param {string} [style.textBaseline='alphabetic'] - The baseline of the text that is rendered.\n     * @param {string} [style.whiteSpace='pre'] - Determines whether newlines & spaces are collapsed or preserved \"normal\"\n     *      (collapse, collapse), \"pre\" (preserve, preserve) | \"pre-line\" (preserve, collapse). It needs wordWrap to be set to true\n     * @param {boolean} [style.wordWrap=false] - Indicates if word wrap should be used\n     * @param {number} [style.wordWrapWidth=100] - The width at which text will wrap, it needs wordWrap to be set to true\n     */\n    constructor(style)\n    {\n        this.styleID = 0;\n\n        this.reset();\n\n        deepCopyProperties(this, style, style);\n    }\n\n    /**\n     * Creates a new TextStyle object with the same values as this one.\n     * Note that the only the properties of the object are cloned.\n     *\n     * @return {PIXI.TextStyle} New cloned TextStyle object\n     */\n    clone()\n    {\n        const clonedProperties = {};\n\n        deepCopyProperties(clonedProperties, this, defaultStyle);\n\n        return new TextStyle(clonedProperties);\n    }\n\n    /**\n     * Resets all properties to the defaults specified in TextStyle.prototype._default\n     */\n    reset()\n    {\n        deepCopyProperties(this, defaultStyle, defaultStyle);\n    }\n\n    /**\n     * Alignment for multiline text ('left', 'center' or 'right'), does not affect single line text\n     *\n     * @member {string}\n     */\n    get align()\n    {\n        return this._align;\n    }\n    set align(align) // eslint-disable-line require-jsdoc\n    {\n        if (this._align !== align)\n        {\n            this._align = align;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * Indicates if lines can be wrapped within words, it needs wordWrap to be set to true\n     *\n     * @member {boolean}\n     */\n    get breakWords()\n    {\n        return this._breakWords;\n    }\n    set breakWords(breakWords) // eslint-disable-line require-jsdoc\n    {\n        if (this._breakWords !== breakWords)\n        {\n            this._breakWords = breakWords;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * Set a drop shadow for the text\n     *\n     * @member {boolean}\n     */\n    get dropShadow()\n    {\n        return this._dropShadow;\n    }\n    set dropShadow(dropShadow) // eslint-disable-line require-jsdoc\n    {\n        if (this._dropShadow !== dropShadow)\n        {\n            this._dropShadow = dropShadow;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * Set alpha for the drop shadow\n     *\n     * @member {number}\n     */\n    get dropShadowAlpha()\n    {\n        return this._dropShadowAlpha;\n    }\n    set dropShadowAlpha(dropShadowAlpha) // eslint-disable-line require-jsdoc\n    {\n        if (this._dropShadowAlpha !== dropShadowAlpha)\n        {\n            this._dropShadowAlpha = dropShadowAlpha;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * Set a angle of the drop shadow\n     *\n     * @member {number}\n     */\n    get dropShadowAngle()\n    {\n        return this._dropShadowAngle;\n    }\n    set dropShadowAngle(dropShadowAngle) // eslint-disable-line require-jsdoc\n    {\n        if (this._dropShadowAngle !== dropShadowAngle)\n        {\n            this._dropShadowAngle = dropShadowAngle;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * Set a shadow blur radius\n     *\n     * @member {number}\n     */\n    get dropShadowBlur()\n    {\n        return this._dropShadowBlur;\n    }\n    set dropShadowBlur(dropShadowBlur) // eslint-disable-line require-jsdoc\n    {\n        if (this._dropShadowBlur !== dropShadowBlur)\n        {\n            this._dropShadowBlur = dropShadowBlur;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * A fill style to be used on the dropshadow e.g 'red', '#00FF00'\n     *\n     * @member {string|number}\n     */\n    get dropShadowColor()\n    {\n        return this._dropShadowColor;\n    }\n    set dropShadowColor(dropShadowColor) // eslint-disable-line require-jsdoc\n    {\n        const outputColor = getColor(dropShadowColor);\n        if (this._dropShadowColor !== outputColor)\n        {\n            this._dropShadowColor = outputColor;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * Set a distance of the drop shadow\n     *\n     * @member {number}\n     */\n    get dropShadowDistance()\n    {\n        return this._dropShadowDistance;\n    }\n    set dropShadowDistance(dropShadowDistance) // eslint-disable-line require-jsdoc\n    {\n        if (this._dropShadowDistance !== dropShadowDistance)\n        {\n            this._dropShadowDistance = dropShadowDistance;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * A canvas fillstyle that will be used on the text e.g 'red', '#00FF00'.\n     * Can be an array to create a gradient eg ['#000000','#FFFFFF']\n     * {@link https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/fillStyle|MDN}\n     *\n     * @member {string|string[]|number|number[]|CanvasGradient|CanvasPattern}\n     */\n    get fill()\n    {\n        return this._fill;\n    }\n    set fill(fill) // eslint-disable-line require-jsdoc\n    {\n        const outputColor = getColor(fill);\n        if (this._fill !== outputColor)\n        {\n            this._fill = outputColor;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * If fill is an array of colours to create a gradient, this can change the type/direction of the gradient.\n     * See {@link PIXI.TEXT_GRADIENT}\n     *\n     * @member {number}\n     */\n    get fillGradientType()\n    {\n        return this._fillGradientType;\n    }\n    set fillGradientType(fillGradientType) // eslint-disable-line require-jsdoc\n    {\n        if (this._fillGradientType !== fillGradientType)\n        {\n            this._fillGradientType = fillGradientType;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * If fill is an array of colours to create a gradient, this array can set the stop points\n     * (numbers between 0 and 1) for the color, overriding the default behaviour of evenly spacing them.\n     *\n     * @member {number[]}\n     */\n    get fillGradientStops()\n    {\n        return this._fillGradientStops;\n    }\n    set fillGradientStops(fillGradientStops) // eslint-disable-line require-jsdoc\n    {\n        if (!areArraysEqual(this._fillGradientStops,fillGradientStops))\n        {\n            this._fillGradientStops = fillGradientStops;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * The font family\n     *\n     * @member {string|string[]}\n     */\n    get fontFamily()\n    {\n        return this._fontFamily;\n    }\n    set fontFamily(fontFamily) // eslint-disable-line require-jsdoc\n    {\n        if (this.fontFamily !== fontFamily)\n        {\n            this._fontFamily = fontFamily;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * The font size\n     * (as a number it converts to px, but as a string, equivalents are '26px','20pt','160%' or '1.6em')\n     *\n     * @member {number|string}\n     */\n    get fontSize()\n    {\n        return this._fontSize;\n    }\n    set fontSize(fontSize) // eslint-disable-line require-jsdoc\n    {\n        if (this._fontSize !== fontSize)\n        {\n            this._fontSize = fontSize;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * The font style\n     * ('normal', 'italic' or 'oblique')\n     *\n     * @member {string}\n     */\n    get fontStyle()\n    {\n        return this._fontStyle;\n    }\n    set fontStyle(fontStyle) // eslint-disable-line require-jsdoc\n    {\n        if (this._fontStyle !== fontStyle)\n        {\n            this._fontStyle = fontStyle;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * The font variant\n     * ('normal' or 'small-caps')\n     *\n     * @member {string}\n     */\n    get fontVariant()\n    {\n        return this._fontVariant;\n    }\n    set fontVariant(fontVariant) // eslint-disable-line require-jsdoc\n    {\n        if (this._fontVariant !== fontVariant)\n        {\n            this._fontVariant = fontVariant;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * The font weight\n     * ('normal', 'bold', 'bolder', 'lighter' and '100', '200', '300', '400', '500', '600', '700', 800' or '900')\n     *\n     * @member {string}\n     */\n    get fontWeight()\n    {\n        return this._fontWeight;\n    }\n    set fontWeight(fontWeight) // eslint-disable-line require-jsdoc\n    {\n        if (this._fontWeight !== fontWeight)\n        {\n            this._fontWeight = fontWeight;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * The amount of spacing between letters, default is 0\n     *\n     * @member {number}\n     */\n    get letterSpacing()\n    {\n        return this._letterSpacing;\n    }\n    set letterSpacing(letterSpacing) // eslint-disable-line require-jsdoc\n    {\n        if (this._letterSpacing !== letterSpacing)\n        {\n            this._letterSpacing = letterSpacing;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * The line height, a number that represents the vertical space that a letter uses\n     *\n     * @member {number}\n     */\n    get lineHeight()\n    {\n        return this._lineHeight;\n    }\n    set lineHeight(lineHeight) // eslint-disable-line require-jsdoc\n    {\n        if (this._lineHeight !== lineHeight)\n        {\n            this._lineHeight = lineHeight;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * The space between lines\n     *\n     * @member {number}\n     */\n    get leading()\n    {\n        return this._leading;\n    }\n    set leading(leading) // eslint-disable-line require-jsdoc\n    {\n        if (this._leading !== leading)\n        {\n            this._leading = leading;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * The lineJoin property sets the type of corner created, it can resolve spiked text issues.\n     * Default is 'miter' (creates a sharp corner).\n     *\n     * @member {string}\n     */\n    get lineJoin()\n    {\n        return this._lineJoin;\n    }\n    set lineJoin(lineJoin) // eslint-disable-line require-jsdoc\n    {\n        if (this._lineJoin !== lineJoin)\n        {\n            this._lineJoin = lineJoin;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * The miter limit to use when using the 'miter' lineJoin mode\n     * This can reduce or increase the spikiness of rendered text.\n     *\n     * @member {number}\n     */\n    get miterLimit()\n    {\n        return this._miterLimit;\n    }\n    set miterLimit(miterLimit) // eslint-disable-line require-jsdoc\n    {\n        if (this._miterLimit !== miterLimit)\n        {\n            this._miterLimit = miterLimit;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * Occasionally some fonts are cropped. Adding some padding will prevent this from happening\n     * by adding padding to all sides of the text.\n     *\n     * @member {number}\n     */\n    get padding()\n    {\n        return this._padding;\n    }\n    set padding(padding) // eslint-disable-line require-jsdoc\n    {\n        if (this._padding !== padding)\n        {\n            this._padding = padding;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * A canvas fillstyle that will be used on the text stroke\n     * e.g 'blue', '#FCFF00'\n     *\n     * @member {string|number}\n     */\n    get stroke()\n    {\n        return this._stroke;\n    }\n    set stroke(stroke) // eslint-disable-line require-jsdoc\n    {\n        const outputColor = getColor(stroke);\n        if (this._stroke !== outputColor)\n        {\n            this._stroke = outputColor;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * A number that represents the thickness of the stroke.\n     * Default is 0 (no stroke)\n     *\n     * @member {number}\n     */\n    get strokeThickness()\n    {\n        return this._strokeThickness;\n    }\n    set strokeThickness(strokeThickness) // eslint-disable-line require-jsdoc\n    {\n        if (this._strokeThickness !== strokeThickness)\n        {\n            this._strokeThickness = strokeThickness;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * The baseline of the text that is rendered.\n     *\n     * @member {string}\n     */\n    get textBaseline()\n    {\n        return this._textBaseline;\n    }\n    set textBaseline(textBaseline) // eslint-disable-line require-jsdoc\n    {\n        if (this._textBaseline !== textBaseline)\n        {\n            this._textBaseline = textBaseline;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * Trim transparent borders\n     *\n     * @member {boolean}\n     */\n    get trim()\n    {\n        return this._trim;\n    }\n    set trim(trim) // eslint-disable-line require-jsdoc\n    {\n        if (this._trim !== trim)\n        {\n            this._trim = trim;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * How newlines and spaces should be handled.\n     * Default is 'pre' (preserve, preserve).\n     *\n     *  value       | New lines     |   Spaces\n     *  ---         | ---           |   ---\n     * 'normal'     | Collapse      |   Collapse\n     * 'pre'        | Preserve      |   Preserve\n     * 'pre-line'   | Preserve      |   Collapse\n     *\n     * @member {string}\n     */\n    get whiteSpace()\n    {\n        return this._whiteSpace;\n    }\n    set whiteSpace(whiteSpace) // eslint-disable-line require-jsdoc\n    {\n        if (this._whiteSpace !== whiteSpace)\n        {\n            this._whiteSpace = whiteSpace;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * Indicates if word wrap should be used\n     *\n     * @member {boolean}\n     */\n    get wordWrap()\n    {\n        return this._wordWrap;\n    }\n    set wordWrap(wordWrap) // eslint-disable-line require-jsdoc\n    {\n        if (this._wordWrap !== wordWrap)\n        {\n            this._wordWrap = wordWrap;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * The width at which text will wrap, it needs wordWrap to be set to true\n     *\n     * @member {number}\n     */\n    get wordWrapWidth()\n    {\n        return this._wordWrapWidth;\n    }\n    set wordWrapWidth(wordWrapWidth) // eslint-disable-line require-jsdoc\n    {\n        if (this._wordWrapWidth !== wordWrapWidth)\n        {\n            this._wordWrapWidth = wordWrapWidth;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * Generates a font style string to use for `TextMetrics.measureFont()`.\n     *\n     * @return {string} Font style string, for passing to `TextMetrics.measureFont()`\n     */\n    toFontString()\n    {\n        // build canvas api font setting from individual components. Convert a numeric this.fontSize to px\n        const fontSizeString = (typeof this.fontSize === 'number') ? `${this.fontSize}px` : this.fontSize;\n\n        // Clean-up fontFamily property by quoting each font name\n        // this will support font names with spaces\n        let fontFamilies = this.fontFamily;\n\n        if (!Array.isArray(this.fontFamily))\n        {\n            fontFamilies = this.fontFamily.split(',');\n        }\n\n        for (let i = fontFamilies.length - 1; i >= 0; i--)\n        {\n            // Trim any extra white-space\n            let fontFamily = fontFamilies[i].trim();\n\n            // Check if font already contains strings\n            if (!(/([\\\"\\'])[^\\'\\\"]+\\1/).test(fontFamily) && genericFontFamilies.indexOf(fontFamily) < 0)\n            {\n                fontFamily = `\"${fontFamily}\"`;\n            }\n            fontFamilies[i] = fontFamily;\n        }\n\n        return `${this.fontStyle} ${this.fontVariant} ${this.fontWeight} ${fontSizeString} ${fontFamilies.join(',')}`;\n    }\n}\n\n/**\n * Utility function to convert hexadecimal colors to strings, and simply return the color if it's a string.\n * @private\n * @param {number|number[]} color\n * @return {string} The color as a string.\n */\nfunction getSingleColor(color)\n{\n    if (typeof color === 'number')\n    {\n        return hex2string(color);\n    }\n    else if ( typeof color === 'string' )\n    {\n        if ( color.indexOf('0x') === 0 )\n        {\n            color = color.replace('0x', '#');\n        }\n    }\n\n    return color;\n}\n\n/**\n * Utility function to convert hexadecimal colors to strings, and simply return the color if it's a string.\n * This version can also convert array of colors\n * @private\n * @param {number|number[]} color\n * @return {string} The color as a string.\n */\nfunction getColor(color)\n{\n    if (!Array.isArray(color))\n    {\n        return getSingleColor(color);\n    }\n    else\n    {\n        for (let i = 0; i < color.length; ++i)\n        {\n            color[i] = getSingleColor(color[i]);\n        }\n\n        return color;\n    }\n}\n\n/**\n * Utility function to convert hexadecimal colors to strings, and simply return the color if it's a string.\n * This version can also convert array of colors\n * @private\n * @param {Array} array1 First array to compare\n * @param {Array} array2 Second array to compare\n * @return {boolean} Do the arrays contain the same values in the same order\n */\nfunction areArraysEqual(array1, array2)\n{\n    if (!Array.isArray(array1) || !Array.isArray(array2))\n    {\n        return false;\n    }\n\n    if (array1.length !== array2.length)\n    {\n        return false;\n    }\n\n    for (let i = 0; i < array1.length; ++i)\n    {\n        if (array1[i] !== array2[i])\n        {\n            return false;\n        }\n    }\n\n    return true;\n}\n\n/**\n * Utility function to ensure that object properties are copied by value, and not by reference\n * @private\n * @param {Object} target Target object to copy properties into\n * @param {Object} source Source object for the properties to copy\n * @param {string} propertyObj Object containing properties names we want to loop over\n */\nfunction deepCopyProperties(target, source, propertyObj) {\n    for (const prop in propertyObj) {\n        if (Array.isArray(source[prop])) {\n            target[prop] = source[prop].slice();\n        } else {\n            target[prop] = source[prop];\n        }\n    }\n}\n","/**\n * The TextMetrics object represents the measurement of a block of text with a specified style.\n *\n * ```js\n * let style = new PIXI.TextStyle({fontFamily : 'Arial', fontSize: 24, fill : 0xff1010, align : 'center'})\n * let textMetrics = PIXI.TextMetrics.measureText('Your text', style)\n * ```\n *\n * @class\n * @memberof PIXI\n */\nexport default class TextMetrics\n{\n    /**\n     * @param {string} text - the text that was measured\n     * @param {PIXI.TextStyle} style - the style that was measured\n     * @param {number} width - the measured width of the text\n     * @param {number} height - the measured height of the text\n     * @param {string[]} lines - an array of the lines of text broken by new lines and wrapping if specified in style\n     * @param {number[]} lineWidths - an array of the line widths for each line matched to `lines`\n     * @param {number} lineHeight - the measured line height for this style\n     * @param {number} maxLineWidth - the maximum line width for all measured lines\n     * @param {Object} fontProperties - the font properties object from TextMetrics.measureFont\n     */\n    constructor(text, style, width, height, lines, lineWidths, lineHeight, maxLineWidth, fontProperties)\n    {\n        /**\n         * The text that was measured\n         *\n         * @member {string}\n         */\n        this.text = text;\n\n        /**\n         * The style that was measured\n         *\n         * @member {PIXI.TextStyle}\n         */\n        this.style = style;\n\n        /**\n         * The measured width of the text\n         *\n         * @member {number}\n         */\n        this.width = width;\n\n        /**\n         * The measured height of the text\n         *\n         * @member {number}\n         */\n        this.height = height;\n\n        /**\n         * An array of lines of the text broken by new lines and wrapping is specified in style\n         *\n         * @member {string[]}\n         */\n        this.lines = lines;\n\n        /**\n         * An array of the line widths for each line matched to `lines`\n         *\n         * @member {number[]}\n         */\n        this.lineWidths = lineWidths;\n\n        /**\n         * The measured line height for this style\n         *\n         * @member {number}\n         */\n        this.lineHeight = lineHeight;\n\n        /**\n         * The maximum line width for all measured lines\n         *\n         * @member {number}\n         */\n        this.maxLineWidth = maxLineWidth;\n\n        /**\n         * The font properties object from TextMetrics.measureFont\n         *\n         * @member {PIXI.IFontMetrics}\n         */\n        this.fontProperties = fontProperties;\n    }\n\n    /**\n     * Measures the supplied string of text and returns a Rectangle.\n     *\n     * @param {string} text - the text to measure.\n     * @param {PIXI.TextStyle} style - the text style to use for measuring\n     * @param {boolean} [wordWrap] - optional override for if word-wrap should be applied to the text.\n     * @param {HTMLCanvasElement} [canvas] - optional specification of the canvas to use for measuring.\n     * @return {PIXI.TextMetrics} measured width and height of the text.\n     */\n    static measureText(text, style, wordWrap, canvas = TextMetrics._canvas)\n    {\n        wordWrap = (wordWrap === undefined || wordWrap === null) ? style.wordWrap : wordWrap;\n        const font = style.toFontString();\n        const fontProperties = TextMetrics.measureFont(font);\n\n        // fallback in case UA disallow canvas data extraction\n        // (toDataURI, getImageData functions)\n        if (fontProperties.fontSize === 0)\n        {\n            fontProperties.fontSize = style.fontSize;\n            fontProperties.ascent = style.fontSize;\n        }\n\n        const context = canvas.getContext('2d');\n\n        context.font = font;\n\n        const outputText = wordWrap ? TextMetrics.wordWrap(text, style, canvas) : text;\n        const lines = outputText.split(/(?:\\r\\n|\\r|\\n)/);\n        const lineWidths = new Array(lines.length);\n        let maxLineWidth = 0;\n\n        for (let i = 0; i < lines.length; i++)\n        {\n            const lineWidth = context.measureText(lines[i]).width + ((lines[i].length - 1) * style.letterSpacing);\n\n            lineWidths[i] = lineWidth;\n            maxLineWidth = Math.max(maxLineWidth, lineWidth);\n        }\n        let width = maxLineWidth + style.strokeThickness;\n\n        if (style.dropShadow)\n        {\n            width += style.dropShadowDistance;\n        }\n\n        const lineHeight = style.lineHeight || fontProperties.fontSize + style.strokeThickness;\n        let height = Math.max(lineHeight, fontProperties.fontSize + style.strokeThickness)\n            + ((lines.length - 1) * (lineHeight + style.leading));\n\n        if (style.dropShadow)\n        {\n            height += style.dropShadowDistance;\n        }\n\n        return new TextMetrics(\n            text,\n            style,\n            width,\n            height,\n            lines,\n            lineWidths,\n            lineHeight + style.leading,\n            maxLineWidth,\n            fontProperties\n        );\n    }\n\n    /**\n     * Applies newlines to a string to have it optimally fit into the horizontal\n     * bounds set by the Text object's wordWrapWidth property.\n     *\n     * @private\n     * @param {string} text - String to apply word wrapping to\n     * @param {PIXI.TextStyle} style - the style to use when wrapping\n     * @param {HTMLCanvasElement} [canvas] - optional specification of the canvas to use for measuring.\n     * @return {string} New string with new lines applied where required\n     */\n    static wordWrap(text, style, canvas = TextMetrics._canvas)\n    {\n        const context = canvas.getContext('2d');\n\n        let width = 0;\n        let line = '';\n        let lines = '';\n\n        const cache = {};\n        const { letterSpacing, whiteSpace } = style;\n\n        // How to handle whitespaces\n        const collapseSpaces = TextMetrics.collapseSpaces(whiteSpace);\n        const collapseNewlines = TextMetrics.collapseNewlines(whiteSpace);\n\n        // whether or not spaces may be added to the beginning of lines\n        let canPrependSpaces = !collapseSpaces;\n\n        // There is letterSpacing after every char except the last one\n        // t_h_i_s_' '_i_s_' '_a_n_' '_e_x_a_m_p_l_e_' '_!\n        // so for convenience the above needs to be compared to width + 1 extra letterSpace\n        // t_h_i_s_' '_i_s_' '_a_n_' '_e_x_a_m_p_l_e_' '_!_\n        // ________________________________________________\n        // And then the final space is simply no appended to each line\n        const wordWrapWidth = style.wordWrapWidth + letterSpacing;\n\n        // break text into words, spaces and newline chars\n        const tokens = TextMetrics.tokenize(text);\n\n        for (let i = 0; i < tokens.length; i++)\n        {\n            // get the word, space or newlineChar\n            let token = tokens[i];\n\n            // if word is a new line\n            if (TextMetrics.isNewline(token))\n            {\n                // keep the new line\n                if (!collapseNewlines)\n                {\n                    lines += TextMetrics.addLine(line);\n                    canPrependSpaces = !collapseSpaces;\n                    line = '';\n                    width = 0;\n                    continue;\n                }\n\n                // if we should collapse new lines\n                // we simply convert it into a space\n                token = ' ';\n            }\n\n            // if we should collapse repeated whitespaces\n            if (collapseSpaces)\n            {\n                // check both this and the last tokens for spaces\n                const currIsBreakingSpace = TextMetrics.isBreakingSpace(token);\n                const lastIsBreakingSpace = TextMetrics.isBreakingSpace(line[line.length - 1]);\n\n                if (currIsBreakingSpace && lastIsBreakingSpace)\n                {\n                    continue;\n                }\n            }\n\n            // get word width from cache if possible\n            const tokenWidth = TextMetrics.getFromCache(token, letterSpacing, cache, context);\n\n            // word is longer than desired bounds\n            if (tokenWidth > wordWrapWidth)\n            {\n                // if we are not already at the beginning of a line\n                if (line !== '')\n                {\n                    // start newlines for overflow words\n                    lines += TextMetrics.addLine(line);\n                    line = '';\n                    width = 0;\n                }\n\n                // break large word over multiple lines\n                if (TextMetrics.canBreakWords(token, style.breakWords))\n                {\n                    // break word into characters\n                    const characters = token.split('');\n\n                    // loop the characters\n                    for (let j = 0; j < characters.length; j++)\n                    {\n                        let char = characters[j];\n\n                        let k = 1;\n                        // we are not at the end of the token\n\n                        while (characters[j + k])\n                        {\n                            const nextChar = characters[j + k];\n                            const lastChar = char[char.length - 1];\n\n                            // should not split chars\n                            if (!TextMetrics.canBreakChars(lastChar, nextChar, token, j, style.breakWords))\n                            {\n                                // combine chars & move forward one\n                                char += nextChar;\n                            }\n                            else\n                            {\n                                break;\n                            }\n\n                            k++;\n                        }\n\n                        j += char.length - 1;\n\n                        const characterWidth = TextMetrics.getFromCache(char, letterSpacing, cache, context);\n\n                        if (characterWidth + width > wordWrapWidth)\n                        {\n                            lines += TextMetrics.addLine(line);\n                            canPrependSpaces = false;\n                            line = '';\n                            width = 0;\n                        }\n\n                        line += char;\n                        width += characterWidth;\n                    }\n                }\n\n                // run word out of the bounds\n                else\n                {\n                    // if there are words in this line already\n                    // finish that line and start a new one\n                    if (line.length > 0)\n                    {\n                        lines += TextMetrics.addLine(line);\n                        line = '';\n                        width = 0;\n                    }\n\n                    const isLastToken = i === tokens.length - 1;\n\n                    // give it its own line if it's not the end\n                    lines += TextMetrics.addLine(token, !isLastToken);\n                    canPrependSpaces = false;\n                    line = '';\n                    width = 0;\n                }\n            }\n\n            // word could fit\n            else\n            {\n                // word won't fit because of existing words\n                // start a new line\n                if (tokenWidth + width > wordWrapWidth)\n                {\n                    // if its a space we don't want it\n                    canPrependSpaces = false;\n\n                    // add a new line\n                    lines += TextMetrics.addLine(line);\n\n                    // start a new line\n                    line = '';\n                    width = 0;\n                }\n\n                // don't add spaces to the beginning of lines\n                if (line.length > 0 || !TextMetrics.isBreakingSpace(token) || canPrependSpaces)\n                {\n                    // add the word to the current line\n                    line += token;\n\n                    // update width counter\n                    width += tokenWidth;\n                }\n            }\n        }\n\n        lines += TextMetrics.addLine(line, false);\n\n        return lines;\n    }\n\n    /**\n     * Convienience function for logging each line added during the wordWrap\n     * method\n     *\n     * @private\n     * @param  {string}   line        - The line of text to add\n     * @param  {boolean}  newLine     - Add new line character to end\n     * @return {string}   A formatted line\n     */\n    static addLine(line, newLine = true)\n    {\n        line = TextMetrics.trimRight(line);\n\n        line = (newLine) ? `${line}\\n` : line;\n\n        return line;\n    }\n\n    /**\n     * Gets & sets the widths of calculated characters in a cache object\n     *\n     * @private\n     * @param  {string}                    key            The key\n     * @param  {number}                    letterSpacing  The letter spacing\n     * @param  {object}                    cache          The cache\n     * @param  {CanvasRenderingContext2D}  context        The canvas context\n     * @return {number}                    The from cache.\n     */\n    static getFromCache(key, letterSpacing, cache, context)\n    {\n        let width = cache[key];\n\n        if (width === undefined)\n        {\n            const spacing = ((key.length) * letterSpacing);\n\n            width = context.measureText(key).width + spacing;\n            cache[key] = width;\n        }\n\n        return width;\n    }\n\n    /**\n     * Determines whether we should collapse breaking spaces\n     *\n     * @private\n     * @param  {string}   whiteSpace  The TextStyle property whiteSpace\n     * @return {boolean}  should collapse\n     */\n    static collapseSpaces(whiteSpace)\n    {\n        return (whiteSpace === 'normal' || whiteSpace === 'pre-line');\n    }\n\n    /**\n     * Determines whether we should collapse newLine chars\n     *\n     * @private\n     * @param  {string}   whiteSpace  The white space\n     * @return {boolean}  should collapse\n     */\n    static collapseNewlines(whiteSpace)\n    {\n        return (whiteSpace === 'normal');\n    }\n\n    /**\n     * trims breaking whitespaces from string\n     *\n     * @private\n     * @param  {string}  text  The text\n     * @return {string}  trimmed string\n     */\n    static trimRight(text)\n    {\n        if (typeof text !== 'string')\n        {\n            return '';\n        }\n\n        for (let i = text.length - 1; i >= 0; i--)\n        {\n            const char = text[i];\n\n            if (!TextMetrics.isBreakingSpace(char))\n            {\n                break;\n            }\n\n            text = text.slice(0, -1);\n        }\n\n        return text;\n    }\n\n    /**\n     * Determines if char is a newline.\n     *\n     * @private\n     * @param  {string}  char  The character\n     * @return {boolean}  True if newline, False otherwise.\n     */\n    static isNewline(char)\n    {\n        if (typeof char !== 'string')\n        {\n            return false;\n        }\n\n        return (TextMetrics._newlines.indexOf(char.charCodeAt(0)) >= 0);\n    }\n\n    /**\n     * Determines if char is a breaking whitespace.\n     *\n     * @private\n     * @param  {string}  char  The character\n     * @return {boolean}  True if whitespace, False otherwise.\n     */\n    static isBreakingSpace(char)\n    {\n        if (typeof char !== 'string')\n        {\n            return false;\n        }\n\n        return (TextMetrics._breakingSpaces.indexOf(char.charCodeAt(0)) >= 0);\n    }\n\n    /**\n     * Splits a string into words, breaking-spaces and newLine characters\n     *\n     * @private\n     * @param  {string}  text       The text\n     * @return {string[]}  A tokenized array\n     */\n    static tokenize(text)\n    {\n        const tokens = [];\n        let token = '';\n\n        if (typeof text !== 'string')\n        {\n            return tokens;\n        }\n\n        for (let i = 0; i < text.length; i++)\n        {\n            const char = text[i];\n\n            if (TextMetrics.isBreakingSpace(char) || TextMetrics.isNewline(char))\n            {\n                if (token !== '')\n                {\n                    tokens.push(token);\n                    token = '';\n                }\n\n                tokens.push(char);\n\n                continue;\n            }\n\n            token += char;\n        }\n\n        if (token !== '')\n        {\n            tokens.push(token);\n        }\n\n        return tokens;\n    }\n\n    /**\n     * This method exists to be easily overridden\n     * It allows one to customise which words should break\n     * Examples are if the token is CJK or numbers.\n     * It must return a boolean.\n     *\n     * @private\n     * @param  {string}  token       The token\n     * @param  {boolean}  breakWords  The style attr break words\n     * @return {boolean} whether to break word or not\n     */\n    static canBreakWords(token, breakWords)\n    {\n        return breakWords;\n    }\n\n    /**\n     * This method exists to be easily overridden\n     * It allows one to determine whether a pair of characters\n     * should be broken by newlines\n     * For example certain characters in CJK langs or numbers.\n     * It must return a boolean.\n     *\n     * @private\n     * @param  {string}  char      The character\n     * @param  {string}  nextChar  The next character\n     * @param  {string}  token     The token/word the characters are from\n     * @param  {number}  index     The index in the token of the char\n     * @param  {boolean}  breakWords  The style attr break words\n     * @return {boolean} whether to break word or not\n     */\n    static canBreakChars(char, nextChar, token, index, breakWords) // eslint-disable-line no-unused-vars\n    {\n        return true;\n    }\n\n    /**\n     * Calculates the ascent, descent and fontSize of a given font-style\n     *\n     * @static\n     * @param {string} font - String representing the style of the font\n     * @return {PIXI.IFontMetrics} Font properties object\n     */\n    static measureFont(font)\n    {\n        // as this method is used for preparing assets, don't recalculate things if we don't need to\n        if (TextMetrics._fonts[font])\n        {\n            return TextMetrics._fonts[font];\n        }\n\n        const properties = {};\n\n        const canvas = TextMetrics._canvas;\n        const context = TextMetrics._context;\n\n        context.font = font;\n\n        const metricsString = TextMetrics.METRICS_STRING + TextMetrics.BASELINE_SYMBOL;\n        const width = Math.ceil(context.measureText(metricsString).width);\n        let baseline = Math.ceil(context.measureText(TextMetrics.BASELINE_SYMBOL).width);\n        const height = 2 * baseline;\n\n        baseline = baseline * TextMetrics.BASELINE_MULTIPLIER | 0;\n\n        canvas.width = width;\n        canvas.height = height;\n\n        context.fillStyle = '#f00';\n        context.fillRect(0, 0, width, height);\n\n        context.font = font;\n\n        context.textBaseline = 'alphabetic';\n        context.fillStyle = '#000';\n        context.fillText(metricsString, 0, baseline);\n\n        const imagedata = context.getImageData(0, 0, width, height).data;\n        const pixels = imagedata.length;\n        const line = width * 4;\n\n        let i = 0;\n        let idx = 0;\n        let stop = false;\n\n        // ascent. scan from top to bottom until we find a non red pixel\n        for (i = 0; i < baseline; ++i)\n        {\n            for (let j = 0; j < line; j += 4)\n            {\n                if (imagedata[idx + j] !== 255)\n                {\n                    stop = true;\n                    break;\n                }\n            }\n            if (!stop)\n            {\n                idx += line;\n            }\n            else\n            {\n                break;\n            }\n        }\n\n        properties.ascent = baseline - i;\n\n        idx = pixels - line;\n        stop = false;\n\n        // descent. scan from bottom to top until we find a non red pixel\n        for (i = height; i > baseline; --i)\n        {\n            for (let j = 0; j < line; j += 4)\n            {\n                if (imagedata[idx + j] !== 255)\n                {\n                    stop = true;\n                    break;\n                }\n            }\n\n            if (!stop)\n            {\n                idx -= line;\n            }\n            else\n            {\n                break;\n            }\n        }\n\n        properties.descent = i - baseline;\n        properties.fontSize = properties.ascent + properties.descent;\n\n        TextMetrics._fonts[font] = properties;\n\n        return properties;\n    }\n\n    /**\n     * Clear font metrics in metrics cache.\n     *\n     * @static\n     * @param {string} [font] - font name. If font name not set then clear cache for all fonts.\n     */\n    static clearMetrics(font = '')\n    {\n        if (font)\n        {\n            delete TextMetrics._fonts[font];\n        }\n        else\n        {\n            TextMetrics._fonts = {};\n        }\n    }\n}\n\n/**\n * Internal return object for {@link PIXI.TextMetrics.measureFont `TextMetrics.measureFont`}.\n *\n * @typedef {object} FontMetrics\n * @property {number} ascent - The ascent distance\n * @property {number} descent - The descent distance\n * @property {number} fontSize - Font size from ascent to descent\n * @memberof PIXI.TextMetrics\n * @private\n */\n\nconst canvas = (() =>\n{\n    try\n    {\n        // OffscreenCanvas2D measureText can be up to 40% faster.\n        const c = new OffscreenCanvas(0, 0);\n\n        return c.getContext('2d') ? c : document.createElement('canvas');\n    }\n    catch (ex)\n    {\n        return document.createElement('canvas');\n    }\n})();\n\ncanvas.width = canvas.height = 10;\n\n/**\n * Cached canvas element for measuring text\n *\n * @memberof PIXI.TextMetrics\n * @type {HTMLCanvasElement}\n * @private\n */\nTextMetrics._canvas = canvas;\n\n/**\n * Cache for context to use.\n *\n * @memberof PIXI.TextMetrics\n * @type {CanvasRenderingContext2D}\n * @private\n */\nTextMetrics._context = canvas.getContext('2d');\n\n/**\n * Cache of {@see PIXI.TextMetrics.FontMetrics} objects.\n *\n * @memberof PIXI.TextMetrics\n * @type {Object}\n * @private\n */\nTextMetrics._fonts = {};\n\n/**\n * String used for calculate font metrics.\n * These characters are all tall to help calculate the height required for text.\n *\n * @static\n * @memberof PIXI.TextMetrics\n * @name METRICS_STRING\n * @type {string}\n * @default |ÉqÅ\n */\nTextMetrics.METRICS_STRING = '|ÉqÅ';\n\n/**\n * Baseline symbol for calculate font metrics.\n *\n * @static\n * @memberof PIXI.TextMetrics\n * @name BASELINE_SYMBOL\n * @type {string}\n * @default M\n */\nTextMetrics.BASELINE_SYMBOL = 'M';\n\n/**\n * Baseline multiplier for calculate font metrics.\n *\n * @static\n * @memberof PIXI.TextMetrics\n * @name BASELINE_MULTIPLIER\n * @type {number}\n * @default 1.4\n */\nTextMetrics.BASELINE_MULTIPLIER = 1.4;\n\n/**\n * Cache of new line chars.\n *\n * @memberof PIXI.TextMetrics\n * @type {number[]}\n * @private\n */\nTextMetrics._newlines = [\n    0x000A, // line feed\n    0x000D, // carriage return\n];\n\n/**\n * Cache of breaking spaces.\n *\n * @memberof PIXI.TextMetrics\n * @type {number[]}\n * @private\n */\nTextMetrics._breakingSpaces = [\n    0x0009, // character tabulation\n    0x0020, // space\n    0x2000, // en quad\n    0x2001, // em quad\n    0x2002, // en space\n    0x2003, // em space\n    0x2004, // three-per-em space\n    0x2005, // four-per-em space\n    0x2006, // six-per-em space\n    0x2008, // punctuation space\n    0x2009, // thin space\n    0x200A, // hair space\n    0x205F, // medium mathematical space\n    0x3000, // ideographic space\n];\n\n/**\n * A number, or a string containing a number.\n *\n * @memberof PIXI\n * @typedef IFontMetrics\n * @property {number} ascent - Font ascent\n * @property {number} descent - Font descent\n * @property {number} fontSize - Font size\n */\n\n","/* eslint max-depth: [2, 8] */\nimport { Sprite } from '@pixi/sprite';\nimport { Texture } from '@pixi/core';\nimport { settings } from '@pixi/settings';\nimport { Rectangle } from '@pixi/math';\nimport { sign, trimCanvas, hex2rgb, string2hex } from '@pixi/utils';\nimport { TEXT_GRADIENT } from './const';\nimport TextStyle from './TextStyle';\nimport TextMetrics from './TextMetrics';\n\nconst defaultDestroyOptions = {\n    texture: true,\n    children: false,\n    baseTexture: true,\n};\n\n/**\n * A Text Object will create a line or multiple lines of text.\n *\n * The text is created using the [Canvas API](https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API).\n *\n * The primary advantage of this class over BitmapText is that you have great control over the style of the next,\n * which you can change at runtime.\n *\n * The primary disadvantages is that each piece of text has it's own texture, which can use more memory.\n * When text changes, this texture has to be re-generated and re-uploaded to the GPU, taking up time.\n *\n * To split a line you can use '\\n' in your text string, or, on the `style` object,\n * change its `wordWrap` property to true and and give the `wordWrapWidth` property a value.\n *\n * A Text can be created directly from a string and a style object,\n * which can be generated [here](https://pixijs.io/pixi-text-style).\n *\n * ```js\n * let text = new PIXI.Text('This is a PixiJS text',{fontFamily : 'Arial', fontSize: 24, fill : 0xff1010, align : 'center'});\n * ```\n *\n * @class\n * @extends PIXI.Sprite\n * @memberof PIXI\n */\nexport default class Text extends Sprite\n{\n    /**\n     * @param {string} text - The string that you would like the text to display\n     * @param {object|PIXI.TextStyle} [style] - The style parameters\n     * @param {HTMLCanvasElement} [canvas] - The canvas element for drawing text\n     */\n    constructor(text, style, canvas)\n    {\n        canvas = canvas || document.createElement('canvas');\n\n        canvas.width = 3;\n        canvas.height = 3;\n\n        const texture = Texture.from(canvas);\n\n        texture.orig = new Rectangle();\n        texture.trim = new Rectangle();\n\n        super(texture);\n\n        /**\n         * The canvas element that everything is drawn to\n         *\n         * @member {HTMLCanvasElement}\n         */\n        this.canvas = canvas;\n\n        /**\n         * The canvas 2d context that everything is drawn with\n         * @member {CanvasRenderingContext2D}\n         */\n        this.context = this.canvas.getContext('2d');\n\n        /**\n         * The resolution / device pixel ratio of the canvas.\n         * This is set to automatically match the renderer resolution by default, but can be overridden by setting manually.\n         * @member {number}\n         * @default 1\n         */\n        this._resolution = settings.RESOLUTION;\n        this._autoResolution = true;\n\n        /**\n         * Private tracker for the current text.\n         *\n         * @member {string}\n         * @private\n         */\n        this._text = null;\n\n        /**\n         * Private tracker for the current style.\n         *\n         * @member {object}\n         * @private\n         */\n        this._style = null;\n        /**\n         * Private listener to track style changes.\n         *\n         * @member {Function}\n         * @private\n         */\n        this._styleListener = null;\n\n        /**\n         * Private tracker for the current font.\n         *\n         * @member {string}\n         * @private\n         */\n        this._font = '';\n\n        this.text = text;\n        this.style = style;\n\n        this.localStyleID = -1;\n    }\n\n    /**\n     * Renders text and updates it when needed.\n     *\n     * @private\n     * @param {boolean} respectDirty - Whether to abort updating the text if the Text isn't dirty and the function is called.\n     */\n    updateText(respectDirty)\n    {\n        const style = this._style;\n\n        // check if style has changed..\n        if (this.localStyleID !== style.styleID)\n        {\n            this.dirty = true;\n            this.localStyleID = style.styleID;\n        }\n\n        if (!this.dirty && respectDirty)\n        {\n            return;\n        }\n\n        this._font = this._style.toFontString();\n\n        const context = this.context;\n        const measured = TextMetrics.measureText(this._text || ' ', this._style, this._style.wordWrap, this.canvas);\n        const width = measured.width;\n        const height = measured.height;\n        const lines = measured.lines;\n        const lineHeight = measured.lineHeight;\n        const lineWidths = measured.lineWidths;\n        const maxLineWidth = measured.maxLineWidth;\n        const fontProperties = measured.fontProperties;\n\n        this.canvas.width = Math.ceil((Math.max(1, width) + (style.padding * 2)) * this._resolution);\n        this.canvas.height = Math.ceil((Math.max(1, height) + (style.padding * 2)) * this._resolution);\n\n        context.scale(this._resolution, this._resolution);\n\n        context.clearRect(0, 0, this.canvas.width, this.canvas.height);\n\n        context.font = this._font;\n        context.lineWidth = style.strokeThickness;\n        context.textBaseline = style.textBaseline;\n        context.lineJoin = style.lineJoin;\n        context.miterLimit = style.miterLimit;\n\n        let linePositionX;\n        let linePositionY;\n\n        // require 2 passes if a shadow; the first to draw the drop shadow, the second to draw the text\n        const passesCount = style.dropShadow ? 2 : 1;\n\n        // For v4, we drew text at the colours of the drop shadow underneath the normal text. This gave the correct zIndex,\n        // but features such as alpha and shadowblur did not look right at all, since we were using actual text as a shadow.\n        //\n        // For v5.0.0, we moved over to just use the canvas API for drop shadows, which made them look much nicer and more\n        // visually please, but now because the stroke is drawn and then the fill, drop shadows would appear on both the fill\n        // and the stroke; and fill drop shadows would appear over the top of the stroke.\n        //\n        // For v5.1.1, the new route is to revert to v4 style of drawing text first to get the drop shadows underneath normal\n        // text, but instead drawing text in the correct location, we'll draw it off screen (-paddingY), and then adjust the\n        // drop shadow so only that appears on screen (+paddingY). Now we'll have the correct draw order of the shadow\n        // beneath the text, whilst also having the proper text shadow styling.\n        for (let i = 0; i < passesCount; ++i)\n        {\n            const isShadowPass = style.dropShadow && i === 0;\n            const dsOffsetText = isShadowPass ? height * 2 : 0; // we only want the drop shadow, so put text way off-screen\n            const dsOffsetShadow = dsOffsetText * this.resolution;\n\n            if (isShadowPass)\n            {\n                // On Safari, text with gradient and drop shadows together do not position correctly\n                // if the scale of the canvas is not 1: https://bugs.webkit.org/show_bug.cgi?id=197689\n                // Therefore we'll set the styles to be a plain black whilst generating this drop shadow\n                context.fillStyle = 'black';\n                context.strokeStyle = 'black';\n\n                const dropShadowColor = style.dropShadowColor;\n                const rgb = hex2rgb(typeof dropShadowColor === 'number' ? dropShadowColor : string2hex(dropShadowColor));\n\n                context.shadowColor = `rgba(${rgb[0] * 255},${rgb[1] * 255},${rgb[2] * 255},${style.dropShadowAlpha})`;\n                context.shadowBlur = style.dropShadowBlur;\n                context.shadowOffsetX = Math.cos(style.dropShadowAngle) * style.dropShadowDistance;\n                context.shadowOffsetY = (Math.sin(style.dropShadowAngle) * style.dropShadowDistance) + dsOffsetShadow;\n            }\n            else\n            {\n                // set canvas text styles\n                context.fillStyle = this._generateFillStyle(style, lines);\n                context.strokeStyle = style.stroke;\n\n                context.shadowColor = 0;\n                context.shadowBlur = 0;\n                context.shadowOffsetX = 0;\n                context.shadowOffsetY = 0;\n            }\n\n            // draw lines line by line\n            for (let i = 0; i < lines.length; i++)\n            {\n                linePositionX = style.strokeThickness / 2;\n                linePositionY = ((style.strokeThickness / 2) + (i * lineHeight)) + fontProperties.ascent;\n\n                if (style.align === 'right')\n                {\n                    linePositionX += maxLineWidth - lineWidths[i];\n                }\n                else if (style.align === 'center')\n                {\n                    linePositionX += (maxLineWidth - lineWidths[i]) / 2;\n                }\n\n                if (style.stroke && style.strokeThickness)\n                {\n                    this.drawLetterSpacing(\n                        lines[i],\n                        linePositionX + style.padding,\n                        linePositionY + style.padding - dsOffsetText,\n                        true\n                    );\n                }\n\n                if (style.fill)\n                {\n                    this.drawLetterSpacing(\n                        lines[i],\n                        linePositionX + style.padding,\n                        linePositionY + style.padding - dsOffsetText\n                    );\n                }\n            }\n        }\n\n        this.updateTexture();\n    }\n\n    /**\n     * Render the text with letter-spacing.\n     * @param {string} text - The text to draw\n     * @param {number} x - Horizontal position to draw the text\n     * @param {number} y - Vertical position to draw the text\n     * @param {boolean} [isStroke=false] - Is this drawing for the outside stroke of the\n     *  text? If not, it's for the inside fill\n     * @private\n     */\n    drawLetterSpacing(text, x, y, isStroke = false)\n    {\n        const style = this._style;\n\n        // letterSpacing of 0 means normal\n        const letterSpacing = style.letterSpacing;\n\n        if (letterSpacing === 0)\n        {\n            if (isStroke)\n            {\n                this.context.strokeText(text, x, y);\n            }\n            else\n            {\n                this.context.fillText(text, x, y);\n            }\n\n            return;\n        }\n\n        let currentPosition = x;\n\n        // Using Array.from correctly splits characters whilst keeping emoji together.\n        // This is not supported on IE as it requires ES6, so regular text splitting occurs.\n        // This also doesn't account for emoji that are multiple emoji put together to make something else.\n        // Handling all of this would require a big library itself.\n        // https://medium.com/@giltayar/iterating-over-emoji-characters-the-es6-way-f06e4589516\n        // https://github.com/orling/grapheme-splitter\n        const stringArray = Array.from ? Array.from(text) : text.split('');\n        let previousWidth = this.context.measureText(text).width;\n        let currentWidth = 0;\n\n        for (let i = 0; i < stringArray.length; ++i)\n        {\n            const currentChar = stringArray[i];\n\n            if (isStroke)\n            {\n                this.context.strokeText(currentChar, currentPosition, y);\n            }\n            else\n            {\n                this.context.fillText(currentChar, currentPosition, y);\n            }\n            currentWidth = this.context.measureText(text.substring(i + 1)).width;\n            currentPosition += previousWidth - currentWidth + letterSpacing;\n            previousWidth = currentWidth;\n        }\n    }\n\n    /**\n     * Updates texture size based on canvas size\n     *\n     * @private\n     */\n    updateTexture()\n    {\n        const canvas = this.canvas;\n\n        if (this._style.trim)\n        {\n            const trimmed = trimCanvas(canvas);\n\n            if (trimmed.data)\n            {\n                canvas.width = trimmed.width;\n                canvas.height = trimmed.height;\n                this.context.putImageData(trimmed.data, 0, 0);\n            }\n        }\n\n        const texture = this._texture;\n        const style = this._style;\n        const padding = style.trim ? 0 : style.padding;\n        const baseTexture = texture.baseTexture;\n\n        texture.trim.width = texture._frame.width = Math.ceil(canvas.width / this._resolution);\n        texture.trim.height = texture._frame.height = Math.ceil(canvas.height / this._resolution);\n        texture.trim.x = -padding;\n        texture.trim.y = -padding;\n\n        texture.orig.width = texture._frame.width - (padding * 2);\n        texture.orig.height = texture._frame.height - (padding * 2);\n\n        // call sprite onTextureUpdate to update scale if _width or _height were set\n        this._onTextureUpdate();\n\n        baseTexture.setRealSize(canvas.width, canvas.height, this._resolution);\n\n        this.dirty = false;\n    }\n\n    /**\n     * Renders the object using the WebGL renderer\n     *\n     * @private\n     * @param {PIXI.Renderer} renderer - The renderer\n     */\n    _render(renderer)\n    {\n        if (this._autoResolution && this._resolution !== renderer.resolution)\n        {\n            this._resolution = renderer.resolution;\n            this.dirty = true;\n        }\n\n        this.updateText(true);\n\n        super._render(renderer);\n    }\n\n    /**\n     * Gets the local bounds of the text object.\n     *\n     * @param {PIXI.Rectangle} rect - The output rectangle.\n     * @return {PIXI.Rectangle} The bounds.\n     */\n    getLocalBounds(rect)\n    {\n        this.updateText(true);\n\n        return super.getLocalBounds.call(this, rect);\n    }\n\n    /**\n     * calculates the bounds of the Text as a rectangle. The bounds calculation takes the worldTransform into account.\n     * @protected\n     */\n    _calculateBounds()\n    {\n        this.updateText(true);\n        this.calculateVertices();\n        // if we have already done this on THIS frame.\n        this._bounds.addQuad(this.vertexData);\n    }\n\n    /**\n     * Method to be called upon a TextStyle change.\n     * @private\n     */\n    _onStyleChange()\n    {\n        this.dirty = true;\n    }\n\n    /**\n     * Generates the fill style. Can automatically generate a gradient based on the fill style being an array\n     *\n     * @private\n     * @param {object} style - The style.\n     * @param {string[]} lines - The lines of text.\n     * @return {string|number|CanvasGradient} The fill style\n     */\n    _generateFillStyle(style, lines)\n    {\n        if (!Array.isArray(style.fill))\n        {\n            return style.fill;\n        }\n        else if (style.fill.length === 1)\n        {\n            return style.fill[0];\n        }\n\n        // the gradient will be evenly spaced out according to how large the array is.\n        // ['#FF0000', '#00FF00', '#0000FF'] would created stops at 0.25, 0.5 and 0.75\n        let gradient;\n        let totalIterations;\n        let currentIteration;\n        let stop;\n\n        const width = Math.ceil(this.canvas.width / this._resolution);\n        const height = Math.ceil(this.canvas.height / this._resolution);\n\n        // make a copy of the style settings, so we can manipulate them later\n        const fill = style.fill.slice();\n        const fillGradientStops = style.fillGradientStops.slice();\n\n        // wanting to evenly distribute the fills. So an array of 4 colours should give fills of 0.25, 0.5 and 0.75\n        if (!fillGradientStops.length)\n        {\n            const lengthPlus1 = fill.length + 1;\n\n            for (let i = 1; i < lengthPlus1; ++i)\n            {\n                fillGradientStops.push(i / lengthPlus1);\n            }\n        }\n\n        // stop the bleeding of the last gradient on the line above to the top gradient of the this line\n        // by hard defining the first gradient colour at point 0, and last gradient colour at point 1\n        fill.unshift(style.fill[0]);\n        fillGradientStops.unshift(0);\n\n        fill.push(style.fill[style.fill.length - 1]);\n        fillGradientStops.push(1);\n\n        if (style.fillGradientType === TEXT_GRADIENT.LINEAR_VERTICAL)\n        {\n            // start the gradient at the top center of the canvas, and end at the bottom middle of the canvas\n            gradient = this.context.createLinearGradient(width / 2, 0, width / 2, height);\n\n            // we need to repeat the gradient so that each individual line of text has the same vertical gradient effect\n            // ['#FF0000', '#00FF00', '#0000FF'] over 2 lines would create stops at 0.125, 0.25, 0.375, 0.625, 0.75, 0.875\n            totalIterations = (fill.length + 1) * lines.length;\n            currentIteration = 0;\n            for (let i = 0; i < lines.length; i++)\n            {\n                currentIteration += 1;\n                for (let j = 0; j < fill.length; j++)\n                {\n                    if (typeof fillGradientStops[j] === 'number')\n                    {\n                        stop = (fillGradientStops[j] / lines.length) + (i / lines.length);\n                    }\n                    else\n                    {\n                        stop = currentIteration / totalIterations;\n                    }\n                    gradient.addColorStop(stop, fill[j]);\n                    currentIteration++;\n                }\n            }\n        }\n        else\n        {\n            // start the gradient at the center left of the canvas, and end at the center right of the canvas\n            gradient = this.context.createLinearGradient(0, height / 2, width, height / 2);\n\n            // can just evenly space out the gradients in this case, as multiple lines makes no difference\n            // to an even left to right gradient\n            totalIterations = fill.length + 1;\n            currentIteration = 1;\n\n            for (let i = 0; i < fill.length; i++)\n            {\n                if (typeof fillGradientStops[i] === 'number')\n                {\n                    stop = fillGradientStops[i];\n                }\n                else\n                {\n                    stop = currentIteration / totalIterations;\n                }\n                gradient.addColorStop(stop, fill[i]);\n                currentIteration++;\n            }\n        }\n\n        return gradient;\n    }\n\n    /**\n     * Destroys this text object.\n     * Note* Unlike a Sprite, a Text object will automatically destroy its baseTexture and texture as\n     * the majority of the time the texture will not be shared with any other Sprites.\n     *\n     * @param {object|boolean} [options] - Options parameter. A boolean will act as if all options\n     *  have been set to that value\n     * @param {boolean} [options.children=false] - if set to true, all the children will have their\n     *  destroy method called as well. 'options' will be passed on to those calls.\n     * @param {boolean} [options.texture=true] - Should it destroy the current texture of the sprite as well\n     * @param {boolean} [options.baseTexture=true] - Should it destroy the base texture of the sprite as well\n     */\n    destroy(options)\n    {\n        if (typeof options === 'boolean')\n        {\n            options = { children: options };\n        }\n\n        options = Object.assign({}, defaultDestroyOptions, options);\n\n        super.destroy(options);\n\n        // make sure to reset the the context and canvas.. dont want this hanging around in memory!\n        this.context = null;\n        this.canvas = null;\n\n        this._style = null;\n    }\n\n    /**\n     * The width of the Text, setting this will actually modify the scale to achieve the value set\n     *\n     * @member {number}\n     */\n    get width()\n    {\n        this.updateText(true);\n\n        return Math.abs(this.scale.x) * this._texture.orig.width;\n    }\n\n    set width(value) // eslint-disable-line require-jsdoc\n    {\n        this.updateText(true);\n\n        const s = sign(this.scale.x) || 1;\n\n        this.scale.x = s * value / this._texture.orig.width;\n        this._width = value;\n    }\n\n    /**\n     * The height of the Text, setting this will actually modify the scale to achieve the value set\n     *\n     * @member {number}\n     */\n    get height()\n    {\n        this.updateText(true);\n\n        return Math.abs(this.scale.y) * this._texture.orig.height;\n    }\n\n    set height(value) // eslint-disable-line require-jsdoc\n    {\n        this.updateText(true);\n\n        const s = sign(this.scale.y) || 1;\n\n        this.scale.y = s * value / this._texture.orig.height;\n        this._height = value;\n    }\n\n    /**\n     * Set the style of the text. Set up an event listener to listen for changes on the style\n     * object and mark the text as dirty.\n     *\n     * @member {object|PIXI.TextStyle}\n     */\n    get style()\n    {\n        return this._style;\n    }\n\n    set style(style) // eslint-disable-line require-jsdoc\n    {\n        style = style || {};\n\n        if (style instanceof TextStyle)\n        {\n            this._style = style;\n        }\n        else\n        {\n            this._style = new TextStyle(style);\n        }\n\n        this.localStyleID = -1;\n        this.dirty = true;\n    }\n\n    /**\n     * Set the copy for the text object. To split a line you can use '\\n'.\n     *\n     * @member {string}\n     */\n    get text()\n    {\n        return this._text;\n    }\n\n    set text(text) // eslint-disable-line require-jsdoc\n    {\n        text = String(text === null || text === undefined ? '' : text);\n\n        if (this._text === text)\n        {\n            return;\n        }\n        this._text = text;\n        this.dirty = true;\n    }\n\n    /**\n     * The resolution / device pixel ratio of the canvas.\n     * This is set to automatically match the renderer resolution by default, but can be overridden by setting manually.\n     * @member {number}\n     * @default 1\n     */\n    get resolution()\n    {\n        return this._resolution;\n    }\n\n    set resolution(value) // eslint-disable-line require-jsdoc\n    {\n        this._autoResolution = false;\n\n        if (this._resolution === value)\n        {\n            return;\n        }\n\n        this._resolution = value;\n        this.dirty = true;\n    }\n}\n","import { settings } from '@pixi/settings';\n\n/**\n * Default number of uploads per frame using prepare plugin.\n *\n * @static\n * @memberof PIXI.settings\n * @name UPLOADS_PER_FRAME\n * @type {number}\n * @default 4\n */\nsettings.UPLOADS_PER_FRAME = 4;\n\nexport { settings };\n","/**\n * CountLimiter limits the number of items handled by a {@link PIXI.prepare.BasePrepare} to a specified\n * number of items per frame.\n *\n * @class\n * @memberof PIXI.prepare\n */\nexport default class CountLimiter\n{\n    /**\n     * @param {number} maxItemsPerFrame - The maximum number of items that can be prepared each frame.\n     */\n    constructor(maxItemsPerFrame)\n    {\n        /**\n         * The maximum number of items that can be prepared each frame.\n         * @type {number}\n         * @private\n         */\n        this.maxItemsPerFrame = maxItemsPerFrame;\n        /**\n         * The number of items that can be prepared in the current frame.\n         * @type {number}\n         * @private\n         */\n        this.itemsLeft = 0;\n    }\n\n    /**\n     * Resets any counting properties to start fresh on a new frame.\n     */\n    beginFrame()\n    {\n        this.itemsLeft = this.maxItemsPerFrame;\n    }\n\n    /**\n     * Checks to see if another item can be uploaded. This should only be called once per item.\n     * @return {boolean} If the item is allowed to be uploaded.\n     */\n    allowedToUpload()\n    {\n        return this.itemsLeft-- > 0;\n    }\n}\n","import { Texture, BaseTexture } from '@pixi/core';\nimport { Ticker, UPDATE_PRIORITY } from '@pixi/ticker';\nimport { settings } from '@pixi/settings';\nimport { Container } from '@pixi/display';\nimport { Text, TextStyle, TextMetrics } from '@pixi/text';\nimport CountLimiter from './CountLimiter';\n\n/**\n * The prepare manager provides functionality to upload content to the GPU.\n *\n * BasePrepare handles basic queuing functionality and is extended by\n * {@link PIXI.prepare.Prepare} and {@link PIXI.prepare.CanvasPrepare}\n * to provide preparation capabilities specific to their respective renderers.\n *\n * @example\n * // Create a sprite\n * const sprite = PIXI.Sprite.from('something.png');\n *\n * // Load object into GPU\n * app.renderer.plugins.prepare.upload(sprite, () => {\n *\n *     //Texture(s) has been uploaded to GPU\n *     app.stage.addChild(sprite);\n *\n * })\n *\n * @abstract\n * @class\n * @memberof PIXI.prepare\n */\nexport default class BasePrepare\n{\n    /**\n     * @param {PIXI.AbstractRenderer} renderer - A reference to the current renderer\n     */\n    constructor(renderer)\n    {\n        /**\n         * The limiter to be used to control how quickly items are prepared.\n         * @type {PIXI.prepare.CountLimiter|PIXI.prepare.TimeLimiter}\n         */\n        this.limiter = new CountLimiter(settings.UPLOADS_PER_FRAME);\n\n        /**\n         * Reference to the renderer.\n         * @type {PIXI.AbstractRenderer}\n         * @protected\n         */\n        this.renderer = renderer;\n\n        /**\n         * The only real difference between CanvasPrepare and Prepare is what they pass\n         * to upload hooks. That different parameter is stored here.\n         * @type {PIXI.prepare.CanvasPrepare|PIXI.Renderer}\n         * @protected\n         */\n        this.uploadHookHelper = null;\n\n        /**\n         * Collection of items to uploads at once.\n         * @type {Array<*>}\n         * @private\n         */\n        this.queue = [];\n\n        /**\n         * Collection of additional hooks for finding assets.\n         * @type {Array<Function>}\n         * @private\n         */\n        this.addHooks = [];\n\n        /**\n         * Collection of additional hooks for processing assets.\n         * @type {Array<Function>}\n         * @private\n         */\n        this.uploadHooks = [];\n\n        /**\n         * Callback to call after completed.\n         * @type {Array<Function>}\n         * @private\n         */\n        this.completes = [];\n\n        /**\n         * If prepare is ticking (running).\n         * @type {boolean}\n         * @private\n         */\n        this.ticking = false;\n\n        /**\n         * 'bound' call for prepareItems().\n         * @type {Function}\n         * @private\n         */\n        this.delayedTick = () =>\n        {\n            // unlikely, but in case we were destroyed between tick() and delayedTick()\n            if (!this.queue)\n            {\n                return;\n            }\n            this.prepareItems();\n        };\n\n        // hooks to find the correct texture\n        this.registerFindHook(findText);\n        this.registerFindHook(findTextStyle);\n        this.registerFindHook(findMultipleBaseTextures);\n        this.registerFindHook(findBaseTexture);\n        this.registerFindHook(findTexture);\n\n        // upload hooks\n        this.registerUploadHook(drawText);\n        this.registerUploadHook(calculateTextStyle);\n    }\n\n    /**\n     * Upload all the textures and graphics to the GPU.\n     *\n     * @param {Function|PIXI.DisplayObject|PIXI.Container|PIXI.BaseTexture|PIXI.Texture|PIXI.Graphics|PIXI.Text} item -\n     *        Either the container or display object to search for items to upload, the items to upload themselves,\n     *        or the callback function, if items have been added using `prepare.add`.\n     * @param {Function} [done] - Optional callback when all queued uploads have completed\n     */\n    upload(item, done)\n    {\n        if (typeof item === 'function')\n        {\n            done = item;\n            item = null;\n        }\n\n        // If a display object, search for items\n        // that we could upload\n        if (item)\n        {\n            this.add(item);\n        }\n\n        // Get the items for upload from the display\n        if (this.queue.length)\n        {\n            if (done)\n            {\n                this.completes.push(done);\n            }\n\n            if (!this.ticking)\n            {\n                this.ticking = true;\n                Ticker.system.addOnce(this.tick, this, UPDATE_PRIORITY.UTILITY);\n            }\n        }\n        else if (done)\n        {\n            done();\n        }\n    }\n\n    /**\n     * Handle tick update\n     *\n     * @private\n     */\n    tick()\n    {\n        setTimeout(this.delayedTick, 0);\n    }\n\n    /**\n     * Actually prepare items. This is handled outside of the tick because it will take a while\n     * and we do NOT want to block the current animation frame from rendering.\n     *\n     * @private\n     */\n    prepareItems()\n    {\n        this.limiter.beginFrame();\n        // Upload the graphics\n        while (this.queue.length && this.limiter.allowedToUpload())\n        {\n            const item = this.queue[0];\n            let uploaded = false;\n\n            if (item && !item._destroyed)\n            {\n                for (let i = 0, len = this.uploadHooks.length; i < len; i++)\n                {\n                    if (this.uploadHooks[i](this.uploadHookHelper, item))\n                    {\n                        this.queue.shift();\n                        uploaded = true;\n                        break;\n                    }\n                }\n            }\n\n            if (!uploaded)\n            {\n                this.queue.shift();\n            }\n        }\n\n        // We're finished\n        if (!this.queue.length)\n        {\n            this.ticking = false;\n\n            const completes = this.completes.slice(0);\n\n            this.completes.length = 0;\n\n            for (let i = 0, len = completes.length; i < len; i++)\n            {\n                completes[i]();\n            }\n        }\n        else\n        {\n            // if we are not finished, on the next rAF do this again\n            Ticker.system.addOnce(this.tick, this, UPDATE_PRIORITY.UTILITY);\n        }\n    }\n\n    /**\n     * Adds hooks for finding items.\n     *\n     * @param {Function} addHook - Function call that takes two parameters: `item:*, queue:Array`\n     *          function must return `true` if it was able to add item to the queue.\n     * @return {PIXI.prepare.BasePrepare} Instance of plugin for chaining.\n     */\n    registerFindHook(addHook)\n    {\n        if (addHook)\n        {\n            this.addHooks.push(addHook);\n        }\n\n        return this;\n    }\n\n    /**\n     * Adds hooks for uploading items.\n     *\n     * @param {Function} uploadHook - Function call that takes two parameters: `prepare:CanvasPrepare, item:*` and\n     *          function must return `true` if it was able to handle upload of item.\n     * @return {PIXI.prepare.BasePrepare} Instance of plugin for chaining.\n     */\n    registerUploadHook(uploadHook)\n    {\n        if (uploadHook)\n        {\n            this.uploadHooks.push(uploadHook);\n        }\n\n        return this;\n    }\n\n    /**\n     * Manually add an item to the uploading queue.\n     *\n     * @param {PIXI.DisplayObject|PIXI.Container|PIXI.BaseTexture|PIXI.Texture|PIXI.Graphics|PIXI.Text|*} item - Object to\n     *        add to the queue\n     * @return {PIXI.prepare.BasePrepare} Instance of plugin for chaining.\n     */\n    add(item)\n    {\n        // Add additional hooks for finding elements on special\n        // types of objects that\n        for (let i = 0, len = this.addHooks.length; i < len; i++)\n        {\n            if (this.addHooks[i](item, this.queue))\n            {\n                break;\n            }\n        }\n\n        // Get children recursively\n        if (item instanceof Container)\n        {\n            for (let i = item.children.length - 1; i >= 0; i--)\n            {\n                this.add(item.children[i]);\n            }\n        }\n\n        return this;\n    }\n\n    /**\n     * Destroys the plugin, don't use after this.\n     *\n     */\n    destroy()\n    {\n        if (this.ticking)\n        {\n            Ticker.system.remove(this.tick, this);\n        }\n        this.ticking = false;\n        this.addHooks = null;\n        this.uploadHooks = null;\n        this.renderer = null;\n        this.completes = null;\n        this.queue = null;\n        this.limiter = null;\n        this.uploadHookHelper = null;\n    }\n}\n\n/**\n * Built-in hook to find multiple textures from objects like AnimatedSprites.\n *\n * @private\n * @param {PIXI.DisplayObject} item - Display object to check\n * @param {Array<*>} queue - Collection of items to upload\n * @return {boolean} if a PIXI.Texture object was found.\n */\nfunction findMultipleBaseTextures(item, queue)\n{\n    let result = false;\n\n    // Objects with multiple textures\n    if (item && item._textures && item._textures.length)\n    {\n        for (let i = 0; i < item._textures.length; i++)\n        {\n            if (item._textures[i] instanceof Texture)\n            {\n                const baseTexture = item._textures[i].baseTexture;\n\n                if (queue.indexOf(baseTexture) === -1)\n                {\n                    queue.push(baseTexture);\n                    result = true;\n                }\n            }\n        }\n    }\n\n    return result;\n}\n\n/**\n * Built-in hook to find BaseTextures from Sprites.\n *\n * @private\n * @param {PIXI.DisplayObject} item - Display object to check\n * @param {Array<*>} queue - Collection of items to upload\n * @return {boolean} if a PIXI.Texture object was found.\n */\nfunction findBaseTexture(item, queue)\n{\n    // Objects with textures, like Sprites/Text\n    if (item instanceof BaseTexture)\n    {\n        if (queue.indexOf(item) === -1)\n        {\n            queue.push(item);\n        }\n\n        return true;\n    }\n\n    return false;\n}\n\n/**\n * Built-in hook to find textures from objects.\n *\n * @private\n * @param {PIXI.DisplayObject} item - Display object to check\n * @param {Array<*>} queue - Collection of items to upload\n * @return {boolean} if a PIXI.Texture object was found.\n */\nfunction findTexture(item, queue)\n{\n    if (item._texture && item._texture instanceof Texture)\n    {\n        const texture = item._texture.baseTexture;\n\n        if (queue.indexOf(texture) === -1)\n        {\n            queue.push(texture);\n        }\n\n        return true;\n    }\n\n    return false;\n}\n\n/**\n * Built-in hook to draw PIXI.Text to its texture.\n *\n * @private\n * @param {PIXI.Renderer|PIXI.CanvasPrepare} helper - Not used by this upload handler\n * @param {PIXI.DisplayObject} item - Item to check\n * @return {boolean} If item was uploaded.\n */\nfunction drawText(helper, item)\n{\n    if (item instanceof Text)\n    {\n        // updating text will return early if it is not dirty\n        item.updateText(true);\n\n        return true;\n    }\n\n    return false;\n}\n\n/**\n * Built-in hook to calculate a text style for a PIXI.Text object.\n *\n * @private\n * @param {PIXI.Renderer|PIXI.CanvasPrepare} helper - Not used by this upload handler\n * @param {PIXI.DisplayObject} item - Item to check\n * @return {boolean} If item was uploaded.\n */\nfunction calculateTextStyle(helper, item)\n{\n    if (item instanceof TextStyle)\n    {\n        const font = item.toFontString();\n\n        TextMetrics.measureFont(font);\n\n        return true;\n    }\n\n    return false;\n}\n\n/**\n * Built-in hook to find Text objects.\n *\n * @private\n * @param {PIXI.DisplayObject} item - Display object to check\n * @param {Array<*>} queue - Collection of items to upload\n * @return {boolean} if a PIXI.Text object was found.\n */\nfunction findText(item, queue)\n{\n    if (item instanceof Text)\n    {\n        // push the text style to prepare it - this can be really expensive\n        if (queue.indexOf(item.style) === -1)\n        {\n            queue.push(item.style);\n        }\n        // also push the text object so that we can render it (to canvas/texture) if needed\n        if (queue.indexOf(item) === -1)\n        {\n            queue.push(item);\n        }\n        // also push the Text's texture for upload to GPU\n        const texture = item._texture.baseTexture;\n\n        if (queue.indexOf(texture) === -1)\n        {\n            queue.push(texture);\n        }\n\n        return true;\n    }\n\n    return false;\n}\n\n/**\n * Built-in hook to find TextStyle objects.\n *\n * @private\n * @param {PIXI.TextStyle} item - Display object to check\n * @param {Array<*>} queue - Collection of items to upload\n * @return {boolean} if a PIXI.TextStyle object was found.\n */\nfunction findTextStyle(item, queue)\n{\n    if (item instanceof TextStyle)\n    {\n        if (queue.indexOf(item) === -1)\n        {\n            queue.push(item);\n        }\n\n        return true;\n    }\n\n    return false;\n}\n","import { BaseTexture } from '@pixi/core';\nimport { Graphics } from '@pixi/graphics';\nimport BasePrepare from './BasePrepare';\n\n/**\n * The prepare manager provides functionality to upload content to the GPU.\n *\n * An instance of this class is automatically created by default, and can be found at `renderer.plugins.prepare`\n *\n * @class\n * @extends PIXI.prepare.BasePrepare\n * @memberof PIXI.prepare\n */\nexport default class Prepare extends BasePrepare\n{\n    /**\n     * @param {PIXI.Renderer} renderer - A reference to the current renderer\n     */\n    constructor(renderer)\n    {\n        super(renderer);\n\n        this.uploadHookHelper = this.renderer;\n\n        // Add textures and graphics to upload\n        this.registerFindHook(findGraphics);\n        this.registerUploadHook(uploadBaseTextures);\n        this.registerUploadHook(uploadGraphics);\n    }\n}\n/**\n * Built-in hook to upload PIXI.Texture objects to the GPU.\n *\n * @private\n * @param {PIXI.Renderer} renderer - instance of the webgl renderer\n * @param {PIXI.DisplayObject} item - Item to check\n * @return {boolean} If item was uploaded.\n */\nfunction uploadBaseTextures(renderer, item)\n{\n    if (item instanceof BaseTexture)\n    {\n        // if the texture already has a GL texture, then the texture has been prepared or rendered\n        // before now. If the texture changed, then the changer should be calling texture.update() which\n        // reuploads the texture without need for preparing it again\n        if (!item._glTextures[renderer.CONTEXT_UID])\n        {\n            renderer.texture.bind(item);\n        }\n\n        return true;\n    }\n\n    return false;\n}\n\n/**\n * Built-in hook to upload PIXI.Graphics to the GPU.\n *\n * @private\n * @param {PIXI.Renderer} renderer - instance of the webgl renderer\n * @param {PIXI.DisplayObject} item - Item to check\n * @return {boolean} If item was uploaded.\n */\nfunction uploadGraphics(renderer, item)\n{\n    if (item instanceof Graphics)\n    {\n        // if the item is not dirty and already has webgl data, then it got prepared or rendered\n        // before now and we shouldn't waste time updating it again\n        if (item.dirty || item.clearDirty || !item._webGL[renderer.plugins.graphics.CONTEXT_UID])\n        {\n            renderer.plugins.graphics.updateGraphics(item);\n        }\n\n        return true;\n    }\n\n    return false;\n}\n\n/**\n * Built-in hook to find graphics.\n *\n * @private\n * @param {PIXI.DisplayObject} item - Display object to check\n * @param {Array<*>} queue - Collection of items to upload\n * @return {boolean} if a PIXI.Graphics object was found.\n */\nfunction findGraphics(item, queue)\n{\n    if (item instanceof Graphics)\n    {\n        queue.push(item);\n\n        return true;\n    }\n\n    return false;\n}\n","/**\n * TimeLimiter limits the number of items handled by a {@link PIXI.BasePrepare} to a specified\n * number of milliseconds per frame.\n *\n * @class\n * @memberof PIXI.prepare\n */\nexport default class TimeLimiter\n{\n    /**\n     * @param {number} maxMilliseconds - The maximum milliseconds that can be spent preparing items each frame.\n     */\n    constructor(maxMilliseconds)\n    {\n        /**\n         * The maximum milliseconds that can be spent preparing items each frame.\n         * @type {number}\n         * @private\n         */\n        this.maxMilliseconds = maxMilliseconds;\n        /**\n         * The start time of the current frame.\n         * @type {number}\n         * @private\n         */\n        this.frameStart = 0;\n    }\n\n    /**\n     * Resets any counting properties to start fresh on a new frame.\n     */\n    beginFrame()\n    {\n        this.frameStart = Date.now();\n    }\n\n    /**\n     * Checks to see if another item can be uploaded. This should only be called once per item.\n     * @return {boolean} If the item is allowed to be uploaded.\n     */\n    allowedToUpload()\n    {\n        return Date.now() - this.frameStart < this.maxMilliseconds;\n    }\n}\n","import { Container } from '@pixi/display';\nimport { autoDetectRenderer } from '@pixi/core';\n\n/**\n * Convenience class to create a new PIXI application.\n *\n * This class automatically creates the renderer, ticker and root container.\n *\n * @example\n * // Create the application\n * const app = new PIXI.Application();\n *\n * // Add the view to the DOM\n * document.body.appendChild(app.view);\n *\n * // ex, add display objects\n * app.stage.addChild(PIXI.Sprite.from('something.png'));\n *\n * @class\n * @memberof PIXI\n */\nexport default class Application\n{\n    /**\n     * @param {object} [options] - The optional renderer parameters.\n     * @param {boolean} [options.autoStart=true] - Automatically starts the rendering after the construction.\n     *     **Note**: Setting this parameter to false does NOT stop the shared ticker even if you set\n     *     options.sharedTicker to true in case that it is already started. Stop it by your own.\n     * @param {number} [options.width=800] - The width of the renderers view.\n     * @param {number} [options.height=600] - The height of the renderers view.\n     * @param {HTMLCanvasElement} [options.view] - The canvas to use as a view, optional.\n     * @param {boolean} [options.transparent=false] - If the render view is transparent.\n     * @param {boolean} [options.autoDensity=false] - Resizes renderer view in CSS pixels to allow for\n     *   resolutions other than 1.\n     * @param {boolean} [options.antialias=false] - Sets antialias\n     * @param {boolean} [options.preserveDrawingBuffer=false] - Enables drawing buffer preservation, enable this if you\n     *  need to call toDataUrl on the WebGL context.\n     * @param {number} [options.resolution=1] - The resolution / device pixel ratio of the renderer, retina would be 2.\n     * @param {boolean} [options.forceCanvas=false] - prevents selection of WebGL renderer, even if such is present, this\n     *   option only is available when using **pixi.js-legacy** or **@pixi/canvas-renderer** modules, otherwise\n     *   it is ignored.\n     * @param {number} [options.backgroundColor=0x000000] - The background color of the rendered area\n     *  (shown if not transparent).\n     * @param {boolean} [options.clearBeforeRender=true] - This sets if the renderer will clear the canvas or\n     *   not before the new render pass.\n     * @param {boolean} [options.forceFXAA=false] - Forces FXAA antialiasing to be used over native.\n     *  FXAA is faster, but may not always look as great. **(WebGL only)**.\n     * @param {string} [options.powerPreference] - Parameter passed to webgl context, set to \"high-performance\"\n     *  for devices with dual graphics card. **(WebGL only)**.\n     * @param {boolean} [options.sharedTicker=false] - `true` to use PIXI.Ticker.shared, `false` to create new ticker.\n     *  If set to false, you cannot register a handler to occur before anything that runs on the shared ticker.\n     *  The system ticker will always run before both the shared ticker and the app ticker.\n     * @param {boolean} [options.sharedLoader=false] - `true` to use PIXI.Loader.shared, `false` to create new Loader.\n     * @param {Window|HTMLElement} [options.resizeTo] - Element to automatically resize stage to.\n     */\n    constructor(options)\n    {\n        // The default options\n        options = Object.assign({\n            forceCanvas: false,\n        }, options);\n\n        /**\n         * WebGL renderer if available, otherwise CanvasRenderer.\n         * @member {PIXI.Renderer|PIXI.CanvasRenderer}\n         */\n        this.renderer = autoDetectRenderer(options);\n\n        /**\n         * The root display container that's rendered.\n         * @member {PIXI.Container}\n         */\n        this.stage = new Container();\n\n        // install plugins here\n        Application._plugins.forEach((plugin) =>\n        {\n            plugin.init.call(this, options);\n        });\n    }\n\n    /**\n     * Register a middleware plugin for the application\n     * @static\n     * @param {PIXI.Application.Plugin} plugin - Plugin being installed\n     */\n    static registerPlugin(plugin)\n    {\n        Application._plugins.push(plugin);\n    }\n\n    /**\n     * Render the current stage.\n     */\n    render()\n    {\n        this.renderer.render(this.stage);\n    }\n\n    /**\n     * Reference to the renderer's canvas element.\n     * @member {HTMLCanvasElement}\n     * @readonly\n     */\n    get view()\n    {\n        return this.renderer.view;\n    }\n\n    /**\n     * Reference to the renderer's screen rectangle. Its safe to use as `filterArea` or `hitArea` for the whole screen.\n     * @member {PIXI.Rectangle}\n     * @readonly\n     */\n    get screen()\n    {\n        return this.renderer.screen;\n    }\n\n    /**\n     * Destroy and don't use after this.\n     * @param {Boolean} [removeView=false] Automatically remove canvas from DOM.\n     * @param {object|boolean} [stageOptions] - Options parameter. A boolean will act as if all options\n     *  have been set to that value\n     * @param {boolean} [stageOptions.children=false] - if set to true, all the children will have their destroy\n     *  method called as well. 'stageOptions' will be passed on to those calls.\n     * @param {boolean} [stageOptions.texture=false] - Only used for child Sprites if stageOptions.children is set\n     *  to true. Should it destroy the texture of the child sprite\n     * @param {boolean} [stageOptions.baseTexture=false] - Only used for child Sprites if stageOptions.children is set\n     *  to true. Should it destroy the base texture of the child sprite\n     */\n    destroy(removeView, stageOptions)\n    {\n        // Destroy plugins in the opposite order\n        // which they were constructed\n        const plugins = Application._plugins.slice(0);\n\n        plugins.reverse();\n        plugins.forEach((plugin) =>\n        {\n            plugin.destroy.call(this);\n        });\n\n        this.stage.destroy(stageOptions);\n        this.stage = null;\n\n        this.renderer.destroy(removeView);\n        this.renderer = null;\n\n        this._options = null;\n    }\n}\n\n/**\n * @memberof PIXI.Application\n * @typedef {object} Plugin\n * @property {function} init - Called when Application is constructed, scoped to Application instance.\n *  Passes in `options` as the only argument, which are Application constructor options.\n * @property {function} destroy - Called when destroying Application, scoped to Application instance\n */\n\n/**\n * Collection of installed plugins.\n * @static\n * @private\n * @type {PIXI.Application.Plugin[]}\n */\nApplication._plugins = [];\n","/**\n * Middleware for for Application's resize functionality\n * @private\n * @class\n */\nexport default class ResizePlugin\n{\n    /**\n     * Initialize the plugin with scope of application instance\n     * @static\n     * @private\n     * @param {object} [options] - See application options\n     */\n    static init(options)\n    {\n        /**\n         * The element or window to resize the application to.\n         * @type {Window|HTMLElement}\n         * @name resizeTo\n         * @memberof PIXI.Application#\n         */\n        Object.defineProperty(this, 'resizeTo',\n            {\n                set(dom)\n                {\n                    window.removeEventListener('resize', this.resize);\n                    this._resizeTo = dom;\n                    if (dom)\n                    {\n                        window.addEventListener('resize', this.resize);\n                        this.resize();\n                    }\n                },\n                get()\n                {\n                    return this._resizeTo;\n                },\n            });\n\n        /**\n         * If `resizeTo` is set, calling this function\n         * will resize to the width and height of that element.\n         * @method PIXI.Application#resize\n         */\n        this.resize = () =>\n        {\n            if (this._resizeTo)\n            {\n                // Resize to the window\n                if (this._resizeTo === window)\n                {\n                    this.renderer.resize(\n                        window.innerWidth,\n                        window.innerHeight\n                    );\n                }\n                // Resize to other HTML entities\n                else\n                {\n                    this.renderer.resize(\n                        this._resizeTo.clientWidth,\n                        this._resizeTo.clientHeight\n                    );\n                }\n            }\n        };\n\n        // On resize\n        this._resizeTo = null;\n        this.resizeTo = options.resizeTo || null;\n    }\n\n    /**\n     * Clean up the ticker, scoped to application\n     * @static\n     * @private\n     */\n    static destroy()\n    {\n        this.resizeTo = null;\n        this.resize = null;\n    }\n}\n","import Application from './Application';\nimport ResizePlugin from './ResizePlugin';\n\nApplication.registerPlugin(ResizePlugin);\n\nexport { Application };\n","'use strict'\n\nmodule.exports = function parseURI (str, opts) {\n  opts = opts || {}\n\n  var o = {\n    key: ['source', 'protocol', 'authority', 'userInfo', 'user', 'password', 'host', 'port', 'relative', 'path', 'directory', 'file', 'query', 'anchor'],\n    q: {\n      name: 'queryKey',\n      parser: /(?:^|&)([^&=]*)=?([^&]*)/g\n    },\n    parser: {\n      strict: /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n      loose: /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/\n    }\n  }\n\n  var m = o.parser[opts.strictMode ? 'strict' : 'loose'].exec(str)\n  var uri = {}\n  var i = 14\n\n  while (i--) uri[o.key[i]] = m[i] || ''\n\n  uri[o.q.name] = {}\n  uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n    if ($1) uri[o.q.name][$1] = $2\n  })\n\n  return uri\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n  value: true\n});\n\nvar _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }\n\nvar MiniSignalBinding = (function () {\n  function MiniSignalBinding(fn, once, thisArg) {\n    if (once === undefined) once = false;\n\n    _classCallCheck(this, MiniSignalBinding);\n\n    this._fn = fn;\n    this._once = once;\n    this._thisArg = thisArg;\n    this._next = this._prev = this._owner = null;\n  }\n\n  _createClass(MiniSignalBinding, [{\n    key: 'detach',\n    value: function detach() {\n      if (this._owner === null) return false;\n      this._owner.detach(this);\n      return true;\n    }\n  }]);\n\n  return MiniSignalBinding;\n})();\n\nfunction _addMiniSignalBinding(self, node) {\n  if (!self._head) {\n    self._head = node;\n    self._tail = node;\n  } else {\n    self._tail._next = node;\n    node._prev = self._tail;\n    self._tail = node;\n  }\n\n  node._owner = self;\n\n  return node;\n}\n\nvar MiniSignal = (function () {\n  function MiniSignal() {\n    _classCallCheck(this, MiniSignal);\n\n    this._head = this._tail = undefined;\n  }\n\n  _createClass(MiniSignal, [{\n    key: 'handlers',\n    value: function handlers() {\n      var exists = arguments.length <= 0 || arguments[0] === undefined ? false : arguments[0];\n\n      var node = this._head;\n\n      if (exists) return !!node;\n\n      var ee = [];\n\n      while (node) {\n        ee.push(node);\n        node = node._next;\n      }\n\n      return ee;\n    }\n  }, {\n    key: 'has',\n    value: function has(node) {\n      if (!(node instanceof MiniSignalBinding)) {\n        throw new Error('MiniSignal#has(): First arg must be a MiniSignalBinding object.');\n      }\n\n      return node._owner === this;\n    }\n  }, {\n    key: 'dispatch',\n    value: function dispatch() {\n      var node = this._head;\n\n      if (!node) return false;\n\n      while (node) {\n        if (node._once) this.detach(node);\n        node._fn.apply(node._thisArg, arguments);\n        node = node._next;\n      }\n\n      return true;\n    }\n  }, {\n    key: 'add',\n    value: function add(fn) {\n      var thisArg = arguments.length <= 1 || arguments[1] === undefined ? null : arguments[1];\n\n      if (typeof fn !== 'function') {\n        throw new Error('MiniSignal#add(): First arg must be a Function.');\n      }\n      return _addMiniSignalBinding(this, new MiniSignalBinding(fn, false, thisArg));\n    }\n  }, {\n    key: 'once',\n    value: function once(fn) {\n      var thisArg = arguments.length <= 1 || arguments[1] === undefined ? null : arguments[1];\n\n      if (typeof fn !== 'function') {\n        throw new Error('MiniSignal#once(): First arg must be a Function.');\n      }\n      return _addMiniSignalBinding(this, new MiniSignalBinding(fn, true, thisArg));\n    }\n  }, {\n    key: 'detach',\n    value: function detach(node) {\n      if (!(node instanceof MiniSignalBinding)) {\n        throw new Error('MiniSignal#detach(): First arg must be a MiniSignalBinding object.');\n      }\n      if (node._owner !== this) return this;\n\n      if (node._prev) node._prev._next = node._next;\n      if (node._next) node._next._prev = node._prev;\n\n      if (node === this._head) {\n        this._head = node._next;\n        if (node._next === null) {\n          this._tail = null;\n        }\n      } else if (node === this._tail) {\n        this._tail = node._prev;\n        this._tail._next = null;\n      }\n\n      node._owner = null;\n      return this;\n    }\n  }, {\n    key: 'detachAll',\n    value: function detachAll() {\n      var node = this._head;\n      if (!node) return this;\n\n      this._head = this._tail = null;\n\n      while (node) {\n        node._owner = null;\n        node = node._next;\n      }\n      return this;\n    }\n  }]);\n\n  return MiniSignal;\n})();\n\nMiniSignal.MiniSignalBinding = MiniSignalBinding;\n\nexports['default'] = MiniSignal;\nmodule.exports = exports['default'];\n","/**\n * Smaller version of the async library constructs.\n *\n * @namespace async\n */\n\n/**\n * Noop function\n *\n * @ignore\n * @function\n * @memberof async\n */\nfunction _noop() { /* empty */ }\n\n/**\n * Iterates an array in series.\n *\n * @memberof async\n * @function eachSeries\n * @param {Array.<*>} array - Array to iterate.\n * @param {function} iterator - Function to call for each element.\n * @param {function} callback - Function to call when done, or on error.\n * @param {boolean} [deferNext=false] - Break synchronous each loop by calling next with a setTimeout of 1.\n */\nexport function eachSeries(array, iterator, callback, deferNext) {\n    let i = 0;\n    const len = array.length;\n\n    (function next(err) {\n        if (err || i === len) {\n            if (callback) {\n                callback(err);\n            }\n\n            return;\n        }\n\n        if (deferNext) {\n            setTimeout(() => {\n                iterator(array[i++], next);\n            }, 1);\n        }\n        else {\n            iterator(array[i++], next);\n        }\n    })();\n}\n\n/**\n * Ensures a function is only called once.\n *\n * @ignore\n * @memberof async\n * @param {function} fn - The function to wrap.\n * @return {function} The wrapping function.\n */\nfunction onlyOnce(fn) {\n    return function onceWrapper() {\n        if (fn === null) {\n            throw new Error('Callback was already called.');\n        }\n\n        const callFn = fn;\n\n        fn = null;\n        callFn.apply(this, arguments);\n    };\n}\n\n/**\n * Async queue implementation,\n *\n * @memberof async\n * @function queue\n * @param {function} worker - The worker function to call for each task.\n * @param {number} concurrency - How many workers to run in parrallel.\n * @return {*} The async queue object.\n */\nexport function queue(worker, concurrency) {\n    if (concurrency == null) { // eslint-disable-line no-eq-null,eqeqeq\n        concurrency = 1;\n    }\n    else if (concurrency === 0) {\n        throw new Error('Concurrency must not be zero');\n    }\n\n    let workers = 0;\n    const q = {\n        _tasks: [],\n        concurrency,\n        saturated: _noop,\n        unsaturated: _noop,\n        buffer: concurrency / 4,\n        empty: _noop,\n        drain: _noop,\n        error: _noop,\n        started: false,\n        paused: false,\n        push(data, callback) {\n            _insert(data, false, callback);\n        },\n        kill() {\n            workers = 0;\n            q.drain = _noop;\n            q.started = false;\n            q._tasks = [];\n        },\n        unshift(data, callback) {\n            _insert(data, true, callback);\n        },\n        process() {\n            while (!q.paused && workers < q.concurrency && q._tasks.length) {\n                const task = q._tasks.shift();\n\n                if (q._tasks.length === 0) {\n                    q.empty();\n                }\n\n                workers += 1;\n\n                if (workers === q.concurrency) {\n                    q.saturated();\n                }\n\n                worker(task.data, onlyOnce(_next(task)));\n            }\n        },\n        length() {\n            return q._tasks.length;\n        },\n        running() {\n            return workers;\n        },\n        idle() {\n            return q._tasks.length + workers === 0;\n        },\n        pause() {\n            if (q.paused === true) {\n                return;\n            }\n\n            q.paused = true;\n        },\n        resume() {\n            if (q.paused === false) {\n                return;\n            }\n\n            q.paused = false;\n\n            // Need to call q.process once per concurrent\n            // worker to preserve full concurrency after pause\n            for (let w = 1; w <= q.concurrency; w++) {\n                q.process();\n            }\n        },\n    };\n\n    function _insert(data, insertAtFront, callback) {\n        if (callback != null && typeof callback !== 'function') { // eslint-disable-line no-eq-null,eqeqeq\n            throw new Error('task callback must be a function');\n        }\n\n        q.started = true;\n\n        if (data == null && q.idle()) { // eslint-disable-line no-eq-null,eqeqeq\n            // call drain immediately if there are no tasks\n            setTimeout(() => q.drain(), 1);\n\n            return;\n        }\n\n        const item = {\n            data,\n            callback: typeof callback === 'function' ? callback : _noop,\n        };\n\n        if (insertAtFront) {\n            q._tasks.unshift(item);\n        }\n        else {\n            q._tasks.push(item);\n        }\n\n        setTimeout(() => q.process(), 1);\n    }\n\n    function _next(task) {\n        return function next() {\n            workers -= 1;\n\n            task.callback.apply(task, arguments);\n\n            if (arguments[0] != null) { // eslint-disable-line no-eq-null,eqeqeq\n                q.error(arguments[0], task.data);\n            }\n\n            if (workers <= (q.concurrency - q.buffer)) {\n                q.unsaturated();\n            }\n\n            if (q.idle()) {\n                q.drain();\n            }\n\n            q.process();\n        };\n    }\n\n    return q;\n}\n","// a simple in-memory cache for resources\nconst cache = {};\n\n/**\n * A simple in-memory cache for resource.\n *\n * @memberof middleware\n * @function caching\n * @example\n * import { Loader, middleware } from 'resource-loader';\n * const loader = new Loader();\n * loader.use(middleware.caching);\n * @param {Resource} resource - Current Resource\n * @param {function} next - Callback when complete\n */\nexport function caching(resource, next) {\n    // if cached, then set data and complete the resource\n    if (cache[resource.url]) {\n        resource.data = cache[resource.url];\n        resource.complete(); // marks resource load complete and stops processing before middlewares\n    }\n    // if not cached, wait for complete and store it in the cache.\n    else {\n        resource.onComplete.once(() => (cache[this.url] = this.data));\n    }\n\n    next();\n}\n","import parseUri from 'parse-uri';\nimport Signal from 'mini-signals';\n\n// tests if CORS is supported in XHR, if not we need to use XDR\nconst useXdr = !!(window.XDomainRequest && !('withCredentials' in (new XMLHttpRequest())));\nlet tempAnchor = null;\n\n// some status constants\nconst STATUS_NONE = 0;\nconst STATUS_OK = 200;\nconst STATUS_EMPTY = 204;\nconst STATUS_IE_BUG_EMPTY = 1223;\nconst STATUS_TYPE_OK = 2;\n\n// noop\nfunction _noop() { /* empty */ }\n\n/**\n * Manages the state and loading of a resource and all child resources.\n *\n * @class\n */\nclass Resource {\n    /**\n     * Sets the load type to be used for a specific extension.\n     *\n     * @static\n     * @param {string} extname - The extension to set the type for, e.g. \"png\" or \"fnt\"\n     * @param {Resource.LOAD_TYPE} loadType - The load type to set it to.\n     */\n    static setExtensionLoadType(extname, loadType) {\n        setExtMap(Resource._loadTypeMap, extname, loadType);\n    }\n\n    /**\n     * Sets the load type to be used for a specific extension.\n     *\n     * @static\n     * @param {string} extname - The extension to set the type for, e.g. \"png\" or \"fnt\"\n     * @param {Resource.XHR_RESPONSE_TYPE} xhrType - The xhr type to set it to.\n     */\n    static setExtensionXhrType(extname, xhrType) {\n        setExtMap(Resource._xhrTypeMap, extname, xhrType);\n    }\n\n    /**\n     * @param {string} name - The name of the resource to load.\n     * @param {string|string[]} url - The url for this resource, for audio/video loads you can pass\n     *      an array of sources.\n     * @param {object} [options] - The options for the load.\n     * @param {string|boolean} [options.crossOrigin] - Is this request cross-origin? Default is to\n     *      determine automatically.\n     * @param {number} [options.timeout=0] - A timeout in milliseconds for the load. If the load takes\n     *      longer than this time it is cancelled and the load is considered a failure. If this value is\n     *      set to `0` then there is no explicit timeout.\n     * @param {Resource.LOAD_TYPE} [options.loadType=Resource.LOAD_TYPE.XHR] - How should this resource\n     *      be loaded?\n     * @param {Resource.XHR_RESPONSE_TYPE} [options.xhrType=Resource.XHR_RESPONSE_TYPE.DEFAULT] - How\n     *      should the data being loaded be interpreted when using XHR?\n     * @param {Resource.IMetadata} [options.metadata] - Extra configuration for middleware and the Resource object.\n     */\n    constructor(name, url, options) {\n        if (typeof name !== 'string' || typeof url !== 'string') {\n            throw new Error('Both name and url are required for constructing a resource.');\n        }\n\n        options = options || {};\n\n        /**\n         * The state flags of this resource.\n         *\n         * @private\n         * @member {number}\n         */\n        this._flags = 0;\n\n        // set data url flag, needs to be set early for some _determineX checks to work.\n        this._setFlag(Resource.STATUS_FLAGS.DATA_URL, url.indexOf('data:') === 0);\n\n        /**\n         * The name of this resource.\n         *\n         * @readonly\n         * @member {string}\n         */\n        this.name = name;\n\n        /**\n         * The url used to load this resource.\n         *\n         * @readonly\n         * @member {string}\n         */\n        this.url = url;\n\n        /**\n         * The extension used to load this resource.\n         *\n         * @readonly\n         * @member {string}\n         */\n        this.extension = this._getExtension();\n\n        /**\n         * The data that was loaded by the resource.\n         *\n         * @member {any}\n         */\n        this.data = null;\n\n        /**\n         * Is this request cross-origin? If unset, determined automatically.\n         *\n         * @member {string}\n         */\n        this.crossOrigin = options.crossOrigin === true ? 'anonymous' : options.crossOrigin;\n\n        /**\n         * A timeout in milliseconds for the load. If the load takes longer than this time\n         * it is cancelled and the load is considered a failure. If this value is set to `0`\n         * then there is no explicit timeout.\n         *\n         * @member {number}\n         */\n        this.timeout = options.timeout || 0;\n\n        /**\n         * The method of loading to use for this resource.\n         *\n         * @member {Resource.LOAD_TYPE}\n         */\n        this.loadType = options.loadType || this._determineLoadType();\n\n        /**\n         * The type used to load the resource via XHR. If unset, determined automatically.\n         *\n         * @member {string}\n         */\n        this.xhrType = options.xhrType;\n\n        /**\n         * Extra info for middleware, and controlling specifics about how the resource loads.\n         *\n         * Note that if you pass in a `loadElement`, the Resource class takes ownership of it.\n         * Meaning it will modify it as it sees fit.\n         *\n         * @member {Resource.IMetadata}\n         */\n        this.metadata = options.metadata || {};\n\n        /**\n         * The error that occurred while loading (if any).\n         *\n         * @readonly\n         * @member {Error}\n         */\n        this.error = null;\n\n        /**\n         * The XHR object that was used to load this resource. This is only set\n         * when `loadType` is `Resource.LOAD_TYPE.XHR`.\n         *\n         * @readonly\n         * @member {XMLHttpRequest}\n         */\n        this.xhr = null;\n\n        /**\n         * The child resources this resource owns.\n         *\n         * @readonly\n         * @member {Resource[]}\n         */\n        this.children = [];\n\n        /**\n         * The resource type.\n         *\n         * @readonly\n         * @member {Resource.TYPE}\n         */\n        this.type = Resource.TYPE.UNKNOWN;\n\n        /**\n         * The progress chunk owned by this resource.\n         *\n         * @readonly\n         * @member {number}\n         */\n        this.progressChunk = 0;\n\n        /**\n         * The `dequeue` method that will be used a storage place for the async queue dequeue method\n         * used privately by the loader.\n         *\n         * @private\n         * @member {function}\n         */\n        this._dequeue = _noop;\n\n        /**\n         * Used a storage place for the on load binding used privately by the loader.\n         *\n         * @private\n         * @member {function}\n         */\n        this._onLoadBinding = null;\n\n        /**\n         * The timer for element loads to check if they timeout.\n         *\n         * @private\n         * @member {number}\n         */\n        this._elementTimer = 0;\n\n        /**\n         * The `complete` function bound to this resource's context.\n         *\n         * @private\n         * @member {function}\n         */\n        this._boundComplete = this.complete.bind(this);\n\n        /**\n         * The `_onError` function bound to this resource's context.\n         *\n         * @private\n         * @member {function}\n         */\n        this._boundOnError = this._onError.bind(this);\n\n        /**\n         * The `_onProgress` function bound to this resource's context.\n         *\n         * @private\n         * @member {function}\n         */\n        this._boundOnProgress = this._onProgress.bind(this);\n\n        /**\n         * The `_onTimeout` function bound to this resource's context.\n         *\n         * @private\n         * @member {function}\n         */\n        this._boundOnTimeout = this._onTimeout.bind(this);\n\n        // xhr callbacks\n        this._boundXhrOnError = this._xhrOnError.bind(this);\n        this._boundXhrOnTimeout = this._xhrOnTimeout.bind(this);\n        this._boundXhrOnAbort = this._xhrOnAbort.bind(this);\n        this._boundXhrOnLoad = this._xhrOnLoad.bind(this);\n\n        /**\n         * Dispatched when the resource beings to load.\n         *\n         * The callback looks like {@link Resource.OnStartSignal}.\n         *\n         * @member {Signal<Resource.OnStartSignal>}\n         */\n        this.onStart = new Signal();\n\n        /**\n         * Dispatched each time progress of this resource load updates.\n         * Not all resources types and loader systems can support this event\n         * so sometimes it may not be available. If the resource\n         * is being loaded on a modern browser, using XHR, and the remote server\n         * properly sets Content-Length headers, then this will be available.\n         *\n         * The callback looks like {@link Resource.OnProgressSignal}.\n         *\n         * @member {Signal<Resource.OnProgressSignal>}\n         */\n        this.onProgress = new Signal();\n\n        /**\n         * Dispatched once this resource has loaded, if there was an error it will\n         * be in the `error` property.\n         *\n         * The callback looks like {@link Resource.OnCompleteSignal}.\n         *\n         * @member {Signal<Resource.OnCompleteSignal>}\n         */\n        this.onComplete = new Signal();\n\n        /**\n         * Dispatched after this resource has had all the *after* middleware run on it.\n         *\n         * The callback looks like {@link Resource.OnCompleteSignal}.\n         *\n         * @member {Signal<Resource.OnCompleteSignal>}\n         */\n        this.onAfterMiddleware = new Signal();\n    }\n\n    /**\n     * When the resource starts to load.\n     *\n     * @memberof Resource\n     * @callback OnStartSignal\n     * @param {Resource} resource - The resource that the event happened on.\n     */\n\n    /**\n     * When the resource reports loading progress.\n     *\n     * @memberof Resource\n     * @callback OnProgressSignal\n     * @param {Resource} resource - The resource that the event happened on.\n     * @param {number} percentage - The progress of the load in the range [0, 1].\n     */\n\n    /**\n     * When the resource finishes loading.\n     *\n     * @memberof Resource\n     * @callback OnCompleteSignal\n     * @param {Resource} resource - The resource that the event happened on.\n     */\n\n    /**\n     * @memberof Resource\n     * @typedef {object} IMetadata\n     * @property {HTMLImageElement|HTMLAudioElement|HTMLVideoElement} [loadElement=null] - The\n     *      element to use for loading, instead of creating one.\n     * @property {boolean} [skipSource=false] - Skips adding source(s) to the load element. This\n     *      is useful if you want to pass in a `loadElement` that you already added load sources to.\n     * @property {string|string[]} [mimeType] - The mime type to use for the source element\n     *      of a video/audio elment. If the urls are an array, you can pass this as an array as well\n     *      where each index is the mime type to use for the corresponding url index.\n     */\n\n    /**\n     * Stores whether or not this url is a data url.\n     *\n     * @readonly\n     * @member {boolean}\n     */\n    get isDataUrl() {\n        return this._hasFlag(Resource.STATUS_FLAGS.DATA_URL);\n    }\n\n    /**\n     * Describes if this resource has finished loading. Is true when the resource has completely\n     * loaded.\n     *\n     * @readonly\n     * @member {boolean}\n     */\n    get isComplete() {\n        return this._hasFlag(Resource.STATUS_FLAGS.COMPLETE);\n    }\n\n    /**\n     * Describes if this resource is currently loading. Is true when the resource starts loading,\n     * and is false again when complete.\n     *\n     * @readonly\n     * @member {boolean}\n     */\n    get isLoading() {\n        return this._hasFlag(Resource.STATUS_FLAGS.LOADING);\n    }\n\n    /**\n     * Marks the resource as complete.\n     *\n     */\n    complete() {\n        this._clearEvents();\n        this._finish();\n    }\n\n    /**\n     * Aborts the loading of this resource, with an optional message.\n     *\n     * @param {string} message - The message to use for the error\n     */\n    abort(message) {\n        // abort can be called multiple times, ignore subsequent calls.\n        if (this.error) {\n            return;\n        }\n\n        // store error\n        this.error = new Error(message);\n\n        // clear events before calling aborts\n        this._clearEvents();\n\n        // abort the actual loading\n        if (this.xhr) {\n            this.xhr.abort();\n        }\n        else if (this.xdr) {\n            this.xdr.abort();\n        }\n        else if (this.data) {\n            // single source\n            if (this.data.src) {\n                this.data.src = Resource.EMPTY_GIF;\n            }\n            // multi-source\n            else {\n                while (this.data.firstChild) {\n                    this.data.removeChild(this.data.firstChild);\n                }\n            }\n        }\n\n        // done now.\n        this._finish();\n    }\n\n    /**\n     * Kicks off loading of this resource. This method is asynchronous.\n     *\n     * @param {Resource.OnCompleteSignal} [cb] - Optional callback to call once the resource is loaded.\n     */\n    load(cb) {\n        if (this.isLoading) {\n            return;\n        }\n\n        if (this.isComplete) {\n            if (cb) {\n                setTimeout(() => cb(this), 1);\n            }\n\n            return;\n        }\n        else if (cb) {\n            this.onComplete.once(cb);\n        }\n\n        this._setFlag(Resource.STATUS_FLAGS.LOADING, true);\n\n        this.onStart.dispatch(this);\n\n        // if unset, determine the value\n        if (this.crossOrigin === false || typeof this.crossOrigin !== 'string') {\n            this.crossOrigin = this._determineCrossOrigin(this.url);\n        }\n\n        switch (this.loadType) {\n            case Resource.LOAD_TYPE.IMAGE:\n                this.type = Resource.TYPE.IMAGE;\n                this._loadElement('image');\n                break;\n\n            case Resource.LOAD_TYPE.AUDIO:\n                this.type = Resource.TYPE.AUDIO;\n                this._loadSourceElement('audio');\n                break;\n\n            case Resource.LOAD_TYPE.VIDEO:\n                this.type = Resource.TYPE.VIDEO;\n                this._loadSourceElement('video');\n                break;\n\n            case Resource.LOAD_TYPE.XHR:\n                /* falls through */\n            default:\n                if (useXdr && this.crossOrigin) {\n                    this._loadXdr();\n                }\n                else {\n                    this._loadXhr();\n                }\n                break;\n        }\n    }\n\n    /**\n     * Checks if the flag is set.\n     *\n     * @private\n     * @param {number} flag - The flag to check.\n     * @return {boolean} True if the flag is set.\n     */\n    _hasFlag(flag) {\n        return (this._flags & flag) !== 0;\n    }\n\n    /**\n     * (Un)Sets the flag.\n     *\n     * @private\n     * @param {number} flag - The flag to (un)set.\n     * @param {boolean} value - Whether to set or (un)set the flag.\n     */\n    _setFlag(flag, value) {\n        this._flags = value ? (this._flags | flag) : (this._flags & ~flag);\n    }\n\n    /**\n     * Clears all the events from the underlying loading source.\n     *\n     * @private\n     */\n    _clearEvents() {\n        clearTimeout(this._elementTimer);\n\n        if (this.data && this.data.removeEventListener) {\n            this.data.removeEventListener('error', this._boundOnError, false);\n            this.data.removeEventListener('load', this._boundComplete, false);\n            this.data.removeEventListener('progress', this._boundOnProgress, false);\n            this.data.removeEventListener('canplaythrough', this._boundComplete, false);\n        }\n\n        if (this.xhr) {\n            if (this.xhr.removeEventListener) {\n                this.xhr.removeEventListener('error', this._boundXhrOnError, false);\n                this.xhr.removeEventListener('timeout', this._boundXhrOnTimeout, false);\n                this.xhr.removeEventListener('abort', this._boundXhrOnAbort, false);\n                this.xhr.removeEventListener('progress', this._boundOnProgress, false);\n                this.xhr.removeEventListener('load', this._boundXhrOnLoad, false);\n            }\n            else {\n                this.xhr.onerror = null;\n                this.xhr.ontimeout = null;\n                this.xhr.onprogress = null;\n                this.xhr.onload = null;\n            }\n        }\n    }\n\n    /**\n     * Finalizes the load.\n     *\n     * @private\n     */\n    _finish() {\n        if (this.isComplete) {\n            throw new Error('Complete called again for an already completed resource.');\n        }\n\n        this._setFlag(Resource.STATUS_FLAGS.COMPLETE, true);\n        this._setFlag(Resource.STATUS_FLAGS.LOADING, false);\n\n        this.onComplete.dispatch(this);\n    }\n\n    /**\n     * Loads this resources using an element that has a single source,\n     * like an HTMLImageElement.\n     *\n     * @private\n     * @param {string} type - The type of element to use.\n     */\n    _loadElement(type) {\n        if (this.metadata.loadElement) {\n            this.data = this.metadata.loadElement;\n        }\n        else if (type === 'image' && typeof window.Image !== 'undefined') {\n            this.data = new Image();\n        }\n        else {\n            this.data = document.createElement(type);\n        }\n\n        if (this.crossOrigin) {\n            this.data.crossOrigin = this.crossOrigin;\n        }\n\n        if (!this.metadata.skipSource) {\n            this.data.src = this.url;\n        }\n\n        this.data.addEventListener('error', this._boundOnError, false);\n        this.data.addEventListener('load', this._boundComplete, false);\n        this.data.addEventListener('progress', this._boundOnProgress, false);\n\n        if (this.timeout) {\n            this._elementTimer = setTimeout(this._boundOnTimeout, this.timeout);\n        }\n    }\n\n    /**\n     * Loads this resources using an element that has multiple sources,\n     * like an HTMLAudioElement or HTMLVideoElement.\n     *\n     * @private\n     * @param {string} type - The type of element to use.\n     */\n    _loadSourceElement(type) {\n        if (this.metadata.loadElement) {\n            this.data = this.metadata.loadElement;\n        }\n        else if (type === 'audio' && typeof window.Audio !== 'undefined') {\n            this.data = new Audio();\n        }\n        else {\n            this.data = document.createElement(type);\n        }\n\n        if (this.data === null) {\n            this.abort(`Unsupported element: ${type}`);\n\n            return;\n        }\n\n        if (this.crossOrigin) {\n            this.data.crossOrigin = this.crossOrigin;\n        }\n\n        if (!this.metadata.skipSource) {\n            // support for CocoonJS Canvas+ runtime, lacks document.createElement('source')\n            if (navigator.isCocoonJS) {\n                this.data.src = Array.isArray(this.url) ? this.url[0] : this.url;\n            }\n            else if (Array.isArray(this.url)) {\n                const mimeTypes = this.metadata.mimeType;\n\n                for (let i = 0; i < this.url.length; ++i) {\n                    this.data.appendChild(\n                        this._createSource(type, this.url[i], Array.isArray(mimeTypes) ? mimeTypes[i] : mimeTypes)\n                    );\n                }\n            }\n            else {\n                const mimeTypes = this.metadata.mimeType;\n\n                this.data.appendChild(\n                    this._createSource(type, this.url, Array.isArray(mimeTypes) ? mimeTypes[0] : mimeTypes)\n                );\n            }\n        }\n\n        this.data.addEventListener('error', this._boundOnError, false);\n        this.data.addEventListener('load', this._boundComplete, false);\n        this.data.addEventListener('progress', this._boundOnProgress, false);\n        this.data.addEventListener('canplaythrough', this._boundComplete, false);\n\n        this.data.load();\n\n        if (this.timeout) {\n            this._elementTimer = setTimeout(this._boundOnTimeout, this.timeout);\n        }\n    }\n\n    /**\n     * Loads this resources using an XMLHttpRequest.\n     *\n     * @private\n     */\n    _loadXhr() {\n        // if unset, determine the value\n        if (typeof this.xhrType !== 'string') {\n            this.xhrType = this._determineXhrType();\n        }\n\n        const xhr = this.xhr = new XMLHttpRequest();\n\n        // set the request type and url\n        xhr.open('GET', this.url, true);\n\n        xhr.timeout = this.timeout;\n\n        // load json as text and parse it ourselves. We do this because some browsers\n        // *cough* safari *cough* can't deal with it.\n        if (this.xhrType === Resource.XHR_RESPONSE_TYPE.JSON || this.xhrType === Resource.XHR_RESPONSE_TYPE.DOCUMENT) {\n            xhr.responseType = Resource.XHR_RESPONSE_TYPE.TEXT;\n        }\n        else {\n            xhr.responseType = this.xhrType;\n        }\n\n        xhr.addEventListener('error', this._boundXhrOnError, false);\n        xhr.addEventListener('timeout', this._boundXhrOnTimeout, false);\n        xhr.addEventListener('abort', this._boundXhrOnAbort, false);\n        xhr.addEventListener('progress', this._boundOnProgress, false);\n        xhr.addEventListener('load', this._boundXhrOnLoad, false);\n\n        xhr.send();\n    }\n\n    /**\n     * Loads this resources using an XDomainRequest. This is here because we need to support IE9 (gross).\n     *\n     * @private\n     */\n    _loadXdr() {\n        // if unset, determine the value\n        if (typeof this.xhrType !== 'string') {\n            this.xhrType = this._determineXhrType();\n        }\n\n        const xdr = this.xhr = new XDomainRequest(); // eslint-disable-line no-undef\n\n        // XDomainRequest has a few quirks. Occasionally it will abort requests\n        // A way to avoid this is to make sure ALL callbacks are set even if not used\n        // More info here: http://stackoverflow.com/questions/15786966/xdomainrequest-aborts-post-on-ie-9\n        xdr.timeout = this.timeout || 5000; // XDR needs a timeout value or it breaks in IE9\n\n        xdr.onerror = this._boundXhrOnError;\n        xdr.ontimeout = this._boundXhrOnTimeout;\n        xdr.onprogress = this._boundOnProgress;\n        xdr.onload = this._boundXhrOnLoad;\n\n        xdr.open('GET', this.url, true);\n\n        // Note: The xdr.send() call is wrapped in a timeout to prevent an\n        // issue with the interface where some requests are lost if multiple\n        // XDomainRequests are being sent at the same time.\n        // Some info here: https://github.com/photonstorm/phaser/issues/1248\n        setTimeout(() => xdr.send(), 1);\n    }\n\n    /**\n     * Creates a source used in loading via an element.\n     *\n     * @private\n     * @param {string} type - The element type (video or audio).\n     * @param {string} url - The source URL to load from.\n     * @param {string} [mime] - The mime type of the video\n     * @return {HTMLSourceElement} The source element.\n     */\n    _createSource(type, url, mime) {\n        if (!mime) {\n            mime = `${type}/${this._getExtension(url)}`;\n        }\n\n        const source = document.createElement('source');\n\n        source.src = url;\n        source.type = mime;\n\n        return source;\n    }\n\n    /**\n     * Called if a load errors out.\n     *\n     * @param {Event} event - The error event from the element that emits it.\n     * @private\n     */\n    _onError(event) {\n        this.abort(`Failed to load element using: ${event.target.nodeName}`);\n    }\n\n    /**\n     * Called if a load progress event fires for an element or xhr/xdr.\n     *\n     * @private\n     * @param {XMLHttpRequestProgressEvent|Event} event - Progress event.\n     */\n    _onProgress(event) {\n        if (event && event.lengthComputable) {\n            this.onProgress.dispatch(this, event.loaded / event.total);\n        }\n    }\n\n    /**\n     * Called if a timeout event fires for an element.\n     *\n     * @private\n     */\n    _onTimeout() {\n        this.abort(`Load timed out.`);\n    }\n\n    /**\n     * Called if an error event fires for xhr/xdr.\n     *\n     * @private\n     */\n    _xhrOnError() {\n        const xhr = this.xhr;\n\n        this.abort(`${reqType(xhr)} Request failed. Status: ${xhr.status}, text: \"${xhr.statusText}\"`);\n    }\n\n    /**\n     * Called if an error event fires for xhr/xdr.\n     *\n     * @private\n     */\n    _xhrOnTimeout() {\n        const xhr = this.xhr;\n\n        this.abort(`${reqType(xhr)} Request timed out.`);\n    }\n\n    /**\n     * Called if an abort event fires for xhr/xdr.\n     *\n     * @private\n     */\n    _xhrOnAbort() {\n        const xhr = this.xhr;\n\n        this.abort(`${reqType(xhr)} Request was aborted by the user.`);\n    }\n\n    /**\n     * Called when data successfully loads from an xhr/xdr request.\n     *\n     * @private\n     * @param {XMLHttpRequestLoadEvent|Event} event - Load event\n     */\n    _xhrOnLoad() {\n        const xhr = this.xhr;\n        let text = '';\n        let status = typeof xhr.status === 'undefined' ? STATUS_OK : xhr.status; // XDR has no `.status`, assume 200.\n\n        // responseText is accessible only if responseType is '' or 'text' and on older browsers\n        if (xhr.responseType === '' || xhr.responseType === 'text' || typeof xhr.responseType === 'undefined') {\n            text = xhr.responseText;\n        }\n\n        // status can be 0 when using the `file://` protocol so we also check if a response is set.\n        // If it has a response, we assume 200; otherwise a 0 status code with no contents is an aborted request.\n        if (status === STATUS_NONE && (text.length > 0 || xhr.responseType === Resource.XHR_RESPONSE_TYPE.BUFFER)) {\n            status = STATUS_OK;\n        }\n        // handle IE9 bug: http://stackoverflow.com/questions/10046972/msie-returns-status-code-of-1223-for-ajax-request\n        else if (status === STATUS_IE_BUG_EMPTY) {\n            status = STATUS_EMPTY;\n        }\n\n        const statusType = (status / 100) | 0;\n\n        if (statusType === STATUS_TYPE_OK) {\n            // if text, just return it\n            if (this.xhrType === Resource.XHR_RESPONSE_TYPE.TEXT) {\n                this.data = text;\n                this.type = Resource.TYPE.TEXT;\n            }\n            // if json, parse into json object\n            else if (this.xhrType === Resource.XHR_RESPONSE_TYPE.JSON) {\n                try {\n                    this.data = JSON.parse(text);\n                    this.type = Resource.TYPE.JSON;\n                }\n                catch (e) {\n                    this.abort(`Error trying to parse loaded json: ${e}`);\n\n                    return;\n                }\n            }\n            // if xml, parse into an xml document or div element\n            else if (this.xhrType === Resource.XHR_RESPONSE_TYPE.DOCUMENT) {\n                try {\n                    if (window.DOMParser) {\n                        const domparser = new DOMParser();\n\n                        this.data = domparser.parseFromString(text, 'text/xml');\n                    }\n                    else {\n                        const div = document.createElement('div');\n\n                        div.innerHTML = text;\n\n                        this.data = div;\n                    }\n\n                    this.type = Resource.TYPE.XML;\n                }\n                catch (e) {\n                    this.abort(`Error trying to parse loaded xml: ${e}`);\n\n                    return;\n                }\n            }\n            // other types just return the response\n            else {\n                this.data = xhr.response || text;\n            }\n        }\n        else {\n            this.abort(`[${xhr.status}] ${xhr.statusText}: ${xhr.responseURL}`);\n\n            return;\n        }\n\n        this.complete();\n    }\n\n    /**\n     * Sets the `crossOrigin` property for this resource based on if the url\n     * for this resource is cross-origin. If crossOrigin was manually set, this\n     * function does nothing.\n     *\n     * @private\n     * @param {string} url - The url to test.\n     * @param {object} [loc=window.location] - The location object to test against.\n     * @return {string} The crossOrigin value to use (or empty string for none).\n     */\n    _determineCrossOrigin(url, loc) {\n        // data: and javascript: urls are considered same-origin\n        if (url.indexOf('data:') === 0) {\n            return '';\n        }\n\n        // A sandboxed iframe without the 'allow-same-origin' attribute will have a special\n        // origin designed not to match window.location.origin, and will always require\n        // crossOrigin requests regardless of whether the location matches.\n        if (window.origin !== window.location.origin) {\n            return 'anonymous';\n        }\n\n        // default is window.location\n        loc = loc || window.location;\n\n        if (!tempAnchor) {\n            tempAnchor = document.createElement('a');\n        }\n\n        // let the browser determine the full href for the url of this resource and then\n        // parse with the node url lib, we can't use the properties of the anchor element\n        // because they don't work in IE9 :(\n        tempAnchor.href = url;\n        url = parseUri(tempAnchor.href, { strictMode: true });\n\n        const samePort = (!url.port && loc.port === '') || (url.port === loc.port);\n        const protocol = url.protocol ? `${url.protocol}:` : '';\n\n        // if cross origin\n        if (url.host !== loc.hostname || !samePort || protocol !== loc.protocol) {\n            return 'anonymous';\n        }\n\n        return '';\n    }\n\n    /**\n     * Determines the responseType of an XHR request based on the extension of the\n     * resource being loaded.\n     *\n     * @private\n     * @return {Resource.XHR_RESPONSE_TYPE} The responseType to use.\n     */\n    _determineXhrType() {\n        return Resource._xhrTypeMap[this.extension] || Resource.XHR_RESPONSE_TYPE.TEXT;\n    }\n\n    /**\n     * Determines the loadType of a resource based on the extension of the\n     * resource being loaded.\n     *\n     * @private\n     * @return {Resource.LOAD_TYPE} The loadType to use.\n     */\n    _determineLoadType() {\n        return Resource._loadTypeMap[this.extension] || Resource.LOAD_TYPE.XHR;\n    }\n\n    /**\n     * Extracts the extension (sans '.') of the file being loaded by the resource.\n     *\n     * @private\n     * @return {string} The extension.\n     */\n    _getExtension() {\n        let url = this.url;\n        let ext = '';\n\n        if (this.isDataUrl) {\n            const slashIndex = url.indexOf('/');\n\n            ext = url.substring(slashIndex + 1, url.indexOf(';', slashIndex));\n        }\n        else {\n            const queryStart = url.indexOf('?');\n            const hashStart = url.indexOf('#');\n            const index = Math.min(\n                queryStart > -1 ? queryStart : url.length,\n                hashStart > -1 ? hashStart : url.length\n            );\n\n            url = url.substring(0, index);\n            ext = url.substring(url.lastIndexOf('.') + 1);\n        }\n\n        return ext.toLowerCase();\n    }\n\n    /**\n     * Determines the mime type of an XHR request based on the responseType of\n     * resource being loaded.\n     *\n     * @private\n     * @param {Resource.XHR_RESPONSE_TYPE} type - The type to get a mime type for.\n     * @return {string} The mime type to use.\n     */\n    _getMimeFromXhrType(type) {\n        switch (type) {\n            case Resource.XHR_RESPONSE_TYPE.BUFFER:\n                return 'application/octet-binary';\n\n            case Resource.XHR_RESPONSE_TYPE.BLOB:\n                return 'application/blob';\n\n            case Resource.XHR_RESPONSE_TYPE.DOCUMENT:\n                return 'application/xml';\n\n            case Resource.XHR_RESPONSE_TYPE.JSON:\n                return 'application/json';\n\n            case Resource.XHR_RESPONSE_TYPE.DEFAULT:\n            case Resource.XHR_RESPONSE_TYPE.TEXT:\n                /* falls through */\n            default:\n                return 'text/plain';\n        }\n    }\n}\n\n/**\n * The types of resources a resource could represent.\n *\n * @static\n * @readonly\n * @enum {number}\n */\nResource.STATUS_FLAGS = {\n    NONE:       0,\n    DATA_URL:   (1 << 0),\n    COMPLETE:   (1 << 1),\n    LOADING:    (1 << 2),\n};\n\n/**\n * The types of resources a resource could represent.\n *\n * @static\n * @readonly\n * @enum {number}\n */\nResource.TYPE = {\n    UNKNOWN:    0,\n    JSON:       1,\n    XML:        2,\n    IMAGE:      3,\n    AUDIO:      4,\n    VIDEO:      5,\n    TEXT:       6,\n};\n\n/**\n * The types of loading a resource can use.\n *\n * @static\n * @readonly\n * @enum {number}\n */\nResource.LOAD_TYPE = {\n    /** Uses XMLHttpRequest to load the resource. */\n    XHR:    1,\n    /** Uses an `Image` object to load the resource. */\n    IMAGE:  2,\n    /** Uses an `Audio` object to load the resource. */\n    AUDIO:  3,\n    /** Uses a `Video` object to load the resource. */\n    VIDEO:  4,\n};\n\n/**\n * The XHR ready states, used internally.\n *\n * @static\n * @readonly\n * @enum {string}\n */\nResource.XHR_RESPONSE_TYPE = {\n    /** string */\n    DEFAULT:    'text',\n    /** ArrayBuffer */\n    BUFFER:     'arraybuffer',\n    /** Blob */\n    BLOB:       'blob',\n    /** Document */\n    DOCUMENT:   'document',\n    /** Object */\n    JSON:       'json',\n    /** String */\n    TEXT:       'text',\n};\n\nResource._loadTypeMap = {\n    // images\n    gif:        Resource.LOAD_TYPE.IMAGE,\n    png:        Resource.LOAD_TYPE.IMAGE,\n    bmp:        Resource.LOAD_TYPE.IMAGE,\n    jpg:        Resource.LOAD_TYPE.IMAGE,\n    jpeg:       Resource.LOAD_TYPE.IMAGE,\n    tif:        Resource.LOAD_TYPE.IMAGE,\n    tiff:       Resource.LOAD_TYPE.IMAGE,\n    webp:       Resource.LOAD_TYPE.IMAGE,\n    tga:        Resource.LOAD_TYPE.IMAGE,\n    svg:        Resource.LOAD_TYPE.IMAGE,\n    'svg+xml':  Resource.LOAD_TYPE.IMAGE, // for SVG data urls\n\n    // audio\n    mp3:        Resource.LOAD_TYPE.AUDIO,\n    ogg:        Resource.LOAD_TYPE.AUDIO,\n    wav:        Resource.LOAD_TYPE.AUDIO,\n\n    // videos\n    mp4:        Resource.LOAD_TYPE.VIDEO,\n    webm:       Resource.LOAD_TYPE.VIDEO,\n};\n\nResource._xhrTypeMap = {\n    // xml\n    xhtml:      Resource.XHR_RESPONSE_TYPE.DOCUMENT,\n    html:       Resource.XHR_RESPONSE_TYPE.DOCUMENT,\n    htm:        Resource.XHR_RESPONSE_TYPE.DOCUMENT,\n    xml:        Resource.XHR_RESPONSE_TYPE.DOCUMENT,\n    tmx:        Resource.XHR_RESPONSE_TYPE.DOCUMENT,\n    svg:        Resource.XHR_RESPONSE_TYPE.DOCUMENT,\n\n    // This was added to handle Tiled Tileset XML, but .tsx is also a TypeScript React Component.\n    // Since it is way less likely for people to be loading TypeScript files instead of Tiled files,\n    // this should probably be fine.\n    tsx:        Resource.XHR_RESPONSE_TYPE.DOCUMENT,\n\n    // images\n    gif:        Resource.XHR_RESPONSE_TYPE.BLOB,\n    png:        Resource.XHR_RESPONSE_TYPE.BLOB,\n    bmp:        Resource.XHR_RESPONSE_TYPE.BLOB,\n    jpg:        Resource.XHR_RESPONSE_TYPE.BLOB,\n    jpeg:       Resource.XHR_RESPONSE_TYPE.BLOB,\n    tif:        Resource.XHR_RESPONSE_TYPE.BLOB,\n    tiff:       Resource.XHR_RESPONSE_TYPE.BLOB,\n    webp:       Resource.XHR_RESPONSE_TYPE.BLOB,\n    tga:        Resource.XHR_RESPONSE_TYPE.BLOB,\n\n    // json\n    json:       Resource.XHR_RESPONSE_TYPE.JSON,\n\n    // text\n    text:       Resource.XHR_RESPONSE_TYPE.TEXT,\n    txt:        Resource.XHR_RESPONSE_TYPE.TEXT,\n\n    // fonts\n    ttf:        Resource.XHR_RESPONSE_TYPE.BUFFER,\n    otf:        Resource.XHR_RESPONSE_TYPE.BUFFER,\n};\n\n// We can't set the `src` attribute to empty string, so on abort we set it to this 1px transparent gif\nResource.EMPTY_GIF = 'data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==';\n\n/**\n * Quick helper to set a value on one of the extension maps. Ensures there is no\n * dot at the start of the extension.\n *\n * @ignore\n * @param {object} map - The map to set on.\n * @param {string} extname - The extension (or key) to set.\n * @param {number} val - The value to set.\n */\nfunction setExtMap(map, extname, val) {\n    if (extname && extname.indexOf('.') === 0) {\n        extname = extname.substring(1);\n    }\n\n    if (!extname) {\n        return;\n    }\n\n    map[extname] = val;\n}\n\n/**\n * Quick helper to get string xhr type.\n *\n * @ignore\n * @param {XMLHttpRequest|XDomainRequest} xhr - The request to check.\n * @return {string} The type.\n */\nfunction reqType(xhr) {\n    return xhr.toString().replace('object ', '');\n}\n\nexport { Resource };\n","const _keyStr = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n\n/**\n * Encodes binary into base64.\n *\n * @function encodeBinary\n * @param {string} input The input data to encode.\n * @returns {string} The encoded base64 string\n */\nexport function encodeBinary(input) {\n    let output = '';\n    let inx = 0;\n\n    while (inx < input.length) {\n        // Fill byte buffer array\n        const bytebuffer = [0, 0, 0];\n        const encodedCharIndexes = [0, 0, 0, 0];\n\n        for (let jnx = 0; jnx < bytebuffer.length; ++jnx) {\n            if (inx < input.length) {\n                // throw away high-order byte, as documented at:\n                // https://developer.mozilla.org/En/Using_XMLHttpRequest#Handling_binary_data\n                bytebuffer[jnx] = input.charCodeAt(inx++) & 0xff;\n            }\n            else {\n                bytebuffer[jnx] = 0;\n            }\n        }\n\n        // Get each encoded character, 6 bits at a time\n        // index 1: first 6 bits\n        encodedCharIndexes[0] = bytebuffer[0] >> 2;\n\n        // index 2: second 6 bits (2 least significant bits from input byte 1 + 4 most significant bits from byte 2)\n        encodedCharIndexes[1] = ((bytebuffer[0] & 0x3) << 4) | (bytebuffer[1] >> 4);\n\n        // index 3: third 6 bits (4 least significant bits from input byte 2 + 2 most significant bits from byte 3)\n        encodedCharIndexes[2] = ((bytebuffer[1] & 0x0f) << 2) | (bytebuffer[2] >> 6);\n\n        // index 3: forth 6 bits (6 least significant bits from input byte 3)\n        encodedCharIndexes[3] = bytebuffer[2] & 0x3f;\n\n        // Determine whether padding happened, and adjust accordingly\n        const paddingBytes = inx - (input.length - 1);\n\n        switch (paddingBytes) {\n            case 2:\n                // Set last 2 characters to padding char\n                encodedCharIndexes[3] = 64;\n                encodedCharIndexes[2] = 64;\n                break;\n\n            case 1:\n                // Set last character to padding char\n                encodedCharIndexes[3] = 64;\n                break;\n\n            default:\n                break; // No padding - proceed\n        }\n\n        // Now we will grab each appropriate character out of our keystring\n        // based on our index array and append it to the output string\n        for (let jnx = 0; jnx < encodedCharIndexes.length; ++jnx) {\n            output += _keyStr.charAt(encodedCharIndexes[jnx]);\n        }\n    }\n\n    return output;\n}\n","import { Resource } from '../Resource';\nimport { encodeBinary } from '../encodeBinary';\n\nconst Url = window.URL || window.webkitURL;\n\n/**\n * A middleware for transforming XHR loaded Blobs into more useful objects\n *\n * @memberof middleware\n * @function parsing\n * @example\n * import { Loader, middleware } from 'resource-loader';\n * const loader = new Loader();\n * loader.use(middleware.parsing);\n * @param {Resource} resource - Current Resource\n * @param {function} next - Callback when complete\n */\nexport function parsing(resource, next) {\n    if (!resource.data) {\n        next();\n\n        return;\n    }\n\n    // if this was an XHR load of a blob\n    if (resource.xhr && resource.xhrType === Resource.XHR_RESPONSE_TYPE.BLOB) {\n        // if there is no blob support we probably got a binary string back\n        if (!window.Blob || typeof resource.data === 'string') {\n            const type = resource.xhr.getResponseHeader('content-type');\n\n            // this is an image, convert the binary string into a data url\n            if (type && type.indexOf('image') === 0) {\n                resource.data = new Image();\n                resource.data.src = `data:${type};base64,${encodeBinary(resource.xhr.responseText)}`;\n\n                resource.type = Resource.TYPE.IMAGE;\n\n                // wait until the image loads and then callback\n                resource.data.onload = () => {\n                    resource.data.onload = null;\n\n                    next();\n                };\n\n                // next will be called on load\n                return;\n            }\n        }\n        // if content type says this is an image, then we should transform the blob into an Image object\n        else if (resource.data.type.indexOf('image') === 0) {\n            const src = Url.createObjectURL(resource.data);\n\n            resource.blob = resource.data;\n            resource.data = new Image();\n            resource.data.src = src;\n\n            resource.type = Resource.TYPE.IMAGE;\n\n            // cleanup the no longer used blob after the image loads\n            // TODO: Is this correct? Will the image be invalid after revoking?\n            resource.data.onload = () => {\n                Url.revokeObjectURL(src);\n                resource.data.onload = null;\n\n                next();\n            };\n\n            // next will be called on load.\n            return;\n        }\n    }\n\n    next();\n}\n","import Signal from 'mini-signals';\nimport parseUri from 'parse-uri';\nimport * as async from './async';\nimport { Resource } from './Resource';\n\n// some constants\nconst MAX_PROGRESS = 100;\nconst rgxExtractUrlHash = /(#[\\w-]+)?$/;\n\n/**\n * Manages the state and loading of multiple resources to load.\n *\n * @class\n */\nclass Loader {\n    /**\n     * @param {string} [baseUrl=''] - The base url for all resources loaded by this loader.\n     * @param {number} [concurrency=10] - The number of resources to load concurrently.\n     */\n    constructor(baseUrl = '', concurrency = 10) {\n        /**\n         * The base url for all resources loaded by this loader.\n         *\n         * @member {string}\n         */\n        this.baseUrl = baseUrl;\n\n        /**\n         * The progress percent of the loader going through the queue.\n         *\n         * @member {number}\n         * @default 0\n         */\n        this.progress = 0;\n\n        /**\n         * Loading state of the loader, true if it is currently loading resources.\n         *\n         * @member {boolean}\n         * @default false\n         */\n        this.loading = false;\n\n        /**\n         * A querystring to append to every URL added to the loader.\n         *\n         * This should be a valid query string *without* the question-mark (`?`). The loader will\n         * also *not* escape values for you. Make sure to escape your parameters with\n         * [`encodeURIComponent`](https://mdn.io/encodeURIComponent) before assigning this property.\n         *\n         * @example\n         * const loader = new Loader();\n         *\n         * loader.defaultQueryString = 'user=me&password=secret';\n         *\n         * // This will request 'image.png?user=me&password=secret'\n         * loader.add('image.png').load();\n         *\n         * loader.reset();\n         *\n         * // This will request 'image.png?v=1&user=me&password=secret'\n         * loader.add('iamge.png?v=1').load();\n         *\n         * @member {string}\n         * @default ''\n         */\n        this.defaultQueryString = '';\n\n        /**\n         * The middleware to run before loading each resource.\n         *\n         * @private\n         * @member {function[]}\n         */\n        this._beforeMiddleware = [];\n\n        /**\n         * The middleware to run after loading each resource.\n         *\n         * @private\n         * @member {function[]}\n         */\n        this._afterMiddleware = [];\n\n        /**\n         * The tracks the resources we are currently completing parsing for.\n         *\n         * @private\n         * @member {Resource[]}\n         */\n        this._resourcesParsing = [];\n\n        /**\n         * The `_loadResource` function bound with this object context.\n         *\n         * @private\n         * @member {function}\n         * @param {Resource} r - The resource to load\n         * @param {Function} d - The dequeue function\n         * @return {undefined}\n         */\n        this._boundLoadResource = (r, d) => this._loadResource(r, d);\n\n        /**\n         * The resources waiting to be loaded.\n         *\n         * @private\n         * @member {Resource[]}\n         */\n        this._queue = async.queue(this._boundLoadResource, concurrency);\n\n        this._queue.pause();\n\n        /**\n         * All the resources for this loader keyed by name.\n         *\n         * @member {object<string, Resource>}\n         */\n        this.resources = {};\n\n        /**\n         * Dispatched once per loaded or errored resource.\n         *\n         * The callback looks like {@link Loader.OnProgressSignal}.\n         *\n         * @member {Signal<Loader.OnProgressSignal>}\n         */\n        this.onProgress = new Signal();\n\n        /**\n         * Dispatched once per errored resource.\n         *\n         * The callback looks like {@link Loader.OnErrorSignal}.\n         *\n         * @member {Signal<Loader.OnErrorSignal>}\n         */\n        this.onError = new Signal();\n\n        /**\n         * Dispatched once per loaded resource.\n         *\n         * The callback looks like {@link Loader.OnLoadSignal}.\n         *\n         * @member {Signal<Loader.OnLoadSignal>}\n         */\n        this.onLoad = new Signal();\n\n        /**\n         * Dispatched when the loader begins to process the queue.\n         *\n         * The callback looks like {@link Loader.OnStartSignal}.\n         *\n         * @member {Signal<Loader.OnStartSignal>}\n         */\n        this.onStart = new Signal();\n\n        /**\n         * Dispatched when the queued resources all load.\n         *\n         * The callback looks like {@link Loader.OnCompleteSignal}.\n         *\n         * @member {Signal<Loader.OnCompleteSignal>}\n         */\n        this.onComplete = new Signal();\n\n        // Add default before middleware\n        for (let i = 0; i < Loader._defaultBeforeMiddleware.length; ++i) {\n            this.pre(Loader._defaultBeforeMiddleware[i]);\n        }\n\n        // Add default after middleware\n        for (let i = 0; i < Loader._defaultAfterMiddleware.length; ++i) {\n            this.use(Loader._defaultAfterMiddleware[i]);\n        }\n    }\n\n    /**\n     * When the progress changes the loader and resource are disaptched.\n     *\n     * @memberof Loader\n     * @callback OnProgressSignal\n     * @param {Loader} loader - The loader the progress is advancing on.\n     * @param {Resource} resource - The resource that has completed or failed to cause the progress to advance.\n     */\n\n    /**\n     * When an error occurrs the loader and resource are disaptched.\n     *\n     * @memberof Loader\n     * @callback OnErrorSignal\n     * @param {Loader} loader - The loader the error happened in.\n     * @param {Resource} resource - The resource that caused the error.\n     */\n\n    /**\n     * When a load completes the loader and resource are disaptched.\n     *\n     * @memberof Loader\n     * @callback OnLoadSignal\n     * @param {Loader} loader - The loader that laoded the resource.\n     * @param {Resource} resource - The resource that has completed loading.\n     */\n\n    /**\n     * When the loader starts loading resources it dispatches this callback.\n     *\n     * @memberof Loader\n     * @callback OnStartSignal\n     * @param {Loader} loader - The loader that has started loading resources.\n     */\n\n    /**\n     * When the loader completes loading resources it dispatches this callback.\n     *\n     * @memberof Loader\n     * @callback OnCompleteSignal\n     * @param {Loader} loader - The loader that has finished loading resources.\n     */\n\n    /**\n     * Options for a call to `.add()`.\n     *\n     * @see Loader#add\n     *\n     * @typedef {object} IAddOptions\n     * @property {string} [name] - The name of the resource to load, if not passed the url is used.\n     * @property {string} [key] - Alias for `name`.\n     * @property {string} [url] - The url for this resource, relative to the baseUrl of this loader.\n     * @property {string|boolean} [crossOrigin] - Is this request cross-origin? Default is to\n     *      determine automatically.\n     * @property {number} [timeout=0] - A timeout in milliseconds for the load. If the load takes\n     *      longer than this time it is cancelled and the load is considered a failure. If this value is\n     *      set to `0` then there is no explicit timeout.\n     * @property {Resource.LOAD_TYPE} [loadType=Resource.LOAD_TYPE.XHR] - How should this resource\n     *      be loaded?\n     * @property {Resource.XHR_RESPONSE_TYPE} [xhrType=Resource.XHR_RESPONSE_TYPE.DEFAULT] - How\n     *      should the data being loaded be interpreted when using XHR?\n     * @property {Resource.OnCompleteSignal} [onComplete] - Callback to add an an onComplete signal istener.\n     * @property {Resource.OnCompleteSignal} [callback] - Alias for `onComplete`.\n     * @property {Resource.IMetadata} [metadata] - Extra configuration for middleware and the Resource object.\n     */\n\n    /* eslint-disable require-jsdoc,valid-jsdoc */\n    /**\n     * Adds a resource (or multiple resources) to the loader queue.\n     *\n     * This function can take a wide variety of different parameters. The only thing that is always\n     * required the url to load. All the following will work:\n     *\n     * ```js\n     * loader\n     *     // normal param syntax\n     *     .add('key', 'http://...', function () {})\n     *     .add('http://...', function () {})\n     *     .add('http://...')\n     *\n     *     // object syntax\n     *     .add({\n     *         name: 'key2',\n     *         url: 'http://...'\n     *     }, function () {})\n     *     .add({\n     *         url: 'http://...'\n     *     }, function () {})\n     *     .add({\n     *         name: 'key3',\n     *         url: 'http://...'\n     *         onComplete: function () {}\n     *     })\n     *     .add({\n     *         url: 'https://...',\n     *         onComplete: function () {},\n     *         crossOrigin: true\n     *     })\n     *\n     *     // you can also pass an array of objects or urls or both\n     *     .add([\n     *         { name: 'key4', url: 'http://...', onComplete: function () {} },\n     *         { url: 'http://...', onComplete: function () {} },\n     *         'http://...'\n     *     ])\n     *\n     *     // and you can use both params and options\n     *     .add('key', 'http://...', { crossOrigin: true }, function () {})\n     *     .add('http://...', { crossOrigin: true }, function () {});\n     * ```\n     *\n     * @function\n     * @variation 1\n     * @param {string} name - The name of the resource to load.\n     * @param {string} url - The url for this resource, relative to the baseUrl of this loader.\n     * @param {Resource.OnCompleteSignal} [callback] - Function to call when this specific resource completes loading.\n     * @return {this} Returns itself.\n     *//**\n     * @function\n     * @variation 2\n     * @param {string} name - The name of the resource to load.\n     * @param {string} url - The url for this resource, relative to the baseUrl of this loader.\n     * @param {IAddOptions} [options] - The options for the load.\n     * @param {Resource.OnCompleteSignal} [callback] - Function to call when this specific resource completes loading.\n     * @return {this} Returns itself.\n     *//**\n     * @function\n     * @variation 3\n     * @param {string} url - The url for this resource, relative to the baseUrl of this loader.\n     * @param {Resource.OnCompleteSignal} [callback] - Function to call when this specific resource completes loading.\n     * @return {this} Returns itself.\n     *//**\n     * @function\n     * @variation 4\n     * @param {string} url - The url for this resource, relative to the baseUrl of this loader.\n     * @param {IAddOptions} [options] - The options for the load.\n     * @param {Resource.OnCompleteSignal} [callback] - Function to call when this specific resource completes loading.\n     * @return {this} Returns itself.\n     *//**\n     * @function\n     * @variation 5\n     * @param {IAddOptions} options - The options for the load. This object must contain a `url` property.\n     * @param {Resource.OnCompleteSignal} [callback] - Function to call when this specific resource completes loading.\n     * @return {this} Returns itself.\n     *//**\n     * @function\n     * @variation 6\n     * @param {Array<IAddOptions|string>} resources - An array of resources to load, where each is\n     *      either an object with the options or a string url. If you pass an object, it must contain a `url` property.\n     * @param {Resource.OnCompleteSignal} [callback] - Function to call when this specific resource completes loading.\n     * @return {this} Returns itself.\n     */\n    add(name, url, options, cb) {\n        // special case of an array of objects or urls\n        if (Array.isArray(name)) {\n            for (let i = 0; i < name.length; ++i) {\n                this.add(name[i]);\n            }\n\n            return this;\n        }\n\n        // if an object is passed instead of params\n        if (typeof name === 'object') {\n            cb = url || name.callback || name.onComplete;\n            options = name;\n            url = name.url;\n            name = name.name || name.key || name.url;\n        }\n\n        // case where no name is passed shift all args over by one.\n        if (typeof url !== 'string') {\n            cb = options;\n            options = url;\n            url = name;\n        }\n\n        // now that we shifted make sure we have a proper url.\n        if (typeof url !== 'string') {\n            throw new Error('No url passed to add resource to loader.');\n        }\n\n        // options are optional so people might pass a function and no options\n        if (typeof options === 'function') {\n            cb = options;\n            options = null;\n        }\n\n        // if loading already you can only add resources that have a parent.\n        if (this.loading && (!options || !options.parentResource)) {\n            throw new Error('Cannot add resources while the loader is running.');\n        }\n\n        // check if resource already exists.\n        if (this.resources[name]) {\n            throw new Error(`Resource named \"${name}\" already exists.`);\n        }\n\n        // add base url if this isn't an absolute url\n        url = this._prepareUrl(url);\n\n        // create the store the resource\n        this.resources[name] = new Resource(name, url, options);\n\n        if (typeof cb === 'function') {\n            this.resources[name].onAfterMiddleware.once(cb);\n        }\n\n        // if actively loading, make sure to adjust progress chunks for that parent and its children\n        if (this.loading) {\n            const parent = options.parentResource;\n            const incompleteChildren = [];\n\n            for (let i = 0; i < parent.children.length; ++i) {\n                if (!parent.children[i].isComplete) {\n                    incompleteChildren.push(parent.children[i]);\n                }\n            }\n\n            const fullChunk = parent.progressChunk * (incompleteChildren.length + 1); // +1 for parent\n            const eachChunk = fullChunk / (incompleteChildren.length + 2); // +2 for parent & new child\n\n            parent.children.push(this.resources[name]);\n            parent.progressChunk = eachChunk;\n\n            for (let i = 0; i < incompleteChildren.length; ++i) {\n                incompleteChildren[i].progressChunk = eachChunk;\n            }\n\n            this.resources[name].progressChunk = eachChunk;\n        }\n\n        // add the resource to the queue\n        this._queue.push(this.resources[name]);\n\n        return this;\n    }\n    /* eslint-enable require-jsdoc,valid-jsdoc */\n\n    /**\n     * Sets up a middleware function that will run *before* the\n     * resource is loaded.\n     *\n     * @param {function} fn - The middleware function to register.\n     * @return {this} Returns itself.\n     */\n    pre(fn) {\n        this._beforeMiddleware.push(fn);\n\n        return this;\n    }\n\n    /**\n     * Sets up a middleware function that will run *after* the\n     * resource is loaded.\n     *\n     * @param {function} fn - The middleware function to register.\n     * @return {this} Returns itself.\n     */\n    use(fn) {\n        this._afterMiddleware.push(fn);\n\n        return this;\n    }\n\n    /**\n     * Resets the queue of the loader to prepare for a new load.\n     *\n     * @return {this} Returns itself.\n     */\n    reset() {\n        this.progress = 0;\n        this.loading = false;\n\n        this._queue.kill();\n        this._queue.pause();\n\n        // abort all resource loads\n        for (const k in this.resources) {\n            const res = this.resources[k];\n\n            if (res._onLoadBinding) {\n                res._onLoadBinding.detach();\n            }\n\n            if (res.isLoading) {\n                res.abort();\n            }\n        }\n\n        this.resources = {};\n\n        return this;\n    }\n\n    /**\n     * Starts loading the queued resources.\n     *\n     * @param {function} [cb] - Optional callback that will be bound to the `complete` event.\n     * @return {this} Returns itself.\n     */\n    load(cb) {\n        // register complete callback if they pass one\n        if (typeof cb === 'function') {\n            this.onComplete.once(cb);\n        }\n\n        // if the queue has already started we are done here\n        if (this.loading) {\n            return this;\n        }\n\n        if (this._queue.idle()) {\n            this._onStart();\n            this._onComplete();\n        }\n        else {\n            // distribute progress chunks\n            const numTasks = this._queue._tasks.length;\n            const chunk = MAX_PROGRESS / numTasks;\n\n            for (let i = 0; i < this._queue._tasks.length; ++i) {\n                this._queue._tasks[i].data.progressChunk = chunk;\n            }\n\n            // notify we are starting\n            this._onStart();\n\n            // start loading\n            this._queue.resume();\n        }\n\n        return this;\n    }\n\n    /**\n     * The number of resources to load concurrently.\n     *\n     * @member {number}\n     * @default 10\n     */\n    get concurrency() {\n        return this._queue.concurrency;\n    }\n    // eslint-disable-next-line require-jsdoc\n    set concurrency(concurrency) {\n        this._queue.concurrency = concurrency;\n    }\n\n    /**\n     * Prepares a url for usage based on the configuration of this object\n     *\n     * @private\n     * @param {string} url - The url to prepare.\n     * @return {string} The prepared url.\n     */\n    _prepareUrl(url) {\n        const parsedUrl = parseUri(url, { strictMode: true });\n        let result;\n\n        // absolute url, just use it as is.\n        if (parsedUrl.protocol || !parsedUrl.path || url.indexOf('//') === 0) {\n            result = url;\n        }\n        // if baseUrl doesn't end in slash and url doesn't start with slash, then add a slash inbetween\n        else if (this.baseUrl.length\n            && this.baseUrl.lastIndexOf('/') !== this.baseUrl.length - 1\n            && url.charAt(0) !== '/'\n        ) {\n            result = `${this.baseUrl}/${url}`;\n        }\n        else {\n            result = this.baseUrl + url;\n        }\n\n        // if we need to add a default querystring, there is a bit more work\n        if (this.defaultQueryString) {\n            const hash = rgxExtractUrlHash.exec(result)[0];\n\n            result = result.substr(0, result.length - hash.length);\n\n            if (result.indexOf('?') !== -1) {\n                result += `&${this.defaultQueryString}`;\n            }\n            else {\n                result += `?${this.defaultQueryString}`;\n            }\n\n            result += hash;\n        }\n\n        return result;\n    }\n\n    /**\n     * Loads a single resource.\n     *\n     * @private\n     * @param {Resource} resource - The resource to load.\n     * @param {function} dequeue - The function to call when we need to dequeue this item.\n     */\n    _loadResource(resource, dequeue) {\n        resource._dequeue = dequeue;\n\n        // run before middleware\n        async.eachSeries(\n            this._beforeMiddleware,\n            (fn, next) => {\n                fn.call(this, resource, () => {\n                    // if the before middleware marks the resource as complete,\n                    // break and don't process any more before middleware\n                    next(resource.isComplete ? {} : null);\n                });\n            },\n            () => {\n                if (resource.isComplete) {\n                    this._onLoad(resource);\n                }\n                else {\n                    resource._onLoadBinding = resource.onComplete.once(this._onLoad, this);\n                    resource.load();\n                }\n            },\n            true\n        );\n    }\n\n    /**\n     * Called once loading has started.\n     *\n     * @private\n     */\n    _onStart() {\n        this.progress = 0;\n        this.loading = true;\n        this.onStart.dispatch(this);\n    }\n\n    /**\n     * Called once each resource has loaded.\n     *\n     * @private\n     */\n    _onComplete() {\n        this.progress = MAX_PROGRESS;\n        this.loading = false;\n        this.onComplete.dispatch(this, this.resources);\n    }\n\n    /**\n     * Called each time a resources is loaded.\n     *\n     * @private\n     * @param {Resource} resource - The resource that was loaded\n     */\n    _onLoad(resource) {\n        resource._onLoadBinding = null;\n\n        // remove this resource from the async queue, and add it to our list of resources that are being parsed\n        this._resourcesParsing.push(resource);\n        resource._dequeue();\n\n        // run all the after middleware for this resource\n        async.eachSeries(\n            this._afterMiddleware,\n            (fn, next) => {\n                fn.call(this, resource, next);\n            },\n            () => {\n                resource.onAfterMiddleware.dispatch(resource);\n\n                this.progress = Math.min(MAX_PROGRESS, this.progress + resource.progressChunk);\n                this.onProgress.dispatch(this, resource);\n\n                if (resource.error) {\n                    this.onError.dispatch(resource.error, this, resource);\n                }\n                else {\n                    this.onLoad.dispatch(this, resource);\n                }\n\n                this._resourcesParsing.splice(this._resourcesParsing.indexOf(resource), 1);\n\n                // do completion check\n                if (this._queue.idle() && this._resourcesParsing.length === 0) {\n                    this._onComplete();\n                }\n            },\n            true\n        );\n    }\n}\n\n/**\n * A default array of middleware to run before loading each resource.\n * Each of these middlewares are added to any new Loader instances when they are created.\n *\n * @private\n * @member {function[]}\n */\nLoader._defaultBeforeMiddleware = [];\n\n/**\n * A default array of middleware to run after loading each resource.\n * Each of these middlewares are added to any new Loader instances when they are created.\n *\n * @private\n * @member {function[]}\n */\nLoader._defaultAfterMiddleware = [];\n\n/**\n * Sets up a middleware function that will run *before* the\n * resource is loaded.\n *\n * @static\n * @param {function} fn - The middleware function to register.\n * @return {Loader} Returns itself.\n */\nLoader.pre = function LoaderPreStatic(fn) {\n    Loader._defaultBeforeMiddleware.push(fn);\n\n    return Loader;\n};\n\n/**\n * Sets up a middleware function that will run *after* the\n * resource is loaded.\n *\n * @static\n * @param {function} fn - The middleware function to register.\n * @return {Loader} Returns itself.\n */\nLoader.use = function LoaderUseStatic(fn) {\n    Loader._defaultAfterMiddleware.push(fn);\n\n    return Loader;\n};\n\nexport { Loader };\n\n","import { Resource } from 'resource-loader';\nimport { Texture } from '@pixi/core';\n\n/**\n * Loader plugin for handling Texture resources.\n * @class\n * @memberof PIXI\n * @implements PIXI.ILoaderPlugin\n */\nexport default class TextureLoader\n{\n    /**\n     * Called after a resource is loaded.\n     * @see PIXI.Loader.loaderMiddleware\n     * @param {PIXI.LoaderResource} resource\n     * @param {function} next\n     */\n    static use(resource, next)\n    {\n        // create a new texture if the data is an Image object\n        if (resource.data && resource.type === Resource.TYPE.IMAGE)\n        {\n            resource.texture = Texture.fromLoader(\n                resource.data,\n                resource.url,\n                resource.name\n            );\n        }\n        next();\n    }\n}\n","import { Loader as ResourceLoader, middleware } from 'resource-loader';\nimport { EventEmitter } from '@pixi/utils';\nimport TextureLoader from './TextureLoader';\n\n/**\n * The new loader, extends Resource Loader by Chad Engler: https://github.com/englercj/resource-loader\n *\n * ```js\n * const loader = PIXI.Loader.shared; // PixiJS exposes a premade instance for you to use.\n * //or\n * const loader = new PIXI.Loader(); // you can also create your own if you want\n *\n * const sprites = {};\n *\n * // Chainable `add` to enqueue a resource\n * loader.add('bunny', 'data/bunny.png')\n *       .add('spaceship', 'assets/spritesheet.json');\n * loader.add('scoreFont', 'assets/score.fnt');\n *\n * // Chainable `pre` to add a middleware that runs for each resource, *before* loading that resource.\n * // This is useful to implement custom caching modules (using filesystem, indexeddb, memory, etc).\n * loader.pre(cachingMiddleware);\n *\n * // Chainable `use` to add a middleware that runs for each resource, *after* loading that resource.\n * // This is useful to implement custom parsing modules (like spritesheet parsers, spine parser, etc).\n * loader.use(parsingMiddleware);\n *\n * // The `load` method loads the queue of resources, and calls the passed in callback called once all\n * // resources have loaded.\n * loader.load((loader, resources) => {\n *     // resources is an object where the key is the name of the resource loaded and the value is the resource object.\n *     // They have a couple default properties:\n *     // - `url`: The URL that the resource was loaded from\n *     // - `error`: The error that happened when trying to load (if any)\n *     // - `data`: The raw data that was loaded\n *     // also may contain other properties based on the middleware that runs.\n *     sprites.bunny = new PIXI.TilingSprite(resources.bunny.texture);\n *     sprites.spaceship = new PIXI.TilingSprite(resources.spaceship.texture);\n *     sprites.scoreFont = new PIXI.TilingSprite(resources.scoreFont.texture);\n * });\n *\n * // throughout the process multiple signals can be dispatched.\n * loader.onProgress.add(() => {}); // called once per loaded/errored file\n * loader.onError.add(() => {}); // called once per errored file\n * loader.onLoad.add(() => {}); // called once per loaded file\n * loader.onComplete.add(() => {}); // called once when the queued resources all load.\n * ```\n *\n * @see https://github.com/englercj/resource-loader\n *\n * @class Loader\n * @memberof PIXI\n * @param {string} [baseUrl=''] - The base url for all resources loaded by this loader.\n * @param {number} [concurrency=10] - The number of resources to load concurrently.\n */\nexport default class Loader extends ResourceLoader\n{\n    constructor(baseUrl, concurrency)\n    {\n        super(baseUrl, concurrency);\n        EventEmitter.call(this);\n\n        for (let i = 0; i < Loader._plugins.length; ++i)\n        {\n            const plugin = Loader._plugins[i];\n            const { pre, use } = plugin;\n\n            if (pre)\n            {\n                this.pre(pre);\n            }\n\n            if (use)\n            {\n                this.use(use);\n            }\n        }\n\n        // Compat layer, translate the new v2 signals into old v1 events.\n        this.onStart.add((l) => this.emit('start', l));\n        this.onProgress.add((l, r) => this.emit('progress', l, r));\n        this.onError.add((e, l, r) => this.emit('error', e, l, r));\n        this.onLoad.add((l, r) => this.emit('load', l, r));\n        this.onComplete.add((l, r) => this.emit('complete', l, r));\n\n        /**\n         * If this loader cannot be destroyed.\n         * @member {boolean}\n         * @default false\n         * @private\n         */\n        this._protected = false;\n    }\n\n    /**\n     * Destroy the loader, removes references.\n     * @private\n     */\n    destroy()\n    {\n        if (!this._protected)\n        {\n            this.removeAllListeners();\n            this.reset();\n        }\n    }\n\n    /**\n     * A premade instance of the loader that can be used to load resources.\n     * @name shared\n     * @type {PIXI.Loader}\n     * @static\n     * @memberof PIXI.Loader\n     */\n    static get shared()\n    {\n        let shared = Loader._shared;\n\n        if (!shared)\n        {\n            shared = new Loader();\n            shared._protected = true;\n            Loader._shared = shared;\n        }\n\n        return shared;\n    }\n}\n\n// Copy EE3 prototype (mixin)\nObject.assign(Loader.prototype, EventEmitter.prototype);\n\n/**\n * Collection of all installed `use` middleware for Loader.\n *\n * @static\n * @member {Array<PIXI.ILoaderPlugin>} _plugins\n * @memberof PIXI.Loader\n * @private\n */\nLoader._plugins = [];\n\n/**\n * Adds a Loader plugin for the global shared loader and all\n * new Loader instances created.\n *\n * @static\n * @method registerPlugin\n * @memberof PIXI.Loader\n * @param {PIXI.ILoaderPlugin} plugin - The plugin to add\n * @return {PIXI.Loader} Reference to PIXI.Loader for chaining\n */\nLoader.registerPlugin = function registerPlugin(plugin)\n{\n    Loader._plugins.push(plugin);\n\n    if (plugin.add)\n    {\n        plugin.add();\n    }\n\n    return Loader;\n};\n\n// parse any blob into more usable objects (e.g. Image)\nLoader.registerPlugin({ use: middleware.parsing });\n\n// parse any Image objects into textures\nLoader.registerPlugin(TextureLoader);\n\n/**\n * Plugin to be installed for handling specific Loader resources.\n *\n * @memberof PIXI\n * @typedef ILoaderPlugin\n * @property {function} [add] - Function to call immediate after registering plugin.\n * @property {PIXI.Loader.loaderMiddleware} [pre] - Middleware function to run before load, the\n *           arguments for this are `(resource, next)`\n * @property {PIXI.Loader.loaderMiddleware} [use] - Middleware function to run after load, the\n *           arguments for this are `(resource, next)`\n */\n\n/**\n * @memberof PIXI.Loader\n * @callback loaderMiddleware\n * @param {PIXI.LoaderResource} resource\n * @param {function} next\n */\n\n/**\n * @memberof PIXI.Loader#\n * @member {object} onStart\n */\n\n/**\n * @memberof PIXI.Loader#\n * @member {object} onProgress\n */\n\n/**\n * @memberof PIXI.Loader#\n * @member {object} onError\n */\n\n/**\n * @memberof PIXI.Loader#\n * @member {object} onLoad\n */\n\n/**\n * @memberof PIXI.Loader#\n * @member {object} onComplete\n */\n","import Loader from './Loader';\n\n/**\n * Application plugin for supporting loader option. Installing the LoaderPlugin\n * is not necessary if using **pixi.js** or **pixi.js-legacy**.\n * @example\n * import {AppLoaderPlugin} from '@pixi/loaders';\n * import {Application} from '@pixi/app';\n * Application.registerPlugin(AppLoaderPlugin);\n * @class\n * @memberof PIXI\n */\nexport default class AppLoaderPlugin\n{\n    /**\n     * Called on application constructor\n     * @param {object} options\n     * @private\n     */\n    static init(options)\n    {\n        options = Object.assign({\n            sharedLoader: false,\n        }, options);\n\n        /**\n         * Loader instance to help with asset loading.\n         * @name PIXI.Application#loader\n         * @type {PIXI.Loader}\n         * @readonly\n         */\n        this.loader = options.sharedLoader ? Loader.shared : new Loader();\n    }\n\n    /**\n     * Called when application destroyed\n     * @private\n     */\n    static destroy()\n    {\n        if (this.loader)\n        {\n            this.loader.destroy();\n            this.loader = null;\n        }\n    }\n}\n","import { Resource } from 'resource-loader';\n/**\n * Reference to **{@link https://github.com/englercj/resource-loader\n * resource-loader}**'s Resource class.\n * @see http://englercj.github.io/resource-loader/Resource.html\n * @class LoaderResource\n * @memberof PIXI\n */\nexport const LoaderResource = Resource;\nexport { default as Loader } from './Loader';\nexport { default as TextureLoader } from './TextureLoader';\nexport { default as AppLoaderPlugin } from './AppLoaderPlugin';\n","import { BLEND_MODES } from '@pixi/constants';\nimport { hex2rgb } from '@pixi/utils';\nimport { Container } from '@pixi/display';\n\n/**\n * The ParticleContainer class is a really fast version of the Container built solely for speed,\n * so use when you need a lot of sprites or particles.\n *\n * The tradeoff of the ParticleContainer is that most advanced functionality will not work.\n * ParticleContainer implements the basic object transform (position, scale, rotation)\n * and some advanced functionality like tint (as of v4.5.6).\n *\n * Other more advanced functionality like masking, children, filters, etc will not work on sprites in this batch.\n *\n * It's extremely easy to use:\n * ```js\n * let container = new ParticleContainer();\n *\n * for (let i = 0; i < 100; ++i)\n * {\n *     let sprite = PIXI.Sprite.from(\"myImage.png\");\n *     container.addChild(sprite);\n * }\n * ```\n *\n * And here you have a hundred sprites that will be rendered at the speed of light.\n *\n * @class\n * @extends PIXI.Container\n * @memberof PIXI\n */\nexport default class ParticleContainer extends Container\n{\n    /**\n     * @param {number} [maxSize=1500] - The maximum number of particles that can be rendered by the container.\n     *  Affects size of allocated buffers.\n     * @param {object} [properties] - The properties of children that should be uploaded to the gpu and applied.\n     * @param {boolean} [properties.vertices=false] - When true, vertices be uploaded and applied.\n     *                  if sprite's ` scale/anchor/trim/frame/orig` is dynamic, please set `true`.\n     * @param {boolean} [properties.position=true] - When true, position be uploaded and applied.\n     * @param {boolean} [properties.rotation=false] - When true, rotation be uploaded and applied.\n     * @param {boolean} [properties.uvs=false] - When true, uvs be uploaded and applied.\n     * @param {boolean} [properties.tint=false] - When true, alpha and tint be uploaded and applied.\n     * @param {number} [batchSize=16384] - Number of particles per batch. If less than maxSize, it uses maxSize instead.\n     * @param {boolean} [autoResize=false] If true, container allocates more batches in case\n     *  there are more than `maxSize` particles.\n     */\n    constructor(maxSize = 1500, properties, batchSize = 16384, autoResize = false)\n    {\n        super();\n\n        // Making sure the batch size is valid\n        // 65535 is max vertex index in the index buffer (see ParticleRenderer)\n        // so max number of particles is 65536 / 4 = 16384\n        const maxBatchSize = 16384;\n\n        if (batchSize > maxBatchSize)\n        {\n            batchSize = maxBatchSize;\n        }\n\n        /**\n         * Set properties to be dynamic (true) / static (false)\n         *\n         * @member {boolean[]}\n         * @private\n         */\n        this._properties = [false, true, false, false, false];\n\n        /**\n         * @member {number}\n         * @private\n         */\n        this._maxSize = maxSize;\n\n        /**\n         * @member {number}\n         * @private\n         */\n        this._batchSize = batchSize;\n\n        /**\n         * @member {Array<PIXI.Buffer>}\n         * @private\n         */\n        this._buffers = null;\n\n        /**\n         * for every batch stores _updateID corresponding to the last change in that batch\n         * @member {number[]}\n         * @private\n         */\n        this._bufferUpdateIDs = [];\n\n        /**\n         * when child inserted, removed or changes position this number goes up\n         * @member {number[]}\n         * @private\n         */\n        this._updateID = 0;\n\n        /**\n         * @member {boolean}\n         *\n         */\n        this.interactiveChildren = false;\n\n        /**\n         * The blend mode to be applied to the sprite. Apply a value of `PIXI.BLEND_MODES.NORMAL`\n         * to reset the blend mode.\n         *\n         * @member {number}\n         * @default PIXI.BLEND_MODES.NORMAL\n         * @see PIXI.BLEND_MODES\n         */\n        this.blendMode = BLEND_MODES.NORMAL;\n\n        /**\n         * If true, container allocates more batches in case there are more than `maxSize` particles.\n         * @member {boolean}\n         * @default false\n         */\n        this.autoResize = autoResize;\n\n        /**\n         * If true PixiJS will Math.floor() x/y values when rendering, stopping pixel interpolation.\n         * Advantages can include sharper image quality (like text) and faster rendering on canvas.\n         * The main disadvantage is movement of objects may appear less smooth.\n         * Default to true here as performance is usually the priority for particles.\n         *\n         * @member {boolean}\n         * @default true\n         */\n        this.roundPixels = true;\n\n        /**\n         * The texture used to render the children.\n         *\n         * @readonly\n         * @member {PIXI.BaseTexture}\n         */\n        this.baseTexture = null;\n\n        this.setProperties(properties);\n\n        /**\n         * The tint applied to the container.\n         * This is a hex value. A value of 0xFFFFFF will remove any tint effect.\n         *\n         * @private\n         * @member {number}\n         * @default 0xFFFFFF\n         */\n        this._tint = 0;\n        this.tintRgb = new Float32Array(4);\n        this.tint = 0xFFFFFF;\n    }\n\n    /**\n     * Sets the private properties array to dynamic / static based on the passed properties object\n     *\n     * @param {object} properties - The properties to be uploaded\n     */\n    setProperties(properties)\n    {\n        if (properties)\n        {\n            this._properties[0] = 'vertices' in properties || 'scale' in properties\n                ? !!properties.vertices || !!properties.scale : this._properties[0];\n            this._properties[1] = 'position' in properties ? !!properties.position : this._properties[1];\n            this._properties[2] = 'rotation' in properties ? !!properties.rotation : this._properties[2];\n            this._properties[3] = 'uvs' in properties ? !!properties.uvs : this._properties[3];\n            this._properties[4] = 'tint' in properties || 'alpha' in properties\n                ? !!properties.tint || !!properties.alpha : this._properties[4];\n        }\n    }\n\n    /**\n     * Updates the object transform for rendering\n     *\n     * @private\n     */\n    updateTransform()\n    {\n        // TODO don't need to!\n        this.displayObjectUpdateTransform();\n        //  PIXI.Container.prototype.updateTransform.call( this );\n    }\n\n    /**\n     * The tint applied to the container. This is a hex value.\n     * A value of 0xFFFFFF will remove any tint effect.\n     ** IMPORTANT: This is a WebGL only feature and will be ignored by the canvas renderer.\n     * @member {number}\n     * @default 0xFFFFFF\n     */\n    get tint()\n    {\n        return this._tint;\n    }\n\n    set tint(value) // eslint-disable-line require-jsdoc\n    {\n        this._tint = value;\n        hex2rgb(value, this.tintRgb);\n    }\n\n    /**\n     * Renders the container using the WebGL renderer\n     *\n     * @private\n     * @param {PIXI.Renderer} renderer - The webgl renderer\n     */\n    render(renderer)\n    {\n        if (!this.visible || this.worldAlpha <= 0 || !this.children.length || !this.renderable)\n        {\n            return;\n        }\n\n        if (!this.baseTexture)\n        {\n            this.baseTexture = this.children[0]._texture.baseTexture;\n            if (!this.baseTexture.valid)\n            {\n                this.baseTexture.once('update', () => this.onChildrenChange(0));\n            }\n        }\n\n        renderer.batch.setObjectRenderer(renderer.plugins.particle);\n        renderer.plugins.particle.render(this);\n    }\n\n    /**\n     * Set the flag that static data should be updated to true\n     *\n     * @private\n     * @param {number} smallestChildIndex - The smallest child index\n     */\n    onChildrenChange(smallestChildIndex)\n    {\n        const bufferIndex = Math.floor(smallestChildIndex / this._batchSize);\n\n        while (this._bufferUpdateIDs.length < bufferIndex)\n        {\n            this._bufferUpdateIDs.push(0);\n        }\n        this._bufferUpdateIDs[bufferIndex] = ++this._updateID;\n    }\n\n    dispose()\n    {\n        if (this._buffers)\n        {\n            for (let i = 0; i < this._buffers.length; ++i)\n            {\n                this._buffers[i].destroy();\n            }\n\n            this._buffers = null;\n        }\n    }\n\n    /**\n     * Destroys the container\n     *\n     * @param {object|boolean} [options] - Options parameter. A boolean will act as if all options\n     *  have been set to that value\n     * @param {boolean} [options.children=false] - if set to true, all the children will have their\n     *  destroy method called as well. 'options' will be passed on to those calls.\n     * @param {boolean} [options.texture=false] - Only used for child Sprites if options.children is set to true\n     *  Should it destroy the texture of the child sprite\n     * @param {boolean} [options.baseTexture=false] - Only used for child Sprites if options.children is set to true\n     *  Should it destroy the base texture of the child sprite\n     */\n    destroy(options)\n    {\n        super.destroy(options);\n\n        this.dispose();\n\n        this._properties = null;\n        this._buffers = null;\n        this._bufferUpdateIDs = null;\n    }\n}\n","import { createIndicesForQuads } from '@pixi/utils';\nimport { Geometry, Buffer } from '@pixi/core';\nimport { TYPES } from '@pixi/constants';\n\n/**\n * @author Mat Groves\n *\n * Big thanks to the very clever Matt DesLauriers <mattdesl> https://github.com/mattdesl/\n * for creating the original PixiJS version!\n * Also a thanks to https://github.com/bchevalier for tweaking the tint and alpha so that\n * they now share 4 bytes on the vertex buffer\n *\n * Heavily inspired by LibGDX's ParticleBuffer:\n * https://github.com/libgdx/libgdx/blob/master/gdx/src/com/badlogic/gdx/graphics/g2d/ParticleBuffer.java\n */\n\n/**\n * The particle buffer manages the static and dynamic buffers for a particle container.\n *\n * @class\n * @private\n * @memberof PIXI\n */\nexport default class ParticleBuffer\n{\n    /**\n     * @private\n     * @param {object} properties - The properties to upload.\n     * @param {boolean[]} dynamicPropertyFlags - Flags for which properties are dynamic.\n     * @param {number} size - The size of the batch.\n     */\n    constructor(properties, dynamicPropertyFlags, size)\n    {\n        this.geometry = new Geometry();\n\n        this.indexBuffer = null;\n\n        /**\n         * The number of particles the buffer can hold\n         *\n         * @private\n         * @member {number}\n         */\n        this.size = size;\n\n        /**\n         * A list of the properties that are dynamic.\n         *\n         * @private\n         * @member {object[]}\n         */\n        this.dynamicProperties = [];\n\n        /**\n         * A list of the properties that are static.\n         *\n         * @private\n         * @member {object[]}\n         */\n        this.staticProperties = [];\n\n        for (let i = 0; i < properties.length; ++i)\n        {\n            let property = properties[i];\n\n            // Make copy of properties object so that when we edit the offset it doesn't\n            // change all other instances of the object literal\n            property = {\n                attributeName: property.attributeName,\n                size: property.size,\n                uploadFunction: property.uploadFunction,\n                type: property.type || TYPES.FLOAT,\n                offset: property.offset,\n            };\n\n            if (dynamicPropertyFlags[i])\n            {\n                this.dynamicProperties.push(property);\n            }\n            else\n            {\n                this.staticProperties.push(property);\n            }\n        }\n\n        this.staticStride = 0;\n        this.staticBuffer = null;\n        this.staticData = null;\n        this.staticDataUint32 = null;\n\n        this.dynamicStride = 0;\n        this.dynamicBuffer = null;\n        this.dynamicData = null;\n        this.dynamicDataUint32 = null;\n\n        this._updateID = 0;\n\n        this.initBuffers();\n    }\n\n    /**\n     * Sets up the renderer context and necessary buffers.\n     *\n     * @private\n     */\n    initBuffers()\n    {\n        const geometry = this.geometry;\n\n        let dynamicOffset = 0;\n\n        /**\n         * Holds the indices of the geometry (quads) to draw\n         *\n         * @member {Uint16Array}\n         * @private\n         */\n        this.indexBuffer = new Buffer(createIndicesForQuads(this.size), true, true);\n        geometry.addIndex(this.indexBuffer);\n\n        this.dynamicStride = 0;\n\n        for (let i = 0; i < this.dynamicProperties.length; ++i)\n        {\n            const property = this.dynamicProperties[i];\n\n            property.offset = dynamicOffset;\n            dynamicOffset += property.size;\n            this.dynamicStride += property.size;\n        }\n\n        const dynBuffer = new ArrayBuffer(this.size * this.dynamicStride * 4 * 4);\n\n        this.dynamicData = new Float32Array(dynBuffer);\n        this.dynamicDataUint32 = new Uint32Array(dynBuffer);\n        this.dynamicBuffer = new Buffer(this.dynamicData, false, false);\n\n        // static //\n        let staticOffset = 0;\n\n        this.staticStride = 0;\n\n        for (let i = 0; i < this.staticProperties.length; ++i)\n        {\n            const property = this.staticProperties[i];\n\n            property.offset = staticOffset;\n            staticOffset += property.size;\n            this.staticStride += property.size;\n        }\n\n        const statBuffer = new ArrayBuffer(this.size * this.staticStride * 4 * 4);\n\n        this.staticData = new Float32Array(statBuffer);\n        this.staticDataUint32 = new Uint32Array(statBuffer);\n        this.staticBuffer = new Buffer(this.staticData, true, false);\n\n        for (let i = 0; i < this.dynamicProperties.length; ++i)\n        {\n            const property = this.dynamicProperties[i];\n\n            geometry.addAttribute(\n                property.attributeName,\n                this.dynamicBuffer,\n                0,\n                property.type === TYPES.UNSIGNED_BYTE,\n                property.type,\n                this.dynamicStride * 4,\n                property.offset * 4\n            );\n        }\n\n        for (let i = 0; i < this.staticProperties.length; ++i)\n        {\n            const property = this.staticProperties[i];\n\n            geometry.addAttribute(\n                property.attributeName,\n                this.staticBuffer,\n                0,\n                property.type === TYPES.UNSIGNED_BYTE,\n                property.type,\n                this.staticStride * 4,\n                property.offset * 4\n            );\n        }\n    }\n\n    /**\n     * Uploads the dynamic properties.\n     *\n     * @private\n     * @param {PIXI.DisplayObject[]} children - The children to upload.\n     * @param {number} startIndex - The index to start at.\n     * @param {number} amount - The number to upload.\n     */\n    uploadDynamic(children, startIndex, amount)\n    {\n        for (let i = 0; i < this.dynamicProperties.length; i++)\n        {\n            const property = this.dynamicProperties[i];\n\n            property.uploadFunction(children, startIndex, amount,\n                property.type === TYPES.UNSIGNED_BYTE ? this.dynamicDataUint32 : this.dynamicData,\n                this.dynamicStride, property.offset);\n        }\n\n        this.dynamicBuffer._updateID++;\n    }\n\n    /**\n     * Uploads the static properties.\n     *\n     * @private\n     * @param {PIXI.DisplayObject[]} children - The children to upload.\n     * @param {number} startIndex - The index to start at.\n     * @param {number} amount - The number to upload.\n     */\n    uploadStatic(children, startIndex, amount)\n    {\n        for (let i = 0; i < this.staticProperties.length; i++)\n        {\n            const property = this.staticProperties[i];\n\n            property.uploadFunction(children, startIndex, amount,\n                property.type === TYPES.UNSIGNED_BYTE ? this.staticDataUint32 : this.staticData,\n                this.staticStride, property.offset);\n        }\n\n        this.staticBuffer._updateID++;\n    }\n\n    /**\n     * Destroys the ParticleBuffer.\n     *\n     * @private\n     */\n    destroy()\n    {\n        this.indexBuffer = null;\n\n        this.dynamicProperties = null;\n        // this.dynamicBuffer.destroy();\n        this.dynamicBuffer = null;\n        this.dynamicData = null;\n        this.dynamicDataUint32 = null;\n\n        this.staticProperties = null;\n        // this.staticBuffer.destroy();\n        this.staticBuffer = null;\n        this.staticData = null;\n        this.staticDataUint32 = null;\n        // all buffers are destroyed inside geometry\n        this.geometry.destroy();\n    }\n}\n","import { TYPES } from '@pixi/constants';\nimport { ObjectRenderer, Shader } from '@pixi/core';\nimport { correctBlendMode, premultiplyRgba, premultiplyTint } from '@pixi/utils';\nimport { Matrix } from '@pixi/math';\nimport ParticleBuffer from './ParticleBuffer';\nimport vertex from './particles.vert';\nimport fragment from './particles.frag';\n\n/**\n * @author Mat Groves\n *\n * Big thanks to the very clever Matt DesLauriers <mattdesl> https://github.com/mattdesl/\n * for creating the original PixiJS version!\n * Also a thanks to https://github.com/bchevalier for tweaking the tint and alpha so that they now\n * share 4 bytes on the vertex buffer\n *\n * Heavily inspired by LibGDX's ParticleRenderer:\n * https://github.com/libgdx/libgdx/blob/master/gdx/src/com/badlogic/gdx/graphics/g2d/ParticleRenderer.java\n */\n\n/**\n * Renderer for Particles that is designer for speed over feature set.\n *\n * @class\n * @memberof PIXI\n */\nexport default class ParticleRenderer extends ObjectRenderer\n{\n    /**\n     * @param {PIXI.Renderer} renderer - The renderer this sprite batch works for.\n     */\n    constructor(renderer)\n    {\n        super(renderer);\n\n        // 65535 is max vertex index in the index buffer (see ParticleRenderer)\n        // so max number of particles is 65536 / 4 = 16384\n        // and max number of element in the index buffer is 16384 * 6 = 98304\n        // Creating a full index buffer, overhead is 98304 * 2 = 196Ko\n        // let numIndices = 98304;\n\n        /**\n         * The default shader that is used if a sprite doesn't have a more specific one.\n         *\n         * @member {PIXI.Shader}\n         */\n        this.shader = null;\n\n        this.properties = null;\n\n        this.tempMatrix = new Matrix();\n\n        this.properties = [\n            // verticesData\n            {\n                attributeName: 'aVertexPosition',\n                size: 2,\n                uploadFunction: this.uploadVertices,\n                offset: 0,\n            },\n            // positionData\n            {\n                attributeName: 'aPositionCoord',\n                size: 2,\n                uploadFunction: this.uploadPosition,\n                offset: 0,\n            },\n            // rotationData\n            {\n                attributeName: 'aRotation',\n                size: 1,\n                uploadFunction: this.uploadRotation,\n                offset: 0,\n            },\n            // uvsData\n            {\n                attributeName: 'aTextureCoord',\n                size: 2,\n                uploadFunction: this.uploadUvs,\n                offset: 0,\n            },\n            // tintData\n            {\n                attributeName: 'aColor',\n                size: 1,\n                type: TYPES.UNSIGNED_BYTE,\n                uploadFunction: this.uploadTint,\n                offset: 0,\n            },\n        ];\n\n        this.shader = Shader.from(vertex, fragment, {});\n    }\n\n    /**\n     * Renders the particle container object.\n     *\n     * @param {PIXI.ParticleContainer} container - The container to render using this ParticleRenderer\n     */\n    render(container)\n    {\n        const children = container.children;\n        const maxSize = container._maxSize;\n        const batchSize = container._batchSize;\n        const renderer = this.renderer;\n        let totalChildren = children.length;\n\n        if (totalChildren === 0)\n        {\n            return;\n        }\n        else if (totalChildren > maxSize && !container.autoResize)\n        {\n            totalChildren = maxSize;\n        }\n\n        let buffers = container._buffers;\n\n        if (!buffers)\n        {\n            buffers = container._buffers = this.generateBuffers(container);\n        }\n\n        const baseTexture = children[0]._texture.baseTexture;\n\n        // if the uvs have not updated then no point rendering just yet!\n        this.renderer.state.setBlendMode(correctBlendMode(container.blendMode, baseTexture.premultiplyAlpha));\n\n        const gl = renderer.gl;\n\n        const m = container.worldTransform.copyTo(this.tempMatrix);\n\n        m.prepend(renderer.globalUniforms.uniforms.projectionMatrix);\n\n        this.shader.uniforms.translationMatrix = m.toArray(true);\n\n        this.shader.uniforms.uColor = premultiplyRgba(container.tintRgb,\n            container.worldAlpha, this.shader.uniforms.uColor, baseTexture.premultiplyAlpha);\n\n        this.shader.uniforms.uSampler = baseTexture;\n\n        this.renderer.shader.bind(this.shader);\n\n        let updateStatic = false;\n\n        // now lets upload and render the buffers..\n        for (let i = 0, j = 0; i < totalChildren; i += batchSize, j += 1)\n        {\n            let amount = (totalChildren - i);\n\n            if (amount > batchSize)\n            {\n                amount = batchSize;\n            }\n\n            if (j >= buffers.length)\n            {\n                buffers.push(this._generateOneMoreBuffer(container));\n            }\n\n            const buffer = buffers[j];\n\n            // we always upload the dynamic\n            buffer.uploadDynamic(children, i, amount);\n\n            const bid = container._bufferUpdateIDs[j] || 0;\n\n            updateStatic = updateStatic || (buffer._updateID < bid);\n            // we only upload the static content when we have to!\n            if (updateStatic)\n            {\n                buffer._updateID = container._updateID;\n                buffer.uploadStatic(children, i, amount);\n            }\n\n            // bind the buffer\n            renderer.geometry.bind(buffer.geometry);\n            gl.drawElements(gl.TRIANGLES, amount * 6, gl.UNSIGNED_SHORT, 0);\n        }\n    }\n\n    /**\n     * Creates one particle buffer for each child in the container we want to render and updates internal properties\n     *\n     * @param {PIXI.ParticleContainer} container - The container to render using this ParticleRenderer\n     * @return {PIXI.ParticleBuffer[]} The buffers\n     * @private\n     */\n    generateBuffers(container)\n    {\n        const buffers = [];\n        const size = container._maxSize;\n        const batchSize = container._batchSize;\n        const dynamicPropertyFlags = container._properties;\n\n        for (let i = 0; i < size; i += batchSize)\n        {\n            buffers.push(new ParticleBuffer(this.properties, dynamicPropertyFlags, batchSize));\n        }\n\n        return buffers;\n    }\n\n    /**\n     * Creates one more particle buffer, because container has autoResize feature\n     *\n     * @param {PIXI.ParticleContainer} container - The container to render using this ParticleRenderer\n     * @return {PIXI.ParticleBuffer} generated buffer\n     * @private\n     */\n    _generateOneMoreBuffer(container)\n    {\n        const batchSize = container._batchSize;\n        const dynamicPropertyFlags = container._properties;\n\n        return new ParticleBuffer(this.properties, dynamicPropertyFlags, batchSize);\n    }\n\n    /**\n     * Uploads the vertices.\n     *\n     * @param {PIXI.DisplayObject[]} children - the array of display objects to render\n     * @param {number} startIndex - the index to start from in the children array\n     * @param {number} amount - the amount of children that will have their vertices uploaded\n     * @param {number[]} array - The vertices to upload.\n     * @param {number} stride - Stride to use for iteration.\n     * @param {number} offset - Offset to start at.\n     */\n    uploadVertices(children, startIndex, amount, array, stride, offset)\n    {\n        let w0 = 0;\n        let w1 = 0;\n        let h0 = 0;\n        let h1 = 0;\n\n        for (let i = 0; i < amount; ++i)\n        {\n            const sprite = children[startIndex + i];\n            const texture = sprite._texture;\n            const sx = sprite.scale.x;\n            const sy = sprite.scale.y;\n            const trim = texture.trim;\n            const orig = texture.orig;\n\n            if (trim)\n            {\n                // if the sprite is trimmed and is not a tilingsprite then we need to add the\n                // extra space before transforming the sprite coords..\n                w1 = trim.x - (sprite.anchor.x * orig.width);\n                w0 = w1 + trim.width;\n\n                h1 = trim.y - (sprite.anchor.y * orig.height);\n                h0 = h1 + trim.height;\n            }\n            else\n            {\n                w0 = (orig.width) * (1 - sprite.anchor.x);\n                w1 = (orig.width) * -sprite.anchor.x;\n\n                h0 = orig.height * (1 - sprite.anchor.y);\n                h1 = orig.height * -sprite.anchor.y;\n            }\n\n            array[offset] = w1 * sx;\n            array[offset + 1] = h1 * sy;\n\n            array[offset + stride] = w0 * sx;\n            array[offset + stride + 1] = h1 * sy;\n\n            array[offset + (stride * 2)] = w0 * sx;\n            array[offset + (stride * 2) + 1] = h0 * sy;\n\n            array[offset + (stride * 3)] = w1 * sx;\n            array[offset + (stride * 3) + 1] = h0 * sy;\n\n            offset += stride * 4;\n        }\n    }\n\n    /**\n     * Uploads the position.\n     *\n     * @param {PIXI.DisplayObject[]} children - the array of display objects to render\n     * @param {number} startIndex - the index to start from in the children array\n     * @param {number} amount - the amount of children that will have their positions uploaded\n     * @param {number[]} array - The vertices to upload.\n     * @param {number} stride - Stride to use for iteration.\n     * @param {number} offset - Offset to start at.\n     */\n    uploadPosition(children, startIndex, amount, array, stride, offset)\n    {\n        for (let i = 0; i < amount; i++)\n        {\n            const spritePosition = children[startIndex + i].position;\n\n            array[offset] = spritePosition.x;\n            array[offset + 1] = spritePosition.y;\n\n            array[offset + stride] = spritePosition.x;\n            array[offset + stride + 1] = spritePosition.y;\n\n            array[offset + (stride * 2)] = spritePosition.x;\n            array[offset + (stride * 2) + 1] = spritePosition.y;\n\n            array[offset + (stride * 3)] = spritePosition.x;\n            array[offset + (stride * 3) + 1] = spritePosition.y;\n\n            offset += stride * 4;\n        }\n    }\n\n    /**\n     * Uploads the rotiation.\n     *\n     * @param {PIXI.DisplayObject[]} children - the array of display objects to render\n     * @param {number} startIndex - the index to start from in the children array\n     * @param {number} amount - the amount of children that will have their rotation uploaded\n     * @param {number[]} array - The vertices to upload.\n     * @param {number} stride - Stride to use for iteration.\n     * @param {number} offset - Offset to start at.\n     */\n    uploadRotation(children, startIndex, amount, array, stride, offset)\n    {\n        for (let i = 0; i < amount; i++)\n        {\n            const spriteRotation = children[startIndex + i].rotation;\n\n            array[offset] = spriteRotation;\n            array[offset + stride] = spriteRotation;\n            array[offset + (stride * 2)] = spriteRotation;\n            array[offset + (stride * 3)] = spriteRotation;\n\n            offset += stride * 4;\n        }\n    }\n\n    /**\n     * Uploads the Uvs\n     *\n     * @param {PIXI.DisplayObject[]} children - the array of display objects to render\n     * @param {number} startIndex - the index to start from in the children array\n     * @param {number} amount - the amount of children that will have their rotation uploaded\n     * @param {number[]} array - The vertices to upload.\n     * @param {number} stride - Stride to use for iteration.\n     * @param {number} offset - Offset to start at.\n     */\n    uploadUvs(children, startIndex, amount, array, stride, offset)\n    {\n        for (let i = 0; i < amount; ++i)\n        {\n            const textureUvs = children[startIndex + i]._texture._uvs;\n\n            if (textureUvs)\n            {\n                array[offset] = textureUvs.x0;\n                array[offset + 1] = textureUvs.y0;\n\n                array[offset + stride] = textureUvs.x1;\n                array[offset + stride + 1] = textureUvs.y1;\n\n                array[offset + (stride * 2)] = textureUvs.x2;\n                array[offset + (stride * 2) + 1] = textureUvs.y2;\n\n                array[offset + (stride * 3)] = textureUvs.x3;\n                array[offset + (stride * 3) + 1] = textureUvs.y3;\n\n                offset += stride * 4;\n            }\n            else\n            {\n                // TODO you know this can be easier!\n                array[offset] = 0;\n                array[offset + 1] = 0;\n\n                array[offset + stride] = 0;\n                array[offset + stride + 1] = 0;\n\n                array[offset + (stride * 2)] = 0;\n                array[offset + (stride * 2) + 1] = 0;\n\n                array[offset + (stride * 3)] = 0;\n                array[offset + (stride * 3) + 1] = 0;\n\n                offset += stride * 4;\n            }\n        }\n    }\n\n    /**\n     * Uploads the tint.\n     *\n     * @param {PIXI.DisplayObject[]} children - the array of display objects to render\n     * @param {number} startIndex - the index to start from in the children array\n     * @param {number} amount - the amount of children that will have their rotation uploaded\n     * @param {number[]} array - The vertices to upload.\n     * @param {number} stride - Stride to use for iteration.\n     * @param {number} offset - Offset to start at.\n     */\n    uploadTint(children, startIndex, amount, array, stride, offset)\n    {\n        for (let i = 0; i < amount; ++i)\n        {\n            const sprite = children[startIndex + i];\n            const premultiplied = sprite._texture.baseTexture.premultiplyAlpha;\n            const alpha = sprite.alpha;\n            // we dont call extra function if alpha is 1.0, that's faster\n            const argb = alpha < 1.0 && premultiplied ? premultiplyTint(sprite._tintRGB, alpha)\n                : sprite._tintRGB + (alpha * 255 << 24);\n\n            array[offset] = argb;\n            array[offset + stride] = argb;\n            array[offset + (stride * 2)] = argb;\n            array[offset + (stride * 3)] = argb;\n\n            offset += stride * 4;\n        }\n    }\n\n    /**\n     * Destroys the ParticleRenderer.\n     */\n    destroy()\n    {\n        super.destroy();\n\n        if (this.shader)\n        {\n            this.shader.destroy();\n            this.shader = null;\n        }\n\n        this.tempMatrix = null;\n    }\n}\n","import { Rectangle } from '@pixi/math';\nimport { Texture } from '@pixi/core';\nimport { getResolutionOfUrl } from '@pixi/utils';\n\n/**\n * Utility class for maintaining reference to a collection\n * of Textures on a single Spritesheet.\n *\n * To access a sprite sheet from your code pass its JSON data file to Pixi's loader:\n *\n * ```js\n * PIXI.Loader.shared.add(\"images/spritesheet.json\").load(setup);\n *\n * function setup() {\n *   let sheet = PIXI.Loader.shared.resources[\"images/spritesheet.json\"].spritesheet;\n *   ...\n * }\n * ```\n * With the `sheet.textures` you can create Sprite objects,`sheet.animations` can be used to create an AnimatedSprite.\n *\n * Sprite sheets can be packed using tools like {@link https://codeandweb.com/texturepacker|TexturePacker},\n * {@link https://renderhjs.net/shoebox/|Shoebox} or {@link https://github.com/krzysztof-o/spritesheet.js|Spritesheet.js}.\n * Default anchor points (see {@link PIXI.Texture#defaultAnchor}) and grouping of animation sprites are currently only\n * supported by TexturePacker.\n *\n * @class\n * @memberof PIXI\n */\nexport default class Spritesheet\n{\n    /**\n     * The maximum number of Textures to build per process.\n     *\n     * @type {number}\n     * @default 1000\n     */\n    static get BATCH_SIZE()\n    {\n        return 1000;\n    }\n\n    /**\n     * @param {PIXI.BaseTexture} baseTexture Reference to the source BaseTexture object.\n     * @param {Object} data - Spritesheet image data.\n     * @param {string} [resolutionFilename] - The filename to consider when determining\n     *        the resolution of the spritesheet. If not provided, the imageUrl will\n     *        be used on the BaseTexture.\n     */\n    constructor(baseTexture, data, resolutionFilename = null)\n    {\n        /**\n         * Reference to ths source texture\n         * @type {PIXI.BaseTexture}\n         */\n        this.baseTexture = baseTexture;\n\n        /**\n         * A map containing all textures of the sprite sheet.\n         * Can be used to create a {@link PIXI.Sprite|Sprite}:\n         * ```js\n         * new PIXI.Sprite(sheet.textures[\"image.png\"]);\n         * ```\n         * @member {Object}\n         */\n        this.textures = {};\n\n        /**\n         * A map containing the textures for each animation.\n         * Can be used to create an {@link PIXI.AnimatedSprite|AnimatedSprite}:\n         * ```js\n         * new PIXI.AnimatedSprite(sheet.animations[\"anim_name\"])\n         * ```\n         * @member {Object}\n         */\n        this.animations = {};\n\n        /**\n         * Reference to the original JSON data.\n         * @type {Object}\n         */\n        this.data = data;\n\n        /**\n         * The resolution of the spritesheet.\n         * @type {number}\n         */\n        this.resolution = this._updateResolution(\n            resolutionFilename\n            || (this.baseTexture.resource ? this.baseTexture.resource.url : null)\n        );\n\n        /**\n         * Map of spritesheet frames.\n         * @type {Object}\n         * @private\n         */\n        this._frames = this.data.frames;\n\n        /**\n         * Collection of frame names.\n         * @type {string[]}\n         * @private\n         */\n        this._frameKeys = Object.keys(this._frames);\n\n        /**\n         * Current batch index being processed.\n         * @type {number}\n         * @private\n         */\n        this._batchIndex = 0;\n\n        /**\n         * Callback when parse is completed.\n         * @type {Function}\n         * @private\n         */\n        this._callback = null;\n    }\n\n    /**\n     * Generate the resolution from the filename or fallback\n     * to the meta.scale field of the JSON data.\n     *\n     * @private\n     * @param {string} resolutionFilename - The filename to use for resolving\n     *        the default resolution.\n     * @return {number} Resolution to use for spritesheet.\n     */\n    _updateResolution(resolutionFilename)\n    {\n        const scale = this.data.meta.scale;\n\n        // Use a defaultValue of `null` to check if a url-based resolution is set\n        let resolution = getResolutionOfUrl(resolutionFilename, null);\n\n        // No resolution found via URL\n        if (resolution === null)\n        {\n            // Use the scale value or default to 1\n            resolution = scale !== undefined ? parseFloat(scale) : 1;\n        }\n\n        // For non-1 resolutions, update baseTexture\n        if (resolution !== 1)\n        {\n            this.baseTexture.setResolution(resolution);\n        }\n\n        return resolution;\n    }\n\n    /**\n     * Parser spritesheet from loaded data. This is done asynchronously\n     * to prevent creating too many Texture within a single process.\n     *\n     * @param {Function} callback - Callback when complete returns\n     *        a map of the Textures for this spritesheet.\n     */\n    parse(callback)\n    {\n        this._batchIndex = 0;\n        this._callback = callback;\n\n        if (this._frameKeys.length <= Spritesheet.BATCH_SIZE)\n        {\n            this._processFrames(0);\n            this._processAnimations();\n            this._parseComplete();\n        }\n        else\n        {\n            this._nextBatch();\n        }\n    }\n\n    /**\n     * Process a batch of frames\n     *\n     * @private\n     * @param {number} initialFrameIndex - The index of frame to start.\n     */\n    _processFrames(initialFrameIndex)\n    {\n        let frameIndex = initialFrameIndex;\n        const maxFrames = Spritesheet.BATCH_SIZE;\n\n        while (frameIndex - initialFrameIndex < maxFrames && frameIndex < this._frameKeys.length)\n        {\n            const i = this._frameKeys[frameIndex];\n            const data = this._frames[i];\n            const rect = data.frame;\n\n            if (rect)\n            {\n                let frame = null;\n                let trim = null;\n                const sourceSize = data.trimmed !== false && data.sourceSize\n                    ? data.sourceSize : data.frame;\n\n                const orig = new Rectangle(\n                    0,\n                    0,\n                    Math.floor(sourceSize.w) / this.resolution,\n                    Math.floor(sourceSize.h) / this.resolution\n                );\n\n                if (data.rotated)\n                {\n                    frame = new Rectangle(\n                        Math.floor(rect.x) / this.resolution,\n                        Math.floor(rect.y) / this.resolution,\n                        Math.floor(rect.h) / this.resolution,\n                        Math.floor(rect.w) / this.resolution\n                    );\n                }\n                else\n                {\n                    frame = new Rectangle(\n                        Math.floor(rect.x) / this.resolution,\n                        Math.floor(rect.y) / this.resolution,\n                        Math.floor(rect.w) / this.resolution,\n                        Math.floor(rect.h) / this.resolution\n                    );\n                }\n\n                //  Check to see if the sprite is trimmed\n                if (data.trimmed !== false && data.spriteSourceSize)\n                {\n                    trim = new Rectangle(\n                        Math.floor(data.spriteSourceSize.x) / this.resolution,\n                        Math.floor(data.spriteSourceSize.y) / this.resolution,\n                        Math.floor(rect.w) / this.resolution,\n                        Math.floor(rect.h) / this.resolution\n                    );\n                }\n\n                this.textures[i] = new Texture(\n                    this.baseTexture,\n                    frame,\n                    orig,\n                    trim,\n                    data.rotated ? 2 : 0,\n                    data.anchor\n                );\n\n                // lets also add the frame to pixi's global cache for 'from' and 'fromLoader' functions\n                Texture.addToCache(this.textures[i], i);\n            }\n\n            frameIndex++;\n        }\n    }\n\n    /**\n     * Parse animations config\n     *\n     * @private\n     */\n    _processAnimations()\n    {\n        const animations = this.data.animations || {};\n\n        for (const animName in animations)\n        {\n            this.animations[animName] = [];\n            for (let i = 0; i < animations[animName].length; i++)\n            {\n                const frameName = animations[animName][i];\n\n                this.animations[animName].push(this.textures[frameName]);\n            }\n        }\n    }\n\n    /**\n     * The parse has completed.\n     *\n     * @private\n     */\n    _parseComplete()\n    {\n        const callback = this._callback;\n\n        this._callback = null;\n        this._batchIndex = 0;\n        callback.call(this, this.textures);\n    }\n\n    /**\n     * Begin the next batch of textures.\n     *\n     * @private\n     */\n    _nextBatch()\n    {\n        this._processFrames(this._batchIndex * Spritesheet.BATCH_SIZE);\n        this._batchIndex++;\n        setTimeout(() =>\n        {\n            if (this._batchIndex * Spritesheet.BATCH_SIZE < this._frameKeys.length)\n            {\n                this._nextBatch();\n            }\n            else\n            {\n                this._processAnimations();\n                this._parseComplete();\n            }\n        }, 0);\n    }\n\n    /**\n     * Destroy Spritesheet and don't use after this.\n     *\n     * @param {boolean} [destroyBase=false] Whether to destroy the base texture as well\n     */\n    destroy(destroyBase = false)\n    {\n        for (const i in this.textures)\n        {\n            this.textures[i].destroy();\n        }\n        this._frames = null;\n        this._frameKeys = null;\n        this.data = null;\n        this.textures = null;\n        if (destroyBase)\n        {\n            this.baseTexture.destroy();\n        }\n        this.baseTexture = null;\n    }\n}\n","import { url } from '@pixi/utils';\nimport { LoaderResource } from '@pixi/loaders';\nimport Spritesheet from './Spritesheet';\n\n/**\n * {@link PIXI.Loader Loader} middleware for loading texture atlases that have been created with\n * TexturePacker or similar JSON-based spritesheet.\n *\n * This middleware automatically generates Texture resources.\n *\n * @class\n * @memberof PIXI\n * @implements PIXI.ILoaderPlugin\n */\nexport default class SpritesheetLoader\n{\n    /**\n     * Called after a resource is loaded.\n     * @see PIXI.Loader.loaderMiddleware\n     * @param {PIXI.LoaderResource} resource\n     * @param {function} next\n     */\n    static use(resource, next)\n    {\n        const imageResourceName = `${resource.name}_image`;\n\n        // skip if no data, its not json, it isn't spritesheet data, or the image resource already exists\n        if (!resource.data\n            || resource.type !== LoaderResource.TYPE.JSON\n            || !resource.data.frames\n            || this.resources[imageResourceName]\n        )\n        {\n            next();\n\n            return;\n        }\n\n        const loadOptions = {\n            crossOrigin: resource.crossOrigin,\n            metadata: resource.metadata.imageMetadata,\n            parentResource: resource,\n        };\n\n        const resourcePath = SpritesheetLoader.getResourcePath(resource, this.baseUrl);\n\n        // load the image for this sheet\n        this.add(imageResourceName, resourcePath, loadOptions, function onImageLoad(res)\n        {\n            if (res.error)\n            {\n                next(res.error);\n\n                return;\n            }\n\n            const spritesheet = new Spritesheet(\n                res.texture.baseTexture,\n                resource.data,\n                resource.url\n            );\n\n            spritesheet.parse(() =>\n            {\n                resource.spritesheet = spritesheet;\n                resource.textures = spritesheet.textures;\n                next();\n            });\n        });\n    }\n\n    /**\n     * Get the spritesheets root path\n     * @param {PIXI.LoaderResource} resource - Resource to check path\n     * @param {string} baseUrl - Base root url\n     */\n    static getResourcePath(resource, baseUrl)\n    {\n        // Prepend url path unless the resource image is a data url\n        if (resource.isDataUrl)\n        {\n            return resource.data.meta.image;\n        }\n\n        return url.resolve(resource.url.replace(baseUrl, ''), resource.data.meta.image);\n    }\n}\n","import { TextureMatrix, Texture } from '@pixi/core';\nimport { Point, Rectangle, Transform } from '@pixi/math';\nimport { TextureCache } from '@pixi/utils';\nimport { Sprite } from '@pixi/sprite';\n\nconst tempPoint = new Point();\n\n/**\n * A tiling sprite is a fast way of rendering a tiling image\n *\n * @class\n * @extends PIXI.Sprite\n * @memberof PIXI\n */\nexport default class TilingSprite extends Sprite\n{\n    /**\n     * @param {PIXI.Texture} texture - the texture of the tiling sprite\n     * @param {number} [width=100] - the width of the tiling sprite\n     * @param {number} [height=100] - the height of the tiling sprite\n     */\n    constructor(texture, width = 100, height = 100)\n    {\n        super(texture);\n\n        /**\n         * Tile transform\n         *\n         * @member {PIXI.Transform}\n         */\n        this.tileTransform = new Transform();\n\n        // /// private\n\n        /**\n         * The with of the tiling sprite\n         *\n         * @member {number}\n         * @private\n         */\n        this._width = width;\n\n        /**\n         * The height of the tiling sprite\n         *\n         * @member {number}\n         * @private\n         */\n        this._height = height;\n\n        /**\n         * Canvas pattern\n         *\n         * @type {CanvasPattern}\n         * @private\n         */\n        this._canvasPattern = null;\n\n        /**\n         * matrix that is applied to UV to get the coords in Texture normalized space to coords in BaseTexture space\n         *\n         * @member {PIXI.TextureMatrix}\n         */\n        this.uvMatrix = texture.uvMatrix || new TextureMatrix(texture);\n\n        /**\n         * Plugin that is responsible for rendering this element.\n         * Allows to customize the rendering process without overriding '_render' method.\n         *\n         * @member {string}\n         * @default 'tilingSprite'\n         */\n        this.pluginName = 'tilingSprite';\n\n        /**\n         * Whether or not anchor affects uvs\n         *\n         * @member {boolean}\n         * @default false\n         */\n        this.uvRespectAnchor = false;\n    }\n    /**\n     * Changes frame clamping in corresponding textureTransform, shortcut\n     * Change to -0.5 to add a pixel to the edge, recommended for transparent trimmed textures in atlas\n     *\n     * @default 0.5\n     * @member {number}\n     */\n    get clampMargin()\n    {\n        return this.uvMatrix.clampMargin;\n    }\n\n    set clampMargin(value) // eslint-disable-line require-jsdoc\n    {\n        this.uvMatrix.clampMargin = value;\n        this.uvMatrix.update(true);\n    }\n\n    /**\n     * The scaling of the image that is being tiled\n     *\n     * @member {PIXI.ObservablePoint}\n     */\n    get tileScale()\n    {\n        return this.tileTransform.scale;\n    }\n\n    set tileScale(value) // eslint-disable-line require-jsdoc\n    {\n        this.tileTransform.scale.copyFrom(value);\n    }\n\n    /**\n     * The offset of the image that is being tiled\n     *\n     * @member {PIXI.ObservablePoint}\n     */\n    get tilePosition()\n    {\n        return this.tileTransform.position;\n    }\n\n    set tilePosition(value) // eslint-disable-line require-jsdoc\n    {\n        this.tileTransform.position.copyFrom(value);\n    }\n\n    /**\n     * @private\n     */\n    _onTextureUpdate()\n    {\n        if (this.uvMatrix)\n        {\n            this.uvMatrix.texture = this._texture;\n        }\n        this._cachedTint = 0xFFFFFF;\n    }\n\n    /**\n     * Renders the object using the WebGL renderer\n     *\n     * @protected\n     * @param {PIXI.Renderer} renderer - The renderer\n     */\n    _render(renderer)\n    {\n        // tweak our texture temporarily..\n        const texture = this._texture;\n\n        if (!texture || !texture.valid)\n        {\n            return;\n        }\n\n        this.tileTransform.updateLocalTransform();\n        this.uvMatrix.update();\n\n        renderer.batch.setObjectRenderer(renderer.plugins[this.pluginName]);\n        renderer.plugins[this.pluginName].render(this);\n    }\n\n    /**\n     * Updates the bounds of the tiling sprite.\n     *\n     * @protected\n     */\n    _calculateBounds()\n    {\n        const minX = this._width * -this._anchor._x;\n        const minY = this._height * -this._anchor._y;\n        const maxX = this._width * (1 - this._anchor._x);\n        const maxY = this._height * (1 - this._anchor._y);\n\n        this._bounds.addFrame(this.transform, minX, minY, maxX, maxY);\n    }\n\n    /**\n     * Gets the local bounds of the sprite object.\n     *\n     * @param {PIXI.Rectangle} rect - The output rectangle.\n     * @return {PIXI.Rectangle} The bounds.\n     */\n    getLocalBounds(rect)\n    {\n        // we can do a fast local bounds if the sprite has no children!\n        if (this.children.length === 0)\n        {\n            this._bounds.minX = this._width * -this._anchor._x;\n            this._bounds.minY = this._height * -this._anchor._y;\n            this._bounds.maxX = this._width * (1 - this._anchor._x);\n            this._bounds.maxY = this._height * (1 - this._anchor._y);\n\n            if (!rect)\n            {\n                if (!this._localBoundsRect)\n                {\n                    this._localBoundsRect = new Rectangle();\n                }\n\n                rect = this._localBoundsRect;\n            }\n\n            return this._bounds.getRectangle(rect);\n        }\n\n        return super.getLocalBounds.call(this, rect);\n    }\n\n    /**\n     * Checks if a point is inside this tiling sprite.\n     *\n     * @param {PIXI.Point} point - the point to check\n     * @return {boolean} Whether or not the sprite contains the point.\n     */\n    containsPoint(point)\n    {\n        this.worldTransform.applyInverse(point, tempPoint);\n\n        const width = this._width;\n        const height = this._height;\n        const x1 = -width * this.anchor._x;\n\n        if (tempPoint.x >= x1 && tempPoint.x < x1 + width)\n        {\n            const y1 = -height * this.anchor._y;\n\n            if (tempPoint.y >= y1 && tempPoint.y < y1 + height)\n            {\n                return true;\n            }\n        }\n\n        return false;\n    }\n\n    /**\n     * Destroys this sprite and optionally its texture and children\n     *\n     * @param {object|boolean} [options] - Options parameter. A boolean will act as if all options\n     *  have been set to that value\n     * @param {boolean} [options.children=false] - if set to true, all the children will have their destroy\n     *      method called as well. 'options' will be passed on to those calls.\n     * @param {boolean} [options.texture=false] - Should it destroy the current texture of the sprite as well\n     * @param {boolean} [options.baseTexture=false] - Should it destroy the base texture of the sprite as well\n     */\n    destroy(options)\n    {\n        super.destroy(options);\n\n        this.tileTransform = null;\n        this.uvMatrix = null;\n    }\n\n    /**\n     * Helper function that creates a new tiling sprite based on the source you provide.\n     * The source can be - frame id, image url, video url, canvas element, video element, base texture\n     *\n     * @static\n     * @param {number|string|PIXI.Texture|HTMLCanvasElement|HTMLVideoElement} source - Source to create texture from\n     * @param {number} width - the width of the tiling sprite\n     * @param {number} height - the height of the tiling sprite\n     * @return {PIXI.TilingSprite} The newly created texture\n     */\n    static from(source, width, height)\n    {\n        return new TilingSprite(Texture.from(source), width, height);\n    }\n\n    /**\n     * Helper function that creates a tiling sprite that will use a texture from the TextureCache based on the frameId\n     * The frame ids are created when a Texture packer file has been loaded\n     *\n     * @static\n     * @param {string} frameId - The frame Id of the texture in the cache\n     * @param {number} width - the width of the tiling sprite\n     * @param {number} height - the height of the tiling sprite\n     * @return {PIXI.TilingSprite} A new TilingSprite using a texture from the texture cache matching the frameId\n     */\n    static fromFrame(frameId, width, height)\n    {\n        const texture = TextureCache[frameId];\n\n        if (!texture)\n        {\n            throw new Error(`The frameId \"${frameId}\" does not exist in the texture cache ${this}`);\n        }\n\n        return new TilingSprite(texture, width, height);\n    }\n\n    /**\n     * Helper function that creates a sprite that will contain a texture based on an image url\n     * If the image is not in the texture cache it will be loaded\n     *\n     * @static\n     * @param {string} imageId - The image url of the texture\n     * @param {number} width - the width of the tiling sprite\n     * @param {number} height - the height of the tiling sprite\n     * @param {Object} [options] - See {@link PIXI.BaseTexture}'s constructor for options.\n     * @return {PIXI.TilingSprite} A new TilingSprite using a texture from the texture cache matching the image id\n     */\n    static fromImage(imageId, width, height, options)\n    {\n        // Fallback support for crossorigin, scaleMode parameters\n        if (options && typeof options !== 'object')\n        {\n            options = {\n                scaleMode: arguments[4],\n                resourceOptions: {\n                    crossorigin: arguments[3],\n                },\n            };\n        }\n\n        return new TilingSprite(Texture.from(imageId, options), width, height);\n    }\n\n    /**\n     * The width of the sprite, setting this will actually modify the scale to achieve the value set\n     *\n     * @member {number}\n     */\n    get width()\n    {\n        return this._width;\n    }\n\n    set width(value) // eslint-disable-line require-jsdoc\n    {\n        this._width = value;\n    }\n\n    /**\n     * The height of the TilingSprite, setting this will actually modify the scale to achieve the value set\n     *\n     * @member {number}\n     */\n    get height()\n    {\n        return this._height;\n    }\n\n    set height(value) // eslint-disable-line require-jsdoc\n    {\n        this._height = value;\n    }\n}\n","import { ObjectRenderer, Shader, QuadUv } from '@pixi/core';\nimport { WRAP_MODES } from '@pixi/constants';\nimport { Matrix } from '@pixi/math';\nimport { premultiplyTintToRgba, correctBlendMode } from '@pixi/utils';\n\nimport vertex from './tilingSprite.vert';\nimport fragment from './tilingSprite.frag';\nimport fragmentSimple from './tilingSprite_simple.frag';\n\nconst tempMat = new Matrix();\n\n/**\n * WebGL renderer plugin for tiling sprites\n *\n * @class\n * @memberof PIXI\n * @extends PIXI.ObjectRenderer\n */\nexport default class TilingSpriteRenderer extends ObjectRenderer\n{\n    /**\n     * constructor for renderer\n     *\n     * @param {PIXI.Renderer} renderer The renderer this tiling awesomeness works for.\n     */\n    constructor(renderer)\n    {\n        super(renderer);\n\n        const uniforms = { globals: this.renderer.globalUniforms };\n\n        this.shader = Shader.from(vertex, fragment, uniforms);\n\n        this.simpleShader = Shader.from(vertex, fragmentSimple, uniforms);\n\n        this.quad = new QuadUv();\n    }\n\n    /**\n     *\n     * @param {PIXI.TilingSprite} ts tilingSprite to be rendered\n     */\n    render(ts)\n    {\n        const renderer = this.renderer;\n        const quad = this.quad;\n\n        let vertices = quad.vertices;\n\n        vertices[0] = vertices[6] = (ts._width) * -ts.anchor.x;\n        vertices[1] = vertices[3] = ts._height * -ts.anchor.y;\n\n        vertices[2] = vertices[4] = (ts._width) * (1.0 - ts.anchor.x);\n        vertices[5] = vertices[7] = ts._height * (1.0 - ts.anchor.y);\n\n        if (ts.uvRespectAnchor)\n        {\n            vertices = quad.uvs;\n\n            vertices[0] = vertices[6] = -ts.anchor.x;\n            vertices[1] = vertices[3] = -ts.anchor.y;\n\n            vertices[2] = vertices[4] = 1.0 - ts.anchor.x;\n            vertices[5] = vertices[7] = 1.0 - ts.anchor.y;\n        }\n\n        quad.invalidate();\n\n        const tex = ts._texture;\n        const baseTex = tex.baseTexture;\n        const lt = ts.tileTransform.localTransform;\n        const uv = ts.uvMatrix;\n        let isSimple = baseTex.isPowerOfTwo\n            && tex.frame.width === baseTex.width && tex.frame.height === baseTex.height;\n\n        // auto, force repeat wrapMode for big tiling textures\n        if (isSimple)\n        {\n            if (!baseTex._glTextures[renderer.CONTEXT_UID])\n            {\n                if (baseTex.wrapMode === WRAP_MODES.CLAMP)\n                {\n                    baseTex.wrapMode = WRAP_MODES.REPEAT;\n                }\n            }\n            else\n            {\n                isSimple = baseTex.wrapMode !== WRAP_MODES.CLAMP;\n            }\n        }\n\n        const shader = isSimple ? this.simpleShader : this.shader;\n\n        const w = tex.width;\n        const h = tex.height;\n        const W = ts._width;\n        const H = ts._height;\n\n        tempMat.set(lt.a * w / W,\n            lt.b * w / H,\n            lt.c * h / W,\n            lt.d * h / H,\n            lt.tx / W,\n            lt.ty / H);\n\n        // that part is the same as above:\n        // tempMat.identity();\n        // tempMat.scale(tex.width, tex.height);\n        // tempMat.prepend(lt);\n        // tempMat.scale(1.0 / ts._width, 1.0 / ts._height);\n\n        tempMat.invert();\n        if (isSimple)\n        {\n            tempMat.prepend(uv.mapCoord);\n        }\n        else\n        {\n            shader.uniforms.uMapCoord = uv.mapCoord.toArray(true);\n            shader.uniforms.uClampFrame = uv.uClampFrame;\n            shader.uniforms.uClampOffset = uv.uClampOffset;\n        }\n\n        shader.uniforms.uTransform = tempMat.toArray(true);\n        shader.uniforms.uColor = premultiplyTintToRgba(ts.tint, ts.worldAlpha,\n            shader.uniforms.uColor, baseTex.premultiplyAlpha);\n        shader.uniforms.translationMatrix = ts.transform.worldTransform.toArray(true);\n        shader.uniforms.uSampler = tex;\n\n        renderer.shader.bind(shader);\n        renderer.geometry.bind(quad);// , renderer.shader.getGLShader());\n\n        renderer.state.setBlendMode(correctBlendMode(ts.blendMode, baseTex.premultiplyAlpha));\n        renderer.geometry.draw(this.renderer.gl.TRIANGLES, 6, 0);\n    }\n}\n","import { Texture } from '@pixi/core';\nimport { Container } from '@pixi/display';\nimport { ObservablePoint, Point, Rectangle } from '@pixi/math';\nimport { settings } from '@pixi/settings';\nimport { Sprite } from '@pixi/sprite';\nimport { removeItems, getResolutionOfUrl } from '@pixi/utils';\n\n/**\n * A BitmapText object will create a line or multiple lines of text using bitmap font.\n *\n * The primary advantage of this class over Text is that all of your textures are pre-generated and loading,\n * meaning that rendering is fast, and changing text has no performance implications.\n *\n * The primary disadvantage is that you need to preload the bitmap font assets, and thus the styling is set in stone.\n * Supporting character sets other than latin, such as CJK languages, may be impractical due to the number of characters.\n *\n * To split a line you can use '\\n', '\\r' or '\\r\\n' in your string.\n *\n * You can generate the fnt files using\n * http://www.angelcode.com/products/bmfont/ for Windows or\n * http://www.bmglyph.com/ for Mac.\n *\n * A BitmapText can only be created when the font is loaded.\n *\n * ```js\n * // in this case the font is in a file called 'desyrel.fnt'\n * let bitmapText = new PIXI.BitmapText(\"text using a fancy font!\", {font: \"35px Desyrel\", align: \"right\"});\n * ```\n *\n * @class\n * @extends PIXI.Container\n * @memberof PIXI\n */\nexport default class BitmapText extends Container\n{\n    /**\n     * @param {string} text - A string that you would like the text to display.\n     * @param {object} style - The style parameters.\n     * @param {string|object} style.font - The font descriptor for the object, can be passed as a string of form\n     *      \"24px FontName\" or \"FontName\" or as an object with explicit name/size properties.\n     * @param {string} [style.font.name] - The bitmap font id.\n     * @param {number} [style.font.size] - The size of the font in pixels, e.g. 24\n     * @param {string} [style.align='left'] - Alignment for multiline text ('left', 'center' or 'right'), does not affect\n     *      single line text.\n     * @param {number} [style.tint=0xFFFFFF] - The tint color.\n     */\n    constructor(text, style = {})\n    {\n        super();\n\n        /**\n         * Private tracker for the width of the overall text\n         *\n         * @member {number}\n         * @private\n         */\n        this._textWidth = 0;\n\n        /**\n         * Private tracker for the height of the overall text\n         *\n         * @member {number}\n         * @private\n         */\n        this._textHeight = 0;\n\n        /**\n         * Private tracker for the letter sprite pool.\n         *\n         * @member {PIXI.Sprite[]}\n         * @private\n         */\n        this._glyphs = [];\n\n        /**\n         * Private tracker for the current style.\n         *\n         * @member {object}\n         * @private\n         */\n        this._font = {\n            tint: style.tint !== undefined ? style.tint : 0xFFFFFF,\n            align: style.align || 'left',\n            name: null,\n            size: 0,\n        };\n\n        /**\n         * Private tracker for the current font.\n         *\n         * @member {object}\n         * @private\n         */\n        this.font = style.font; // run font setter\n\n        /**\n         * Private tracker for the current text.\n         *\n         * @member {string}\n         * @private\n         */\n        this._text = text;\n\n        /**\n         * The max width of this bitmap text in pixels. If the text provided is longer than the\n         * value provided, line breaks will be automatically inserted in the last whitespace.\n         * Disable by setting value to 0\n         *\n         * @member {number}\n         * @private\n         */\n        this._maxWidth = 0;\n\n        /**\n         * The max line height. This is useful when trying to use the total height of the Text,\n         * ie: when trying to vertically align.\n         *\n         * @member {number}\n         * @private\n         */\n        this._maxLineHeight = 0;\n\n        /**\n         * Letter spacing. This is useful for setting the space between characters.\n         * @member {number}\n         * @private\n         */\n        this._letterSpacing = 0;\n\n        /**\n         * Text anchor. read-only\n         *\n         * @member {PIXI.ObservablePoint}\n         * @private\n         */\n        this._anchor = new ObservablePoint(() => { this.dirty = true; }, this, 0, 0);\n\n        /**\n         * The dirty state of this object.\n         *\n         * @member {boolean}\n         */\n        this.dirty = false;\n\n        /**\n         * If true PixiJS will Math.floor() x/y values when rendering, stopping pixel interpolation.\n         * Advantages can include sharper image quality (like text) and faster rendering on canvas.\n         * The main disadvantage is movement of objects may appear less smooth.\n         * To set the global default, change {@link PIXI.settings.ROUND_PIXELS}\n         *\n         * @member {boolean}\n         * @default false\n         */\n        this.roundPixels = settings.ROUND_PIXELS;\n\n        this.updateText();\n    }\n\n    /**\n     * Renders text and updates it when needed\n     *\n     * @private\n     */\n    updateText()\n    {\n        const data = BitmapText.fonts[this._font.name];\n        const scale = this._font.size / data.size;\n        const pos = new Point();\n        const chars = [];\n        const lineWidths = [];\n        const text = this._text.replace(/(?:\\r\\n|\\r)/g, '\\n') || ' ';\n        const textLength = text.length;\n        const maxWidth = this._maxWidth * data.size / this._font.size;\n\n        let prevCharCode = null;\n        let lastLineWidth = 0;\n        let maxLineWidth = 0;\n        let line = 0;\n        let lastBreakPos = -1;\n        let lastBreakWidth = 0;\n        let spacesRemoved = 0;\n        let maxLineHeight = 0;\n\n        for (let i = 0; i < textLength; i++)\n        {\n            const charCode = text.charCodeAt(i);\n            const char = text.charAt(i);\n\n            if ((/(?:\\s)/).test(char))\n            {\n                lastBreakPos = i;\n                lastBreakWidth = lastLineWidth;\n            }\n\n            if (char === '\\r' || char === '\\n')\n            {\n                lineWidths.push(lastLineWidth);\n                maxLineWidth = Math.max(maxLineWidth, lastLineWidth);\n                ++line;\n                ++spacesRemoved;\n\n                pos.x = 0;\n                pos.y += data.lineHeight;\n                prevCharCode = null;\n                continue;\n            }\n\n            const charData = data.chars[charCode];\n\n            if (!charData)\n            {\n                continue;\n            }\n\n            if (prevCharCode && charData.kerning[prevCharCode])\n            {\n                pos.x += charData.kerning[prevCharCode];\n            }\n\n            chars.push({\n                texture: charData.texture,\n                line,\n                charCode,\n                position: new Point(pos.x + charData.xOffset + (this._letterSpacing / 2), pos.y + charData.yOffset),\n            });\n            pos.x += charData.xAdvance + this._letterSpacing;\n            lastLineWidth = pos.x;\n            maxLineHeight = Math.max(maxLineHeight, (charData.yOffset + charData.texture.height));\n            prevCharCode = charCode;\n\n            if (lastBreakPos !== -1 && maxWidth > 0 && pos.x > maxWidth)\n            {\n                ++spacesRemoved;\n                removeItems(chars, 1 + lastBreakPos - spacesRemoved, 1 + i - lastBreakPos);\n                i = lastBreakPos;\n                lastBreakPos = -1;\n\n                lineWidths.push(lastBreakWidth);\n                maxLineWidth = Math.max(maxLineWidth, lastBreakWidth);\n                line++;\n\n                pos.x = 0;\n                pos.y += data.lineHeight;\n                prevCharCode = null;\n            }\n        }\n\n        const lastChar = text.charAt(text.length - 1);\n\n        if (lastChar !== '\\r' && lastChar !== '\\n')\n        {\n            if ((/(?:\\s)/).test(lastChar))\n            {\n                lastLineWidth = lastBreakWidth;\n            }\n\n            lineWidths.push(lastLineWidth);\n            maxLineWidth = Math.max(maxLineWidth, lastLineWidth);\n        }\n\n        const lineAlignOffsets = [];\n\n        for (let i = 0; i <= line; i++)\n        {\n            let alignOffset = 0;\n\n            if (this._font.align === 'right')\n            {\n                alignOffset = maxLineWidth - lineWidths[i];\n            }\n            else if (this._font.align === 'center')\n            {\n                alignOffset = (maxLineWidth - lineWidths[i]) / 2;\n            }\n\n            lineAlignOffsets.push(alignOffset);\n        }\n\n        const lenChars = chars.length;\n        const tint = this.tint;\n\n        for (let i = 0; i < lenChars; i++)\n        {\n            let c = this._glyphs[i]; // get the next glyph sprite\n\n            if (c)\n            {\n                c.texture = chars[i].texture;\n            }\n            else\n            {\n                c = new Sprite(chars[i].texture);\n                c.roundPixels = this.roundPixels;\n                this._glyphs.push(c);\n            }\n\n            c.position.x = (chars[i].position.x + lineAlignOffsets[chars[i].line]) * scale;\n            c.position.y = chars[i].position.y * scale;\n            c.scale.x = c.scale.y = scale;\n            c.tint = tint;\n\n            if (!c.parent)\n            {\n                this.addChild(c);\n            }\n        }\n\n        // remove unnecessary children.\n        for (let i = lenChars; i < this._glyphs.length; ++i)\n        {\n            this.removeChild(this._glyphs[i]);\n        }\n\n        this._textWidth = maxLineWidth * scale;\n        this._textHeight = (pos.y + data.lineHeight) * scale;\n\n        // apply anchor\n        if (this.anchor.x !== 0 || this.anchor.y !== 0)\n        {\n            for (let i = 0; i < lenChars; i++)\n            {\n                this._glyphs[i].x -= this._textWidth * this.anchor.x;\n                this._glyphs[i].y -= this._textHeight * this.anchor.y;\n            }\n        }\n        this._maxLineHeight = maxLineHeight * scale;\n    }\n\n    /**\n     * Updates the transform of this object\n     *\n     * @private\n     */\n    updateTransform()\n    {\n        this.validate();\n        this.containerUpdateTransform();\n    }\n\n    /**\n     * Validates text before calling parent's getLocalBounds\n     *\n     * @return {PIXI.Rectangle} The rectangular bounding area\n     */\n    getLocalBounds()\n    {\n        this.validate();\n\n        return super.getLocalBounds();\n    }\n\n    /**\n     * Updates text when needed\n     *\n     * @private\n     */\n    validate()\n    {\n        if (this.dirty)\n        {\n            this.updateText();\n            this.dirty = false;\n        }\n    }\n\n    /**\n     * The tint of the BitmapText object.\n     *\n     * @member {number}\n     */\n    get tint()\n    {\n        return this._font.tint;\n    }\n\n    set tint(value) // eslint-disable-line require-jsdoc\n    {\n        this._font.tint = (typeof value === 'number' && value >= 0) ? value : 0xFFFFFF;\n\n        this.dirty = true;\n    }\n\n    /**\n     * The alignment of the BitmapText object.\n     *\n     * @member {string}\n     * @default 'left'\n     */\n    get align()\n    {\n        return this._font.align;\n    }\n\n    set align(value) // eslint-disable-line require-jsdoc\n    {\n        this._font.align = value || 'left';\n\n        this.dirty = true;\n    }\n\n    /**\n     * The anchor sets the origin point of the text.\n     *\n     * The default is `(0,0)`, this means the text's origin is the top left.\n     *\n     * Setting the anchor to `(0.5,0.5)` means the text's origin is centered.\n     *\n     * Setting the anchor to `(1,1)` would mean the text's origin point will be the bottom right corner.\n     *\n     * @member {PIXI.Point | number}\n     */\n    get anchor()\n    {\n        return this._anchor;\n    }\n\n    set anchor(value) // eslint-disable-line require-jsdoc\n    {\n        if (typeof value === 'number')\n        {\n            this._anchor.set(value);\n        }\n        else\n        {\n            this._anchor.copyFrom(value);\n        }\n    }\n\n    /**\n     * The font descriptor of the BitmapText object.\n     *\n     * @member {object}\n     */\n    get font()\n    {\n        return this._font;\n    }\n\n    set font(value) // eslint-disable-line require-jsdoc\n    {\n        if (!value)\n        {\n            return;\n        }\n\n        if (typeof value === 'string')\n        {\n            value = value.split(' ');\n\n            this._font.name = value.length === 1 ? value[0] : value.slice(1).join(' ');\n            this._font.size = value.length >= 2 ? parseInt(value[0], 10) : BitmapText.fonts[this._font.name].size;\n        }\n        else\n        {\n            this._font.name = value.name;\n            this._font.size = typeof value.size === 'number' ? value.size : parseInt(value.size, 10);\n        }\n\n        this.dirty = true;\n    }\n\n    /**\n     * The text of the BitmapText object.\n     *\n     * @member {string}\n     */\n    get text()\n    {\n        return this._text;\n    }\n\n    set text(text) // eslint-disable-line require-jsdoc\n    {\n        text = String(text === null || text === undefined ? '' : text);\n\n        if (this._text === text)\n        {\n            return;\n        }\n        this._text = text;\n        this.dirty = true;\n    }\n\n    /**\n     * The max width of this bitmap text in pixels. If the text provided is longer than the\n     * value provided, line breaks will be automatically inserted in the last whitespace.\n     * Disable by setting the value to 0.\n     *\n     * @member {number}\n     */\n    get maxWidth()\n    {\n        return this._maxWidth;\n    }\n\n    set maxWidth(value) // eslint-disable-line require-jsdoc\n    {\n        if (this._maxWidth === value)\n        {\n            return;\n        }\n        this._maxWidth = value;\n        this.dirty = true;\n    }\n\n    /**\n     * The max line height. This is useful when trying to use the total height of the Text,\n     * i.e. when trying to vertically align.\n     *\n     * @member {number}\n     * @readonly\n     */\n    get maxLineHeight()\n    {\n        this.validate();\n\n        return this._maxLineHeight;\n    }\n\n    /**\n     * The width of the overall text, different from fontSize,\n     * which is defined in the style object.\n     *\n     * @member {number}\n     * @readonly\n     */\n    get textWidth()\n    {\n        this.validate();\n\n        return this._textWidth;\n    }\n\n    /**\n     * Additional space between characters.\n     *\n     * @member {number}\n     */\n    get letterSpacing()\n    {\n        return this._letterSpacing;\n    }\n\n    set letterSpacing(value) // eslint-disable-line require-jsdoc\n    {\n        if (this._letterSpacing !== value)\n        {\n            this._letterSpacing = value;\n            this.dirty = true;\n        }\n    }\n\n    /**\n     * The height of the overall text, different from fontSize,\n     * which is defined in the style object.\n     *\n     * @member {number}\n     * @readonly\n     */\n    get textHeight()\n    {\n        this.validate();\n\n        return this._textHeight;\n    }\n\n    /**\n     * Register a bitmap font with data and a texture.\n     *\n     * @static\n     * @param {XMLDocument} xml - The XML document data.\n     * @param {Object.<string, PIXI.Texture>|PIXI.Texture|PIXI.Texture[]} textures - List of textures for each page.\n     *  If providing an object, the key is the `<page>` element's `file` attribute in the FNT file.\n     * @return {Object} Result font object with font, size, lineHeight and char fields.\n     */\n    static registerFont(xml, textures)\n    {\n        const data = {};\n        const info = xml.getElementsByTagName('info')[0];\n        const common = xml.getElementsByTagName('common')[0];\n        const pages = xml.getElementsByTagName('page');\n        const res = getResolutionOfUrl(pages[0].getAttribute('file'), settings.RESOLUTION);\n        const pagesTextures = {};\n\n        data.font = info.getAttribute('face');\n        data.size = parseInt(info.getAttribute('size'), 10);\n        data.lineHeight = parseInt(common.getAttribute('lineHeight'), 10) / res;\n        data.chars = {};\n\n        // Single texture, convert to list\n        if (textures instanceof Texture)\n        {\n            textures = [textures];\n        }\n\n        // Convert the input Texture, Textures or object\n        // into a page Texture lookup by \"id\"\n        for (let i = 0; i < pages.length; i++)\n        {\n            const id = pages[i].getAttribute('id');\n            const file = pages[i].getAttribute('file');\n\n            pagesTextures[id] = textures instanceof Array ? textures[i] : textures[file];\n        }\n\n        // parse letters\n        const letters = xml.getElementsByTagName('char');\n\n        for (let i = 0; i < letters.length; i++)\n        {\n            const letter = letters[i];\n            const charCode = parseInt(letter.getAttribute('id'), 10);\n            const page = letter.getAttribute('page') || 0;\n            const textureRect = new Rectangle(\n                (parseInt(letter.getAttribute('x'), 10) / res) + (pagesTextures[page].frame.x / res),\n                (parseInt(letter.getAttribute('y'), 10) / res) + (pagesTextures[page].frame.y / res),\n                parseInt(letter.getAttribute('width'), 10) / res,\n                parseInt(letter.getAttribute('height'), 10) / res\n            );\n\n            data.chars[charCode] = {\n                xOffset: parseInt(letter.getAttribute('xoffset'), 10) / res,\n                yOffset: parseInt(letter.getAttribute('yoffset'), 10) / res,\n                xAdvance: parseInt(letter.getAttribute('xadvance'), 10) / res,\n                kerning: {},\n                texture: new Texture(pagesTextures[page].baseTexture, textureRect),\n                page,\n            };\n        }\n\n        // parse kernings\n        const kernings = xml.getElementsByTagName('kerning');\n\n        for (let i = 0; i < kernings.length; i++)\n        {\n            const kerning = kernings[i];\n            const first = parseInt(kerning.getAttribute('first'), 10) / res;\n            const second = parseInt(kerning.getAttribute('second'), 10) / res;\n            const amount = parseInt(kerning.getAttribute('amount'), 10) / res;\n\n            if (data.chars[second])\n            {\n                data.chars[second].kerning[first] = amount;\n            }\n        }\n\n        // I'm leaving this as a temporary fix so we can test the bitmap fonts in v3\n        // but it's very likely to change\n        BitmapText.fonts[data.font] = data;\n\n        return data;\n    }\n}\n\nBitmapText.fonts = {};\n","import { LoaderResource } from '@pixi/loaders';\nimport BitmapText from './BitmapText';\n\n/**\n * {@link PIXI.Loader Loader} middleware for loading\n * bitmap-based fonts suitable for using with {@link PIXI.BitmapText}.\n * @class\n * @memberof PIXI\n * @implements PIXI.ILoaderPlugin\n */\nexport default class BitmapFontLoader\n{\n    /**\n     * Register a BitmapText font from loader resource.\n     *\n     * @param {PIXI.LoaderResource} resource - Loader resource.\n     * @param {PIXI.Texture} texture - Reference to texture.\n     */\n    static parse(resource, texture)\n    {\n        resource.bitmapFont = BitmapText.registerFont(resource.data, texture);\n    }\n\n    /**\n     * Called when the plugin is installed.\n     *\n     * @see PIXI.Loader.registerPlugin\n     */\n    static add()\n    {\n        LoaderResource.setExtensionXhrType('fnt', LoaderResource.XHR_RESPONSE_TYPE.DOCUMENT);\n    }\n\n    /**\n     * Replacement for NodeJS's path.dirname\n     * @private\n     * @param {string} url Path to get directory for\n     */\n    static dirname(url)\n    {\n        const dir = url\n            .replace(/\\/$/, '') // replace trailing slash\n            .replace(/\\/[^\\/]*$/, ''); // remove everything after the last\n\n        // File request is relative, use current directory\n        if (dir === url)\n        {\n            return '.';\n        }\n        // Started with a slash\n        else if (dir === '')\n        {\n            return '/';\n        }\n\n        return dir;\n    }\n\n    /**\n     * Called after a resource is loaded.\n     * @see PIXI.Loader.loaderMiddleware\n     * @param {PIXI.LoaderResource} resource\n     * @param {function} next\n     */\n    static use(resource, next)\n    {\n        // skip if no data or not xml data\n        if (!resource.data || resource.type !== LoaderResource.TYPE.XML)\n        {\n            next();\n\n            return;\n        }\n\n        // skip if not bitmap font data, using some silly duck-typing\n        if (resource.data.getElementsByTagName('page').length === 0\n            || resource.data.getElementsByTagName('info').length === 0\n            || resource.data.getElementsByTagName('info')[0].getAttribute('face') === null\n        )\n        {\n            next();\n\n            return;\n        }\n\n        let xmlUrl = !resource.isDataUrl ? BitmapFontLoader.dirname(resource.url) : '';\n\n        if (resource.isDataUrl)\n        {\n            if (xmlUrl === '.')\n            {\n                xmlUrl = '';\n            }\n\n            if (this.baseUrl && xmlUrl)\n            {\n                // if baseurl has a trailing slash then add one to xmlUrl so the replace works below\n                if (this.baseUrl.charAt(this.baseUrl.length - 1) === '/')\n                {\n                    xmlUrl += '/';\n                }\n            }\n        }\n\n        // remove baseUrl from xmlUrl\n        xmlUrl = xmlUrl.replace(this.baseUrl, '');\n\n        // if there is an xmlUrl now, it needs a trailing slash. Ensure that it does if the string isn't empty.\n        if (xmlUrl && xmlUrl.charAt(xmlUrl.length - 1) !== '/')\n        {\n            xmlUrl += '/';\n        }\n\n        const pages = resource.data.getElementsByTagName('page');\n        const textures = {};\n\n        // Handle completed, when the number of textures\n        // load is the same number as references in the fnt file\n        const completed = (page) =>\n        {\n            textures[page.metadata.pageFile] = page.texture;\n\n            if (Object.keys(textures).length === pages.length)\n            {\n                BitmapFontLoader.parse(resource, textures);\n                next();\n            }\n        };\n\n        for (let i = 0; i < pages.length; ++i)\n        {\n            const pageFile = pages[i].getAttribute('file');\n            const url = xmlUrl + pageFile;\n            let exists = false;\n\n            // incase the image is loaded outside\n            // using the same loader, resource will be available\n            for (const name in this.resources)\n            {\n                const bitmapResource = this.resources[name];\n\n                if (bitmapResource.url === url)\n                {\n                    bitmapResource.metadata.pageFile = pageFile;\n                    if (bitmapResource.texture)\n                    {\n                        completed(bitmapResource);\n                    }\n                    else\n                    {\n                        bitmapResource.onAfterMiddleware.add(completed);\n                    }\n                    exists = true;\n                    break;\n                }\n            }\n\n            // texture is not loaded, we'll attempt to add\n            // it to the load and add the texture to the list\n            if (!exists)\n            {\n                // Standard loading options for images\n                const options = {\n                    crossOrigin: resource.crossOrigin,\n                    loadType: LoaderResource.LOAD_TYPE.IMAGE,\n                    metadata: Object.assign(\n                        { pageFile },\n                        resource.metadata.imageMetadata\n                    ),\n                    parentResource: resource,\n                };\n\n                this.add(url, options, completed);\n            }\n        }\n    }\n}\n","import { Filter, defaultVertex } from '@pixi/core';\nimport fragment from './alpha.frag';\n\n/**\n * Simplest filter - applies alpha.\n *\n * Use this instead of Container's alpha property to avoid visual layering of individual elements.\n * AlphaFilter applies alpha evenly across the entire display object and any opaque elements it contains.\n * If elements are not opaque, they will blend with each other anyway.\n *\n * Very handy if you want to use common features of all filters:\n *\n * 1. Assign a blendMode to this filter, blend all elements inside display object with background.\n *\n * 2. To use clipping in display coordinates, assign a filterArea to the same container that has this filter.\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n */\nexport default class AlphaFilter extends Filter\n{\n    /**\n     * @param {number} [alpha=1] Amount of alpha from 0 to 1, where 0 is transparent\n     */\n    constructor(alpha = 1.0)\n    {\n        super(defaultVertex, fragment, { uAlpha: 1 });\n\n        this.alpha = alpha;\n    }\n\n    /**\n     * Coefficient for alpha multiplication\n     *\n     * @member {number}\n     * @default 1\n     */\n    get alpha()\n    {\n        return this.uniforms.uAlpha;\n    }\n\n    set alpha(value) // eslint-disable-line require-jsdoc\n    {\n        this.uniforms.uAlpha = value;\n    }\n}\n","const vertTemplate = `\n    attribute vec2 aVertexPosition;\n\n    uniform mat3 projectionMatrix;\n\n    uniform float strength;\n\n    varying vec2 vBlurTexCoords[%size%];\n\n    uniform vec4 inputSize;\n    uniform vec4 outputFrame;\n    \n    vec4 filterVertexPosition( void )\n    {\n        vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n    \n        return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n    }\n    \n    vec2 filterTextureCoord( void )\n    {\n        return aVertexPosition * (outputFrame.zw * inputSize.zw);\n    }\n\n    void main(void)\n    {\n        gl_Position = filterVertexPosition();\n\n        vec2 textureCoord = filterTextureCoord();\n        %blur%\n    }`;\n\nexport default function generateBlurVertSource(kernelSize, x)\n{\n    const halfLength = Math.ceil(kernelSize / 2);\n\n    let vertSource = vertTemplate;\n\n    let blurLoop = '';\n    let template;\n    // let value;\n\n    if (x)\n    {\n        template = 'vBlurTexCoords[%index%] =  textureCoord + vec2(%sampleIndex% * strength, 0.0);';\n    }\n    else\n    {\n        template = 'vBlurTexCoords[%index%] =  textureCoord + vec2(0.0, %sampleIndex% * strength);';\n    }\n\n    for (let i = 0; i < kernelSize; i++)\n    {\n        let blur = template.replace('%index%', i);\n\n        // value = i;\n\n        // if(i >= halfLength)\n        // {\n        //     value = kernelSize - i - 1;\n        // }\n\n        blur = blur.replace('%sampleIndex%', `${i - (halfLength - 1)}.0`);\n\n        blurLoop += blur;\n        blurLoop += '\\n';\n    }\n\n    vertSource = vertSource.replace('%blur%', blurLoop);\n    vertSource = vertSource.replace('%size%', kernelSize);\n\n    return vertSource;\n}\n","const GAUSSIAN_VALUES = {\n    5: [0.153388, 0.221461, 0.250301],\n    7: [0.071303, 0.131514, 0.189879, 0.214607],\n    9: [0.028532, 0.067234, 0.124009, 0.179044, 0.20236],\n    11: [0.0093, 0.028002, 0.065984, 0.121703, 0.175713, 0.198596],\n    13: [0.002406, 0.009255, 0.027867, 0.065666, 0.121117, 0.174868, 0.197641],\n    15: [0.000489, 0.002403, 0.009246, 0.02784, 0.065602, 0.120999, 0.174697, 0.197448],\n};\n\nconst fragTemplate = [\n    'varying vec2 vBlurTexCoords[%size%];',\n    'uniform sampler2D uSampler;',\n\n    'void main(void)',\n    '{',\n    '    gl_FragColor = vec4(0.0);',\n    '    %blur%',\n    '}',\n\n].join('\\n');\n\nexport default function generateBlurFragSource(kernelSize)\n{\n    const kernel = GAUSSIAN_VALUES[kernelSize];\n    const halfLength = kernel.length;\n\n    let fragSource = fragTemplate;\n\n    let blurLoop = '';\n    const template = 'gl_FragColor += texture2D(uSampler, vBlurTexCoords[%index%]) * %value%;';\n    let value;\n\n    for (let i = 0; i < kernelSize; i++)\n    {\n        let blur = template.replace('%index%', i);\n\n        value = i;\n\n        if (i >= halfLength)\n        {\n            value = kernelSize - i - 1;\n        }\n\n        blur = blur.replace('%value%', kernel[value]);\n\n        blurLoop += blur;\n        blurLoop += '\\n';\n    }\n\n    fragSource = fragSource.replace('%blur%', blurLoop);\n    fragSource = fragSource.replace('%size%', kernelSize);\n\n    return fragSource;\n}\n","import { Filter } from '@pixi/core';\nimport { settings } from '@pixi/settings';\nimport generateBlurVertSource from './generateBlurVertSource';\nimport generateBlurFragSource from './generateBlurFragSource';\n\n/**\n * The BlurFilterPass applies a horizontal or vertical Gaussian blur to an object.\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n */\nexport default class BlurFilterPass extends Filter\n{\n    /**\n     * @param {boolean} horizontal - Do pass along the x-axis (`true`) or y-axis (`false`).\n     * @param {number} strength - The strength of the blur filter.\n     * @param {number} quality - The quality of the blur filter.\n     * @param {number} resolution - The resolution of the blur filter.\n     * @param {number} [kernelSize=5] - The kernelSize of the blur filter.Options: 5, 7, 9, 11, 13, 15.\n     */\n    constructor(horizontal, strength, quality, resolution, kernelSize)\n    {\n        kernelSize = kernelSize || 5;\n        const vertSrc = generateBlurVertSource(kernelSize, horizontal);\n        const fragSrc = generateBlurFragSource(kernelSize);\n\n        super(\n            // vertex shader\n            vertSrc,\n            // fragment shader\n            fragSrc\n        );\n\n        this.horizontal = horizontal;\n\n        this.resolution = resolution || settings.RESOLUTION;\n\n        this._quality = 0;\n\n        this.quality = quality || 4;\n\n        this.blur = strength || 8;\n    }\n\n    apply(filterManager, input, output, clear)\n    {\n        if (output)\n        {\n            if (this.horizontal)\n            {\n                this.uniforms.strength = (1 / output.width) * (output.width / input.width);\n            }\n            else\n            {\n                this.uniforms.strength = (1 / output.height) * (output.height / input.height);\n            }\n        }\n        else\n        {\n            if (this.horizontal) // eslint-disable-line\n            {\n                this.uniforms.strength = (1 / filterManager.renderer.width) * (filterManager.renderer.width / input.width);\n            }\n            else\n            {\n                this.uniforms.strength = (1 / filterManager.renderer.height) * (filterManager.renderer.height / input.height); // eslint-disable-line\n            }\n        }\n\n        // screen space!\n        this.uniforms.strength *= this.strength;\n        this.uniforms.strength /= this.passes;\n\n        if (this.passes === 1)\n        {\n            filterManager.applyFilter(this, input, output, clear);\n        }\n        else\n        {\n            const renderTarget = filterManager.getFilterTexture();\n            const renderer = filterManager.renderer;\n\n            let flip = input;\n            let flop = renderTarget;\n\n            this.state.blend = false;\n            filterManager.applyFilter(this, flip, flop, false);\n\n            for (let i = 1; i < this.passes - 1; i++)\n            {\n                renderer.renderTexture.bind(flip, flip.filterFrame);\n\n                this.uniforms.uSampler = flop;\n\n                const temp = flop;\n\n                flop = flip;\n                flip = temp;\n\n                renderer.shader.bind(this);\n                renderer.geometry.draw(5);\n            }\n\n            this.state.blend = true;\n            filterManager.applyFilter(this, flop, output, clear);\n            filterManager.returnFilterTexture(renderTarget);\n        }\n    }\n    /**\n     * Sets the strength of both the blur.\n     *\n     * @member {number}\n     * @default 16\n     */\n    get blur()\n    {\n        return this.strength;\n    }\n\n    set blur(value) // eslint-disable-line require-jsdoc\n    {\n        this.padding = 1 + (Math.abs(value) * 2);\n        this.strength = value;\n    }\n\n    /**\n     * Sets the quality of the blur by modifying the number of passes. More passes means higher\n     * quaility bluring but the lower the performance.\n     *\n     * @member {number}\n     * @default 4\n     */\n    get quality()\n    {\n        return this._quality;\n    }\n\n    set quality(value) // eslint-disable-line require-jsdoc\n    {\n        this._quality = value;\n        this.passes = value;\n    }\n}\n","import { Filter } from '@pixi/core';\nimport { settings } from '@pixi/settings';\nimport BlurFilterPass from './BlurFilterPass';\n\n/**\n * The BlurFilter applies a Gaussian blur to an object.\n *\n * The strength of the blur can be set for the x-axis and y-axis separately.\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n */\nexport default class BlurFilter extends Filter\n{\n    /**\n     * @param {number} [strength=8] - The strength of the blur filter.\n     * @param {number} [quality=4] - The quality of the blur filter.\n     * @param {number} [resolution] - The resolution of the blur filter.\n     * @param {number} [kernelSize=5] - The kernelSize of the blur filter.Options: 5, 7, 9, 11, 13, 15.\n     */\n    constructor(strength, quality, resolution, kernelSize)\n    {\n        super();\n\n        this.blurXFilter = new BlurFilterPass(true, strength, quality, resolution, kernelSize);\n        this.blurYFilter = new BlurFilterPass(false, strength, quality, resolution, kernelSize);\n\n        this.resolution = resolution || settings.RESOLUTION;\n        this.quality = quality || 4;\n        this.blur = strength || 8;\n\n        this.repeatEdgePixels = false;\n    }\n\n    /**\n     * Applies the filter.\n     *\n     * @param {PIXI.systems.FilterSystem} filterManager - The manager.\n     * @param {PIXI.RenderTexture} input - The input target.\n     * @param {PIXI.RenderTexture} output - The output target.\n     */\n    apply(filterManager, input, output, clear)\n    {\n        const xStrength = Math.abs(this.blurXFilter.strength);\n        const yStrength = Math.abs(this.blurYFilter.strength);\n\n        if (xStrength && yStrength)\n        {\n            const renderTarget = filterManager.getFilterTexture();\n\n            this.blurXFilter.apply(filterManager, input, renderTarget, true);\n            this.blurYFilter.apply(filterManager, renderTarget, output, clear);\n\n            filterManager.returnFilterTexture(renderTarget);\n        }\n        else if (yStrength)\n        {\n            this.blurYFilter.apply(filterManager, input, output, clear);\n        }\n        else\n        {\n            this.blurXFilter.apply(filterManager, input, output, clear);\n        }\n    }\n\n    updatePadding()\n    {\n        if (this._repeatEdgePixels)\n        {\n            this.padding = 0;\n        }\n        else\n        {\n            this.padding = Math.max(Math.abs(this.blurXFilter.strength), Math.abs(this.blurYFilter.strength)) * 2;\n        }\n    }\n\n    /**\n     * Sets the strength of both the blurX and blurY properties simultaneously\n     *\n     * @member {number}\n     * @default 2\n     */\n    get blur()\n    {\n        return this.blurXFilter.blur;\n    }\n\n    set blur(value) // eslint-disable-line require-jsdoc\n    {\n        this.blurXFilter.blur = this.blurYFilter.blur = value;\n        this.updatePadding();\n    }\n\n    /**\n     * Sets the number of passes for blur. More passes means higher quaility bluring.\n     *\n     * @member {number}\n     * @default 1\n     */\n    get quality()\n    {\n        return this.blurXFilter.quality;\n    }\n\n    set quality(value) // eslint-disable-line require-jsdoc\n    {\n        this.blurXFilter.quality = this.blurYFilter.quality = value;\n    }\n\n    /**\n     * Sets the strength of the blurX property\n     *\n     * @member {number}\n     * @default 2\n     */\n    get blurX()\n    {\n        return this.blurXFilter.blur;\n    }\n\n    set blurX(value) // eslint-disable-line require-jsdoc\n    {\n        this.blurXFilter.blur = value;\n        this.updatePadding();\n    }\n\n    /**\n     * Sets the strength of the blurY property\n     *\n     * @member {number}\n     * @default 2\n     */\n    get blurY()\n    {\n        return this.blurYFilter.blur;\n    }\n\n    set blurY(value) // eslint-disable-line require-jsdoc\n    {\n        this.blurYFilter.blur = value;\n        this.updatePadding();\n    }\n\n    /**\n     * Sets the blendmode of the filter\n     *\n     * @member {number}\n     * @default PIXI.BLEND_MODES.NORMAL\n     */\n    get blendMode()\n    {\n        return this.blurYFilter.blendMode;\n    }\n\n    set blendMode(value) // eslint-disable-line require-jsdoc\n    {\n        this.blurYFilter.blendMode = value;\n    }\n\n    /**\n     * If set to true the edge of the target will be clamped\n     *\n     * @member {bool}\n     * @default false\n     */\n    get repeatEdgePixels()\n    {\n        return this._repeatEdgePixels;\n    }\n\n    set repeatEdgePixels(value)\n    {\n        this._repeatEdgePixels = value;\n        this.updatePadding();\n    }\n}\n","import { Filter, defaultFilterVertex } from '@pixi/core';\nimport fragment from './colorMatrix.frag';\n\n/**\n * The ColorMatrixFilter class lets you apply a 5x4 matrix transformation on the RGBA\n * color and alpha values of every pixel on your displayObject to produce a result\n * with a new set of RGBA color and alpha values. It's pretty powerful!\n *\n * ```js\n *  let colorMatrix = new PIXI.filters.ColorMatrixFilter();\n *  container.filters = [colorMatrix];\n *  colorMatrix.contrast(2);\n * ```\n * @author Clément Chenebault <clement@goodboydigital.com>\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n */\nexport default class ColorMatrixFilter extends Filter\n{\n    constructor()\n    {\n        const uniforms = {\n            m: new Float32Array([1, 0, 0, 0, 0,\n                0, 1, 0, 0, 0,\n                0, 0, 1, 0, 0,\n                0, 0, 0, 1, 0]),\n            uAlpha: 1,\n        };\n\n        super(defaultFilterVertex, fragment, uniforms);\n\n        this.alpha = 1;\n    }\n\n    /**\n     * Transforms current matrix and set the new one\n     *\n     * @param {number[]} matrix - 5x4 matrix\n     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n     *  just set the current matrix with @param matrix\n     */\n    _loadMatrix(matrix, multiply = false)\n    {\n        let newMatrix = matrix;\n\n        if (multiply)\n        {\n            this._multiply(newMatrix, this.uniforms.m, matrix);\n            newMatrix = this._colorMatrix(newMatrix);\n        }\n\n        // set the new matrix\n        this.uniforms.m = newMatrix;\n    }\n\n    /**\n     * Multiplies two mat5's\n     *\n     * @private\n     * @param {number[]} out - 5x4 matrix the receiving matrix\n     * @param {number[]} a - 5x4 matrix the first operand\n     * @param {number[]} b - 5x4 matrix the second operand\n     * @returns {number[]} 5x4 matrix\n     */\n    _multiply(out, a, b)\n    {\n        // Red Channel\n        out[0] = (a[0] * b[0]) + (a[1] * b[5]) + (a[2] * b[10]) + (a[3] * b[15]);\n        out[1] = (a[0] * b[1]) + (a[1] * b[6]) + (a[2] * b[11]) + (a[3] * b[16]);\n        out[2] = (a[0] * b[2]) + (a[1] * b[7]) + (a[2] * b[12]) + (a[3] * b[17]);\n        out[3] = (a[0] * b[3]) + (a[1] * b[8]) + (a[2] * b[13]) + (a[3] * b[18]);\n        out[4] = (a[0] * b[4]) + (a[1] * b[9]) + (a[2] * b[14]) + (a[3] * b[19]) + a[4];\n\n        // Green Channel\n        out[5] = (a[5] * b[0]) + (a[6] * b[5]) + (a[7] * b[10]) + (a[8] * b[15]);\n        out[6] = (a[5] * b[1]) + (a[6] * b[6]) + (a[7] * b[11]) + (a[8] * b[16]);\n        out[7] = (a[5] * b[2]) + (a[6] * b[7]) + (a[7] * b[12]) + (a[8] * b[17]);\n        out[8] = (a[5] * b[3]) + (a[6] * b[8]) + (a[7] * b[13]) + (a[8] * b[18]);\n        out[9] = (a[5] * b[4]) + (a[6] * b[9]) + (a[7] * b[14]) + (a[8] * b[19]) + a[9];\n\n        // Blue Channel\n        out[10] = (a[10] * b[0]) + (a[11] * b[5]) + (a[12] * b[10]) + (a[13] * b[15]);\n        out[11] = (a[10] * b[1]) + (a[11] * b[6]) + (a[12] * b[11]) + (a[13] * b[16]);\n        out[12] = (a[10] * b[2]) + (a[11] * b[7]) + (a[12] * b[12]) + (a[13] * b[17]);\n        out[13] = (a[10] * b[3]) + (a[11] * b[8]) + (a[12] * b[13]) + (a[13] * b[18]);\n        out[14] = (a[10] * b[4]) + (a[11] * b[9]) + (a[12] * b[14]) + (a[13] * b[19]) + a[14];\n\n        // Alpha Channel\n        out[15] = (a[15] * b[0]) + (a[16] * b[5]) + (a[17] * b[10]) + (a[18] * b[15]);\n        out[16] = (a[15] * b[1]) + (a[16] * b[6]) + (a[17] * b[11]) + (a[18] * b[16]);\n        out[17] = (a[15] * b[2]) + (a[16] * b[7]) + (a[17] * b[12]) + (a[18] * b[17]);\n        out[18] = (a[15] * b[3]) + (a[16] * b[8]) + (a[17] * b[13]) + (a[18] * b[18]);\n        out[19] = (a[15] * b[4]) + (a[16] * b[9]) + (a[17] * b[14]) + (a[18] * b[19]) + a[19];\n\n        return out;\n    }\n\n    /**\n     * Create a Float32 Array and normalize the offset component to 0-1\n     *\n     * @private\n     * @param {number[]} matrix - 5x4 matrix\n     * @return {number[]} 5x4 matrix with all values between 0-1\n     */\n    _colorMatrix(matrix)\n    {\n        // Create a Float32 Array and normalize the offset component to 0-1\n        const m = new Float32Array(matrix);\n\n        m[4] /= 255;\n        m[9] /= 255;\n        m[14] /= 255;\n        m[19] /= 255;\n\n        return m;\n    }\n\n    /**\n     * Adjusts brightness\n     *\n     * @param {number} b - value of the brigthness (0-1, where 0 is black)\n     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n     *  just set the current matrix with @param matrix\n     */\n    brightness(b, multiply)\n    {\n        const matrix = [\n            b, 0, 0, 0, 0,\n            0, b, 0, 0, 0,\n            0, 0, b, 0, 0,\n            0, 0, 0, 1, 0,\n        ];\n\n        this._loadMatrix(matrix, multiply);\n    }\n\n    /**\n     * Set the matrices in grey scales\n     *\n     * @param {number} scale - value of the grey (0-1, where 0 is black)\n     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n     *  just set the current matrix with @param matrix\n     */\n    greyscale(scale, multiply)\n    {\n        const matrix = [\n            scale, scale, scale, 0, 0,\n            scale, scale, scale, 0, 0,\n            scale, scale, scale, 0, 0,\n            0, 0, 0, 1, 0,\n        ];\n\n        this._loadMatrix(matrix, multiply);\n    }\n\n    /**\n     * Set the black and white matrice.\n     *\n     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n     *  just set the current matrix with @param matrix\n     */\n    blackAndWhite(multiply)\n    {\n        const matrix = [\n            0.3, 0.6, 0.1, 0, 0,\n            0.3, 0.6, 0.1, 0, 0,\n            0.3, 0.6, 0.1, 0, 0,\n            0, 0, 0, 1, 0,\n        ];\n\n        this._loadMatrix(matrix, multiply);\n    }\n\n    /**\n     * Set the hue property of the color\n     *\n     * @param {number} rotation - in degrees\n     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n     *  just set the current matrix with @param matrix\n     */\n    hue(rotation, multiply)\n    {\n        rotation = (rotation || 0) / 180 * Math.PI;\n\n        const cosR = Math.cos(rotation);\n        const sinR = Math.sin(rotation);\n        const sqrt = Math.sqrt;\n\n        /* a good approximation for hue rotation\n         This matrix is far better than the versions with magic luminance constants\n         formerly used here, but also used in the starling framework (flash) and known from this\n         old part of the internet: quasimondo.com/archives/000565.php\n\n         This new matrix is based on rgb cube rotation in space. Look here for a more descriptive\n         implementation as a shader not a general matrix:\n         https://github.com/evanw/glfx.js/blob/58841c23919bd59787effc0333a4897b43835412/src/filters/adjust/huesaturation.js\n\n         This is the source for the code:\n         see http://stackoverflow.com/questions/8507885/shift-hue-of-an-rgb-color/8510751#8510751\n         */\n\n        const w = 1 / 3;\n        const sqrW = sqrt(w); // weight is\n\n        const a00 = cosR + ((1.0 - cosR) * w);\n        const a01 = (w * (1.0 - cosR)) - (sqrW * sinR);\n        const a02 = (w * (1.0 - cosR)) + (sqrW * sinR);\n\n        const a10 = (w * (1.0 - cosR)) + (sqrW * sinR);\n        const a11 = cosR + (w * (1.0 - cosR));\n        const a12 = (w * (1.0 - cosR)) - (sqrW * sinR);\n\n        const a20 = (w * (1.0 - cosR)) - (sqrW * sinR);\n        const a21 = (w * (1.0 - cosR)) + (sqrW * sinR);\n        const a22 = cosR + (w * (1.0 - cosR));\n\n        const matrix = [\n            a00, a01, a02, 0, 0,\n            a10, a11, a12, 0, 0,\n            a20, a21, a22, 0, 0,\n            0, 0, 0, 1, 0,\n        ];\n\n        this._loadMatrix(matrix, multiply);\n    }\n\n    /**\n     * Set the contrast matrix, increase the separation between dark and bright\n     * Increase contrast : shadows darker and highlights brighter\n     * Decrease contrast : bring the shadows up and the highlights down\n     *\n     * @param {number} amount - value of the contrast (0-1)\n     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n     *  just set the current matrix with @param matrix\n     */\n    contrast(amount, multiply)\n    {\n        const v = (amount || 0) + 1;\n        const o = -0.5 * (v - 1);\n\n        const matrix = [\n            v, 0, 0, 0, o,\n            0, v, 0, 0, o,\n            0, 0, v, 0, o,\n            0, 0, 0, 1, 0,\n        ];\n\n        this._loadMatrix(matrix, multiply);\n    }\n\n    /**\n     * Set the saturation matrix, increase the separation between colors\n     * Increase saturation : increase contrast, brightness, and sharpness\n     *\n     * @param {number} amount - The saturation amount (0-1)\n     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n     *  just set the current matrix with @param matrix\n     */\n    saturate(amount = 0, multiply)\n    {\n        const x = (amount * 2 / 3) + 1;\n        const y = ((x - 1) * -0.5);\n\n        const matrix = [\n            x, y, y, 0, 0,\n            y, x, y, 0, 0,\n            y, y, x, 0, 0,\n            0, 0, 0, 1, 0,\n        ];\n\n        this._loadMatrix(matrix, multiply);\n    }\n\n    /**\n     * Desaturate image (remove color)\n     *\n     * Call the saturate function\n     *\n     */\n    desaturate() // eslint-disable-line no-unused-vars\n    {\n        this.saturate(-1);\n    }\n\n    /**\n     * Negative image (inverse of classic rgb matrix)\n     *\n     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n     *  just set the current matrix with @param matrix\n     */\n    negative(multiply)\n    {\n        const matrix = [\n            -1, 0, 0, 1, 0,\n            0, -1, 0, 1, 0,\n            0, 0, -1, 1, 0,\n            0, 0, 0, 1, 0,\n        ];\n\n        this._loadMatrix(matrix, multiply);\n    }\n\n    /**\n     * Sepia image\n     *\n     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n     *  just set the current matrix with @param matrix\n     */\n    sepia(multiply)\n    {\n        const matrix = [\n            0.393, 0.7689999, 0.18899999, 0, 0,\n            0.349, 0.6859999, 0.16799999, 0, 0,\n            0.272, 0.5339999, 0.13099999, 0, 0,\n            0, 0, 0, 1, 0,\n        ];\n\n        this._loadMatrix(matrix, multiply);\n    }\n\n    /**\n     * Color motion picture process invented in 1916 (thanks Dominic Szablewski)\n     *\n     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n     *  just set the current matrix with @param matrix\n     */\n    technicolor(multiply)\n    {\n        const matrix = [\n            1.9125277891456083, -0.8545344976951645, -0.09155508482755585, 0, 11.793603434377337,\n            -0.3087833385928097, 1.7658908555458428, -0.10601743074722245, 0, -70.35205161461398,\n            -0.231103377548616, -0.7501899197440212, 1.847597816108189, 0, 30.950940869491138,\n            0, 0, 0, 1, 0,\n        ];\n\n        this._loadMatrix(matrix, multiply);\n    }\n\n    /**\n     * Polaroid filter\n     *\n     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n     *  just set the current matrix with @param matrix\n     */\n    polaroid(multiply)\n    {\n        const matrix = [\n            1.438, -0.062, -0.062, 0, 0,\n            -0.122, 1.378, -0.122, 0, 0,\n            -0.016, -0.016, 1.483, 0, 0,\n            0, 0, 0, 1, 0,\n        ];\n\n        this._loadMatrix(matrix, multiply);\n    }\n\n    /**\n     * Filter who transforms : Red -> Blue and Blue -> Red\n     *\n     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n     *  just set the current matrix with @param matrix\n     */\n    toBGR(multiply)\n    {\n        const matrix = [\n            0, 0, 1, 0, 0,\n            0, 1, 0, 0, 0,\n            1, 0, 0, 0, 0,\n            0, 0, 0, 1, 0,\n        ];\n\n        this._loadMatrix(matrix, multiply);\n    }\n\n    /**\n     * Color reversal film introduced by Eastman Kodak in 1935. (thanks Dominic Szablewski)\n     *\n     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n     *  just set the current matrix with @param matrix\n     */\n    kodachrome(multiply)\n    {\n        const matrix = [\n            1.1285582396593525, -0.3967382283601348, -0.03992559172921793, 0, 63.72958762196502,\n            -0.16404339962244616, 1.0835251566291304, -0.05498805115633132, 0, 24.732407896706203,\n            -0.16786010706155763, -0.5603416277695248, 1.6014850761964943, 0, 35.62982807460946,\n            0, 0, 0, 1, 0,\n        ];\n\n        this._loadMatrix(matrix, multiply);\n    }\n\n    /**\n     * Brown delicious browni filter (thanks Dominic Szablewski)\n     *\n     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n     *  just set the current matrix with @param matrix\n     */\n    browni(multiply)\n    {\n        const matrix = [\n            0.5997023498159715, 0.34553243048391263, -0.2708298674538042, 0, 47.43192855600873,\n            -0.037703249837783157, 0.8609577587992641, 0.15059552388459913, 0, -36.96841498319127,\n            0.24113635128153335, -0.07441037908422492, 0.44972182064877153, 0, -7.562075277591283,\n            0, 0, 0, 1, 0,\n        ];\n\n        this._loadMatrix(matrix, multiply);\n    }\n\n    /**\n     * Vintage filter (thanks Dominic Szablewski)\n     *\n     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n     *  just set the current matrix with @param matrix\n     */\n    vintage(multiply)\n    {\n        const matrix = [\n            0.6279345635605994, 0.3202183420819367, -0.03965408211312453, 0, 9.651285835294123,\n            0.02578397704808868, 0.6441188644374771, 0.03259127616149294, 0, 7.462829176470591,\n            0.0466055556782719, -0.0851232987247891, 0.5241648018700465, 0, 5.159190588235296,\n            0, 0, 0, 1, 0,\n        ];\n\n        this._loadMatrix(matrix, multiply);\n    }\n\n    /**\n     * We don't know exactly what it does, kind of gradient map, but funny to play with!\n     *\n     * @param {number} desaturation - Tone values.\n     * @param {number} toned - Tone values.\n     * @param {string} lightColor - Tone values, example: `0xFFE580`\n     * @param {string} darkColor - Tone values, example: `0xFFE580`\n     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n     *  just set the current matrix with @param matrix\n     */\n    colorTone(desaturation, toned, lightColor, darkColor, multiply)\n    {\n        desaturation = desaturation || 0.2;\n        toned = toned || 0.15;\n        lightColor = lightColor || 0xFFE580;\n        darkColor = darkColor || 0x338000;\n\n        const lR = ((lightColor >> 16) & 0xFF) / 255;\n        const lG = ((lightColor >> 8) & 0xFF) / 255;\n        const lB = (lightColor & 0xFF) / 255;\n\n        const dR = ((darkColor >> 16) & 0xFF) / 255;\n        const dG = ((darkColor >> 8) & 0xFF) / 255;\n        const dB = (darkColor & 0xFF) / 255;\n\n        const matrix = [\n            0.3, 0.59, 0.11, 0, 0,\n            lR, lG, lB, desaturation, 0,\n            dR, dG, dB, toned, 0,\n            lR - dR, lG - dG, lB - dB, 0, 0,\n        ];\n\n        this._loadMatrix(matrix, multiply);\n    }\n\n    /**\n     * Night effect\n     *\n     * @param {number} intensity - The intensity of the night effect.\n     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n     *  just set the current matrix with @param matrix\n     */\n    night(intensity, multiply)\n    {\n        intensity = intensity || 0.1;\n        const matrix = [\n            intensity * (-2.0), -intensity, 0, 0, 0,\n            -intensity, 0, intensity, 0, 0,\n            0, intensity, intensity * 2.0, 0, 0,\n            0, 0, 0, 1, 0,\n        ];\n\n        this._loadMatrix(matrix, multiply);\n    }\n\n    /**\n     * Predator effect\n     *\n     * Erase the current matrix by setting a new indepent one\n     *\n     * @param {number} amount - how much the predator feels his future victim\n     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n     *  just set the current matrix with @param matrix\n     */\n    predator(amount, multiply)\n    {\n        const matrix = [\n            // row 1\n            11.224130630493164 * amount,\n            -4.794486999511719 * amount,\n            -2.8746118545532227 * amount,\n            0 * amount,\n            0.40342438220977783 * amount,\n            // row 2\n            -3.6330697536468506 * amount,\n            9.193157196044922 * amount,\n            -2.951810836791992 * amount,\n            0 * amount,\n            -1.316135048866272 * amount,\n            // row 3\n            -3.2184197902679443 * amount,\n            -4.2375030517578125 * amount,\n            7.476448059082031 * amount,\n            0 * amount,\n            0.8044459223747253 * amount,\n            // row 4\n            0, 0, 0, 1, 0,\n        ];\n\n        this._loadMatrix(matrix, multiply);\n    }\n\n    /**\n     * LSD effect\n     *\n     * Multiply the current matrix\n     *\n     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n     *  just set the current matrix with @param matrix\n     */\n    lsd(multiply)\n    {\n        const matrix = [\n            2, -0.4, 0.5, 0, 0,\n            -0.5, 2, -0.4, 0, 0,\n            -0.4, -0.5, 3, 0, 0,\n            0, 0, 0, 1, 0,\n        ];\n\n        this._loadMatrix(matrix, multiply);\n    }\n\n    /**\n     * Erase the current matrix by setting the default one\n     *\n     */\n    reset()\n    {\n        const matrix = [\n            1, 0, 0, 0, 0,\n            0, 1, 0, 0, 0,\n            0, 0, 1, 0, 0,\n            0, 0, 0, 1, 0,\n        ];\n\n        this._loadMatrix(matrix, false);\n    }\n\n    /**\n     * The matrix of the color matrix filter\n     *\n     * @member {number[]}\n     * @default [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0]\n     */\n    get matrix()\n    {\n        return this.uniforms.m;\n    }\n\n    set matrix(value) // eslint-disable-line require-jsdoc\n    {\n        this.uniforms.m = value;\n    }\n\n    /**\n     * The opacity value to use when mixing the original and resultant colors.\n     *\n     * When the value is 0, the original color is used without modification.\n     * When the value is 1, the result color is used.\n     * When in the range (0, 1) the color is interpolated between the original and result by this amount.\n     *\n     * @member {number}\n     * @default 1\n     */\n    get alpha()\n    {\n        return this.uniforms.uAlpha;\n    }\n\n    set alpha(value) // eslint-disable-line require-jsdoc\n    {\n        this.uniforms.uAlpha = value;\n    }\n}\n\n// Americanized alias\nColorMatrixFilter.prototype.grayscale = ColorMatrixFilter.prototype.greyscale;\n","import { Filter } from '@pixi/core';\nimport { Matrix, Point } from '@pixi/math';\nimport vertex from './displacement.vert';\nimport fragment from './displacement.frag';\n\n/**\n * The DisplacementFilter class uses the pixel values from the specified texture\n * (called the displacement map) to perform a displacement of an object.\n *\n * You can use this filter to apply all manor of crazy warping effects.\n * Currently the `r` property of the texture is used to offset the `x`\n * and the `g` property of the texture is used to offset the `y`.\n *\n * The way it works is it uses the values of the displacement map to look up the\n * correct pixels to output. This means it's not technically moving the original.\n * Instead, it's starting at the output and asking \"which pixel from the original goes here\".\n * For example, if a displacement map pixel has `red = 1` and the filter scale is `20`,\n * this filter will output the pixel approximately 20 pixels to the right of the original.\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n */\nexport default class DisplacementFilter extends Filter\n{\n    /**\n     * @param {PIXI.Sprite} sprite - The sprite used for the displacement map. (make sure its added to the scene!)\n     * @param {number} [scale] - The scale of the displacement\n     */\n    constructor(sprite, scale)\n    {\n        const maskMatrix = new Matrix();\n\n        sprite.renderable = false;\n\n        super(vertex, fragment, {\n            mapSampler: sprite._texture,\n            filterMatrix: maskMatrix,\n            scale: { x: 1, y: 1 },\n            rotation: new Float32Array([1, 0, 0, 1]),\n        });\n\n        this.maskSprite = sprite;\n        this.maskMatrix = maskMatrix;\n\n        if (scale === null || scale === undefined)\n        {\n            scale = 20;\n        }\n\n        /**\n         * scaleX, scaleY for displacements\n         * @member {PIXI.Point}\n         */\n        this.scale = new Point(scale, scale);\n    }\n\n    /**\n     * Applies the filter.\n     *\n     * @param {PIXI.systems.FilterSystem} filterManager - The manager.\n     * @param {PIXI.RenderTexture} input - The input target.\n     * @param {PIXI.RenderTexture} output - The output target.\n     * @param {boolean} clear - Should the output be cleared before rendering to it.\n     */\n    apply(filterManager, input, output, clear)\n    {\n        // fill maskMatrix with _normalized sprite texture coords_\n        this.uniforms.filterMatrix = filterManager.calculateSpriteMatrix(this.maskMatrix, this.maskSprite);\n        this.uniforms.scale.x = this.scale.x;\n        this.uniforms.scale.y = this.scale.y;\n\n        // Extract rotation from world transform\n        const wt = this.maskSprite.transform.worldTransform;\n        const lenX = Math.sqrt((wt.a * wt.a) + (wt.b * wt.b));\n        const lenY = Math.sqrt((wt.c * wt.c) + (wt.d * wt.d));\n\n        if (lenX !== 0 && lenY !== 0)\n        {\n            this.uniforms.rotation[0] = wt.a / lenX;\n            this.uniforms.rotation[1] = wt.b / lenX;\n            this.uniforms.rotation[2] = wt.c / lenY;\n            this.uniforms.rotation[3] = wt.d / lenY;\n        }\n\n        // draw the filter...\n        filterManager.applyFilter(this, input, output, clear);\n    }\n\n    /**\n     * The texture used for the displacement map. Must be power of 2 sized texture.\n     *\n     * @member {PIXI.Texture}\n     */\n    get map()\n    {\n        return this.uniforms.mapSampler;\n    }\n\n    set map(value) // eslint-disable-line require-jsdoc\n    {\n        this.uniforms.mapSampler = value;\n    }\n}\n","import { Filter } from '@pixi/core';\nimport vertex from './fxaa.vert';\nimport fragment from './fxaa.frag';\n\n/**\n * Basic FXAA (Fast Approximate Anti-Aliasing) implementation based on the code on geeks3d.com\n * with the modification that the texture2DLod stuff was removed since it is unsupported by WebGL.\n *\n * @see https://github.com/mitsuhiko/webgl-meincraft\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n *\n */\nexport default class FXAAFilter extends Filter\n{\n    constructor()\n    {\n        // TODO - needs work\n        super(vertex, fragment);\n    }\n}\n","import { Filter, defaultFilterVertex } from '@pixi/core';\nimport fragment from './noise.frag';\n\n/**\n * @author Vico @vicocotea\n * original filter: https://github.com/evanw/glfx.js/blob/master/src/filters/adjust/noise.js\n */\n\n/**\n * A Noise effect filter.\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n */\nexport default class NoiseFilter extends Filter\n{\n    /**\n     * @param {number} [noise=0.5] - The noise intensity, should be a normalized value in the range [0, 1].\n     * @param {number} [seed] - A random seed for the noise generation. Default is `Math.random()`.\n     */\n    constructor(noise = 0.5, seed = Math.random())\n    {\n        super(defaultFilterVertex, fragment, {\n            uNoise: 0,\n            uSeed: 0,\n        });\n\n        this.noise = noise;\n        this.seed = seed;\n    }\n\n    /**\n     * The amount of noise to apply, this value should be in the range (0, 1].\n     *\n     * @member {number}\n     * @default 0.5\n     */\n    get noise()\n    {\n        return this.uniforms.uNoise;\n    }\n\n    set noise(value) // eslint-disable-line require-jsdoc\n    {\n        this.uniforms.uNoise = value;\n    }\n\n    /**\n     * A seed value to apply to the random noise generation. `Math.random()` is a good value to use.\n     *\n     * @member {number}\n     */\n    get seed()\n    {\n        return this.uniforms.uSeed;\n    }\n\n    set seed(value) // eslint-disable-line require-jsdoc\n    {\n        this.uniforms.uSeed = value;\n    }\n}\n","import { Texture, BaseTexture, RenderTexture } from '@pixi/core';\nimport { Sprite } from '@pixi/sprite';\nimport { DisplayObject } from '@pixi/display';\nimport { Matrix } from '@pixi/math';\nimport { uid } from '@pixi/utils';\nimport { settings } from '@pixi/settings';\n\nconst _tempMatrix = new Matrix();\n\nDisplayObject.prototype._cacheAsBitmap = false;\nDisplayObject.prototype._cacheData = false;\n\n// figured theres no point adding ALL the extra variables to prototype.\n// this model can hold the information needed. This can also be generated on demand as\n// most objects are not cached as bitmaps.\n/**\n * @class\n * @ignore\n */\nclass CacheData\n{\n    constructor()\n    {\n        this.textureCacheId = null;\n\n        this.originalRender = null;\n        this.originalRenderCanvas = null;\n        this.originalCalculateBounds = null;\n        this.originalGetLocalBounds = null;\n\n        this.originalUpdateTransform = null;\n        this.originalHitTest = null;\n        this.originalDestroy = null;\n        this.originalMask = null;\n        this.originalFilterArea = null;\n        this.sprite = null;\n    }\n}\n\nObject.defineProperties(DisplayObject.prototype, {\n    /**\n     * Set this to true if you want this display object to be cached as a bitmap.\n     * This basically takes a snap shot of the display object as it is at that moment. It can\n     * provide a performance benefit for complex static displayObjects.\n     * To remove simply set this property to `false`\n     *\n     * IMPORTANT GOTCHA - Make sure that all your textures are preloaded BEFORE setting this property to true\n     * as it will take a snapshot of what is currently there. If the textures have not loaded then they will not appear.\n     *\n     * @member {boolean}\n     * @memberof PIXI.DisplayObject#\n     */\n    cacheAsBitmap: {\n        get()\n        {\n            return this._cacheAsBitmap;\n        },\n        set(value)\n        {\n            if (this._cacheAsBitmap === value)\n            {\n                return;\n            }\n\n            this._cacheAsBitmap = value;\n\n            let data;\n\n            if (value)\n            {\n                if (!this._cacheData)\n                {\n                    this._cacheData = new CacheData();\n                }\n\n                data = this._cacheData;\n\n                data.originalRender = this.render;\n                data.originalRenderCanvas = this.renderCanvas;\n\n                data.originalUpdateTransform = this.updateTransform;\n                data.originalCalculateBounds = this.calculateBounds;\n                data.originalGetLocalBounds = this.getLocalBounds;\n\n                data.originalDestroy = this.destroy;\n\n                data.originalContainsPoint = this.containsPoint;\n\n                data.originalMask = this._mask;\n                data.originalFilterArea = this.filterArea;\n\n                this.render = this._renderCached;\n                this.renderCanvas = this._renderCachedCanvas;\n\n                this.destroy = this._cacheAsBitmapDestroy;\n            }\n            else\n            {\n                data = this._cacheData;\n\n                if (data.sprite)\n                {\n                    this._destroyCachedDisplayObject();\n                }\n\n                this.render = data.originalRender;\n                this.renderCanvas = data.originalRenderCanvas;\n                this.calculateBounds = data.originalCalculateBounds;\n                this.getLocalBounds = data.originalGetLocalBounds;\n\n                this.destroy = data.originalDestroy;\n\n                this.updateTransform = data.originalUpdateTransform;\n                this.containsPoint = data.originalContainsPoint;\n\n                this._mask = data.originalMask;\n                this.filterArea = data.originalFilterArea;\n            }\n        },\n    },\n});\n\n/**\n * Renders a cached version of the sprite with WebGL\n *\n * @private\n * @function _renderCached\n * @memberof PIXI.DisplayObject#\n * @param {PIXI.Renderer} renderer - the WebGL renderer\n */\nDisplayObject.prototype._renderCached = function _renderCached(renderer)\n{\n    if (!this.visible || this.worldAlpha <= 0 || !this.renderable)\n    {\n        return;\n    }\n\n    this._initCachedDisplayObject(renderer);\n\n    this._cacheData.sprite.transform._worldID = this.transform._worldID;\n    this._cacheData.sprite.worldAlpha = this.worldAlpha;\n    this._cacheData.sprite._render(renderer);\n};\n\n/**\n * Prepares the WebGL renderer to cache the sprite\n *\n * @private\n * @function _initCachedDisplayObject\n * @memberof PIXI.DisplayObject#\n * @param {PIXI.Renderer} renderer - the WebGL renderer\n */\nDisplayObject.prototype._initCachedDisplayObject = function _initCachedDisplayObject(renderer)\n{\n    if (this._cacheData && this._cacheData.sprite)\n    {\n        return;\n    }\n\n    // make sure alpha is set to 1 otherwise it will get rendered as invisible!\n    const cacheAlpha = this.alpha;\n\n    this.alpha = 1;\n\n    // first we flush anything left in the renderer (otherwise it would get rendered to the cached texture)\n    renderer.batch.flush();\n    // this.filters= [];\n\n    // next we find the dimensions of the untransformed object\n    // this function also calls updatetransform on all its children as part of the measuring.\n    // This means we don't need to update the transform again in this function\n    // TODO pass an object to clone too? saves having to create a new one each time!\n    const bounds = this.getLocalBounds().clone();\n\n    // add some padding!\n    if (this.filters)\n    {\n        const padding = this.filters[0].padding;\n\n        bounds.pad(padding);\n    }\n\n    bounds.ceil(settings.RESOLUTION);\n\n    // for now we cache the current renderTarget that the WebGL renderer is currently using.\n    // this could be more elegant..\n    const cachedRenderTexture = renderer.renderTexture.current;\n    const cachedSourceFrame = renderer.renderTexture.sourceFrame;\n    const cachedProjectionTransform = renderer.projection.transform;\n\n    // We also store the filter stack - I will definitely look to change how this works a little later down the line.\n    // const stack = renderer.filterManager.filterStack;\n\n    // this renderTexture will be used to store the cached DisplayObject\n    const renderTexture = RenderTexture.create(bounds.width, bounds.height);\n\n    const textureCacheId = `cacheAsBitmap_${uid()}`;\n\n    this._cacheData.textureCacheId = textureCacheId;\n\n    BaseTexture.addToCache(renderTexture.baseTexture, textureCacheId);\n    Texture.addToCache(renderTexture, textureCacheId);\n\n    // need to set //\n    const m = _tempMatrix;\n\n    m.tx = -bounds.x;\n    m.ty = -bounds.y;\n\n    // reset\n    this.transform.worldTransform.identity();\n\n    // set all properties to there original so we can render to a texture\n    this.render = this._cacheData.originalRender;\n\n    renderer.render(this, renderTexture, true, m, true);\n\n    // now restore the state be setting the new properties\n    renderer.projection.transform = cachedProjectionTransform;\n    renderer.renderTexture.bind(cachedRenderTexture, cachedSourceFrame);\n\n    // renderer.filterManager.filterStack = stack;\n\n    this.render = this._renderCached;\n    // the rest is the same as for Canvas\n    this.updateTransform = this.displayObjectUpdateTransform;\n    this.calculateBounds = this._calculateCachedBounds;\n    this.getLocalBounds = this._getCachedLocalBounds;\n\n    this._mask = null;\n    this.filterArea = null;\n\n    // create our cached sprite\n    const cachedSprite = new Sprite(renderTexture);\n\n    cachedSprite.transform.worldTransform = this.transform.worldTransform;\n    cachedSprite.anchor.x = -(bounds.x / bounds.width);\n    cachedSprite.anchor.y = -(bounds.y / bounds.height);\n    cachedSprite.alpha = cacheAlpha;\n    cachedSprite._bounds = this._bounds;\n\n    this._cacheData.sprite = cachedSprite;\n\n    this.transform._parentID = -1;\n    // restore the transform of the cached sprite to avoid the nasty flicker..\n    if (!this.parent)\n    {\n        this.parent = renderer._tempDisplayObjectParent;\n        this.updateTransform();\n        this.parent = null;\n    }\n    else\n    {\n        this.updateTransform();\n    }\n\n    // map the hit test..\n    this.containsPoint = cachedSprite.containsPoint.bind(cachedSprite);\n};\n\n/**\n * Renders a cached version of the sprite with canvas\n *\n * @private\n * @function _renderCachedCanvas\n * @memberof PIXI.DisplayObject#\n * @param {PIXI.Renderer} renderer - the WebGL renderer\n */\nDisplayObject.prototype._renderCachedCanvas = function _renderCachedCanvas(renderer)\n{\n    if (!this.visible || this.worldAlpha <= 0 || !this.renderable)\n    {\n        return;\n    }\n\n    this._initCachedDisplayObjectCanvas(renderer);\n\n    this._cacheData.sprite.worldAlpha = this.worldAlpha;\n    this._cacheData.sprite._renderCanvas(renderer);\n};\n\n// TODO this can be the same as the WebGL version.. will need to do a little tweaking first though..\n/**\n * Prepares the Canvas renderer to cache the sprite\n *\n * @private\n * @function _initCachedDisplayObjectCanvas\n * @memberof PIXI.DisplayObject#\n * @param {PIXI.Renderer} renderer - the WebGL renderer\n */\nDisplayObject.prototype._initCachedDisplayObjectCanvas = function _initCachedDisplayObjectCanvas(renderer)\n{\n    if (this._cacheData && this._cacheData.sprite)\n    {\n        return;\n    }\n\n    // get bounds actually transforms the object for us already!\n    const bounds = this.getLocalBounds();\n\n    const cacheAlpha = this.alpha;\n\n    this.alpha = 1;\n\n    const cachedRenderTarget = renderer.context;\n\n    bounds.ceil(settings.RESOLUTION);\n\n    const renderTexture = RenderTexture.create(bounds.width, bounds.height);\n\n    const textureCacheId = `cacheAsBitmap_${uid()}`;\n\n    this._cacheData.textureCacheId = textureCacheId;\n\n    BaseTexture.addToCache(renderTexture.baseTexture, textureCacheId);\n    Texture.addToCache(renderTexture, textureCacheId);\n\n    // need to set //\n    const m = _tempMatrix;\n\n    this.transform.localTransform.copyTo(m);\n    m.invert();\n\n    m.tx -= bounds.x;\n    m.ty -= bounds.y;\n\n    // m.append(this.transform.worldTransform.)\n    // set all properties to there original so we can render to a texture\n    this.renderCanvas = this._cacheData.originalRenderCanvas;\n\n    // renderTexture.render(this, m, true);\n    renderer.render(this, renderTexture, true, m, false);\n\n    // now restore the state be setting the new properties\n    renderer.context = cachedRenderTarget;\n\n    this.renderCanvas = this._renderCachedCanvas;\n    // the rest is the same as for WebGL\n    this.updateTransform = this.displayObjectUpdateTransform;\n    this.calculateBounds = this._calculateCachedBounds;\n    this.getLocalBounds = this._getCachedLocalBounds;\n\n    this._mask = null;\n    this.filterArea = null;\n\n    // create our cached sprite\n    const cachedSprite = new Sprite(renderTexture);\n\n    cachedSprite.transform.worldTransform = this.transform.worldTransform;\n    cachedSprite.anchor.x = -(bounds.x / bounds.width);\n    cachedSprite.anchor.y = -(bounds.y / bounds.height);\n    cachedSprite.alpha = cacheAlpha;\n    cachedSprite._bounds = this._bounds;\n\n    this._cacheData.sprite = cachedSprite;\n\n    this.transform._parentID = -1;\n    // restore the transform of the cached sprite to avoid the nasty flicker..\n    if (!this.parent)\n    {\n        this.parent = renderer._tempDisplayObjectParent;\n        this.updateTransform();\n        this.parent = null;\n    }\n    else\n    {\n        this.updateTransform();\n    }\n\n    // map the hit test..\n    this.containsPoint = cachedSprite.containsPoint.bind(cachedSprite);\n};\n\n/**\n * Calculates the bounds of the cached sprite\n *\n * @private\n */\nDisplayObject.prototype._calculateCachedBounds = function _calculateCachedBounds()\n{\n    this._bounds.clear();\n    this._cacheData.sprite.transform._worldID = this.transform._worldID;\n    this._cacheData.sprite._calculateBounds();\n    this._lastBoundsID = this._boundsID;\n};\n\n/**\n * Gets the bounds of the cached sprite.\n *\n * @private\n * @return {Rectangle} The local bounds.\n */\nDisplayObject.prototype._getCachedLocalBounds = function _getCachedLocalBounds()\n{\n    return this._cacheData.sprite.getLocalBounds();\n};\n\n/**\n * Destroys the cached sprite.\n *\n * @private\n */\nDisplayObject.prototype._destroyCachedDisplayObject = function _destroyCachedDisplayObject()\n{\n    this._cacheData.sprite._texture.destroy(true);\n    this._cacheData.sprite = null;\n\n    BaseTexture.removeFromCache(this._cacheData.textureCacheId);\n    Texture.removeFromCache(this._cacheData.textureCacheId);\n\n    this._cacheData.textureCacheId = null;\n};\n\n/**\n * Destroys the cached object.\n *\n * @private\n * @param {object|boolean} [options] - Options parameter. A boolean will act as if all options\n *  have been set to that value.\n *  Used when destroying containers, see the Container.destroy method.\n */\nDisplayObject.prototype._cacheAsBitmapDestroy = function _cacheAsBitmapDestroy(options)\n{\n    this.cacheAsBitmap = false;\n    this.destroy(options);\n};\n","import { DisplayObject, Container } from '@pixi/display';\n\n/**\n * The instance name of the object.\n *\n * @memberof PIXI.DisplayObject#\n * @member {string} name\n */\nDisplayObject.prototype.name = null;\n\n/**\n * Returns the display object in the container.\n *\n * @method getChildByName\n * @memberof PIXI.Container#\n * @param {string} name - Instance name.\n * @return {PIXI.DisplayObject} The child with the specified name.\n */\nContainer.prototype.getChildByName = function getChildByName(name)\n{\n    for (let i = 0; i < this.children.length; i++)\n    {\n        if (this.children[i].name === name)\n        {\n            return this.children[i];\n        }\n    }\n\n    return null;\n};\n","import { DisplayObject } from '@pixi/display';\nimport { Point } from '@pixi/math';\n\n/**\n * Returns the global position of the displayObject. Does not depend on object scale, rotation and pivot.\n *\n * @method getGlobalPosition\n * @memberof PIXI.DisplayObject#\n * @param {PIXI.Point} [point=new PIXI.Point()] - The point to write the global value to.\n * @param {boolean} [skipUpdate=false] - Setting to true will stop the transforms of the scene graph from\n *  being updated. This means the calculation returned MAY be out of date BUT will give you a\n *  nice performance boost.\n * @return {PIXI.Point} The updated point.\n */\nDisplayObject.prototype.getGlobalPosition = function getGlobalPosition(point = new Point(), skipUpdate = false)\n{\n    if (this.parent)\n    {\n        this.parent.toGlobal(this.position, point, skipUpdate);\n    }\n    else\n    {\n        point.x = this.position.x;\n        point.y = this.position.y;\n    }\n\n    return point;\n};\n","import { deprecation } from '@pixi/utils';\n\nconst v5 = '5.0.0';\n\n/**\n * Deprecations (backward compatibilities) are automatically applied for browser bundles\n * in the UMD module format. If using Webpack or Rollup, you'll need to apply these\n * deprecations manually by doing something like this:\n * @example\n * import * as PIXI from 'pixi.js';\n * PIXI.useDeprecated(); // MUST be bound to namespace\n * @memberof PIXI\n * @function useDeprecated\n */\nexport default function useDeprecated()\n{\n    const PIXI = this;\n\n    Object.defineProperties(PIXI, {\n        /**\n         * @constant {RegExp|string} SVG_SIZE\n         * @memberof PIXI\n         * @see PIXI.resources.SVGResource.SVG_SIZE\n         * @deprecated since 5.0.0\n         */\n        SVG_SIZE: {\n            get()\n            {\n                deprecation(v5, 'PIXI.utils.SVG_SIZE property has moved to PIXI.resources.SVGResource.SVG_SIZE');\n\n                return PIXI.SVGResource.SVG_SIZE;\n            },\n        },\n\n        /**\n         * @class PIXI.TransformStatic\n         * @deprecated since 5.0.0\n         * @see PIXI.Transform\n         */\n        TransformStatic: {\n            get()\n            {\n                deprecation(v5, 'PIXI.TransformStatic class has been removed, use PIXI.Transform');\n\n                return PIXI.Transform;\n            },\n        },\n\n        /**\n         * @class PIXI.TransformBase\n         * @deprecated since 5.0.0\n         * @see PIXI.Transform\n         */\n        TransformBase: {\n            get()\n            {\n                deprecation(v5, 'PIXI.TransformBase class has been removed, use PIXI.Transform');\n\n                return PIXI.Transform;\n            },\n        },\n\n        /**\n         * Constants that specify the transform type.\n         *\n         * @static\n         * @constant\n         * @name TRANSFORM_MODE\n         * @memberof PIXI\n         * @enum {number}\n         * @deprecated since 5.0.0\n         * @property {number} STATIC\n         * @property {number} DYNAMIC\n         */\n        TRANSFORM_MODE: {\n            get()\n            {\n                deprecation(v5, 'PIXI.TRANSFORM_MODE property has been removed');\n\n                return { STATIC: 0, DYNAMIC: 1 };\n            },\n        },\n\n        /**\n         * @class PIXI.WebGLRenderer\n         * @see PIXI.Renderer\n         * @deprecated since 5.0.0\n         */\n        WebGLRenderer: {\n            get()\n            {\n                deprecation(v5, 'PIXI.WebGLRenderer class has moved to PIXI.Renderer');\n\n                return PIXI.Renderer;\n            },\n        },\n\n        /**\n         * @class PIXI.CanvasRenderTarget\n         * @see PIXI.utils.CanvasRenderTarget\n         * @deprecated since 5.0.0\n         */\n        CanvasRenderTarget: {\n            get()\n            {\n                deprecation(v5, 'PIXI.CanvasRenderTarget class has moved to PIXI.utils.CanvasRenderTarget');\n\n                return PIXI.utils.CanvasRenderTarget;\n            },\n        },\n\n        /**\n         * @memberof PIXI\n         * @name loader\n         * @type {PIXI.Loader}\n         * @see PIXI.Loader.shared\n         * @deprecated since 5.0.0\n         */\n        loader: {\n            get()\n            {\n                deprecation(v5, 'PIXI.loader instance has moved to PIXI.Loader.shared');\n\n                return PIXI.Loader.shared;\n            },\n        },\n\n        /**\n         * @class PIXI.FilterManager\n         * @see PIXI.systems.FilterSystem\n         * @deprecated since 5.0.0\n         */\n        FilterManager: {\n            get()\n            {\n                deprecation(v5, 'PIXI.FilterManager class has moved to PIXI.systems.FilterSystem');\n\n                return PIXI.systems.FilterSystem;\n            },\n        },\n    });\n\n    /**\n     * This namespace has been removed. All classes previous nested\n     * under this namespace have been moved to the top-level `PIXI` object.\n     * @namespace PIXI.extras\n     * @deprecated since 5.0.0\n     */\n    PIXI.extras = {};\n\n    Object.defineProperties(PIXI.extras, {\n        /**\n         * @class PIXI.extras.TilingSprite\n         * @see PIXI.TilingSprite\n         * @deprecated since 5.0.0\n         */\n        TilingSprite: {\n            get()\n            {\n                deprecation(v5, 'PIXI.extras.TilingSprite class has moved to PIXI.TilingSprite');\n\n                return PIXI.TilingSprite;\n            },\n        },\n        /**\n         * @class PIXI.extras.TilingSpriteRenderer\n         * @see PIXI.TilingSpriteRenderer\n         * @deprecated since 5.0.0\n         */\n        TilingSpriteRenderer: {\n            get()\n            {\n                deprecation(v5, 'PIXI.extras.TilingSpriteRenderer class has moved to PIXI.TilingSpriteRenderer');\n\n                return PIXI.TilingSpriteRenderer;\n            },\n        },\n        /**\n         * @class PIXI.extras.AnimatedSprite\n         * @see PIXI.AnimatedSprite\n         * @deprecated since 5.0.0\n         */\n        AnimatedSprite: {\n            get()\n            {\n                deprecation(v5, 'PIXI.extras.AnimatedSprite class has moved to PIXI.AnimatedSprite');\n\n                return PIXI.AnimatedSprite;\n            },\n        },\n        /**\n         * @class PIXI.extras.BitmapText\n         * @see PIXI.BitmapText\n         * @deprecated since 5.0.0\n         */\n        BitmapText: {\n            get()\n            {\n                deprecation(v5, 'PIXI.extras.BitmapText class has moved to PIXI.BitmapText');\n\n                return PIXI.BitmapText;\n            },\n        },\n    });\n\n    Object.defineProperties(PIXI.utils, {\n        /**\n         * @function PIXI.utils.getSvgSize\n         * @see PIXI.resources.SVGResource.getSize\n         * @deprecated since 5.0.0\n         */\n        getSvgSize: {\n            get()\n            {\n                deprecation(v5, 'PIXI.utils.getSvgSize function has moved to PIXI.resources.SVGResource.getSize');\n\n                return PIXI.SVGResource.getSize;\n            },\n        },\n    });\n\n    /**\n     * All classes on this namespace have moved to the high-level `PIXI` object.\n     * @namespace PIXI.mesh\n     * @deprecated since 5.0.0\n     */\n    PIXI.mesh = {};\n\n    Object.defineProperties(PIXI.mesh, {\n        /**\n         * @class PIXI.mesh.Mesh\n         * @see PIXI.SimpleMesh\n         * @deprecated since 5.0.0\n         */\n        Mesh: {\n            get()\n            {\n                deprecation(v5, 'PIXI.mesh.Mesh class has moved to PIXI.SimpleMesh');\n\n                return PIXI.SimpleMesh;\n            },\n        },\n        /**\n         * @class PIXI.mesh.NineSlicePlane\n         * @see PIXI.NineSlicePlane\n         * @deprecated since 5.0.0\n         */\n        NineSlicePlane: {\n            get()\n            {\n                deprecation(v5, 'PIXI.mesh.NineSlicePlane class has moved to PIXI.NineSlicePlane');\n\n                return PIXI.NineSlicePlane;\n            },\n        },\n        /**\n         * @class PIXI.mesh.Plane\n         * @see PIXI.SimplePlane\n         * @deprecated since 5.0.0\n         */\n        Plane: {\n            get()\n            {\n                deprecation(v5, 'PIXI.mesh.Plane class has moved to PIXI.SimplePlane');\n\n                return PIXI.SimplePlane;\n            },\n        },\n        /**\n         * @class PIXI.mesh.Rope\n         * @see PIXI.SimpleRope\n         * @deprecated since 5.0.0\n         */\n        Rope: {\n            get()\n            {\n                deprecation(v5, 'PIXI.mesh.Rope class has moved to PIXI.SimpleRope');\n\n                return PIXI.SimpleRope;\n            },\n        },\n        /**\n         * @class PIXI.mesh.RawMesh\n         * @see PIXI.Mesh\n         * @deprecated since 5.0.0\n         */\n        RawMesh: {\n            get()\n            {\n                deprecation(v5, 'PIXI.mesh.RawMesh class has moved to PIXI.Mesh');\n\n                return PIXI.Mesh;\n            },\n        },\n        /**\n         * @class PIXI.mesh.CanvasMeshRenderer\n         * @see PIXI.CanvasMeshRenderer\n         * @deprecated since 5.0.0\n         */\n        CanvasMeshRenderer: {\n            get()\n            {\n                deprecation(v5, 'PIXI.mesh.CanvasMeshRenderer class has moved to PIXI.CanvasMeshRenderer');\n\n                return PIXI.CanvasMeshRenderer;\n            },\n        },\n        /**\n         * @class PIXI.mesh.MeshRenderer\n         * @see PIXI.MeshRenderer\n         * @deprecated since 5.0.0\n         */\n        MeshRenderer: {\n            get()\n            {\n                deprecation(v5, 'PIXI.mesh.MeshRenderer class has moved to PIXI.MeshRenderer');\n\n                return PIXI.MeshRenderer;\n            },\n        },\n    });\n\n    /**\n     * This namespace has been removed and items have been moved to\n     * the top-level `PIXI` object.\n     * @namespace PIXI.particles\n     * @deprecated since 5.0.0\n     */\n    PIXI.particles = {};\n\n    Object.defineProperties(PIXI.particles, {\n        /**\n         * @class PIXI.particles.ParticleContainer\n         * @deprecated since 5.0.0\n         * @see PIXI.ParticleContainer\n         */\n        ParticleContainer: {\n            get()\n            {\n                deprecation(v5, 'PIXI.particles.ParticleContainer class has moved to PIXI.ParticleContainer');\n\n                return PIXI.ParticleContainer;\n            },\n        },\n        /**\n         * @class PIXI.particles.ParticleRenderer\n         * @deprecated since 5.0.0\n         * @see PIXI.ParticleRenderer\n         */\n        ParticleRenderer: {\n            get()\n            {\n                deprecation(v5, 'PIXI.particles.ParticleRenderer class has moved to PIXI.ParticleRenderer');\n\n                return PIXI.ParticleRenderer;\n            },\n        },\n    });\n\n    /**\n     * This namespace has been removed and items have been moved to\n     * the top-level `PIXI` object.\n     * @namespace PIXI.ticker\n     * @deprecated since 5.0.0\n     */\n    PIXI.ticker = {};\n\n    Object.defineProperties(PIXI.ticker, {\n        /**\n         * @class PIXI.ticker.Ticker\n         * @deprecated since 5.0.0\n         * @see PIXI.Ticker\n         */\n        Ticker: {\n            get()\n            {\n                deprecation(v5, 'PIXI.ticker.Ticker class has moved to PIXI.Ticker');\n\n                return PIXI.Ticker;\n            },\n        },\n        /**\n         * @name PIXI.ticker.shared\n         * @type {PIXI.Ticker}\n         * @deprecated since 5.0.0\n         * @see PIXI.Ticker.shared\n         */\n        shared: {\n            get()\n            {\n                deprecation(v5, 'PIXI.ticker.shared instance has moved to PIXI.Ticker.shared');\n\n                return PIXI.Ticker.shared;\n            },\n        },\n    });\n\n    /**\n     * All classes on this namespace have moved to the high-level `PIXI` object.\n     * @namespace PIXI.loaders\n     * @deprecated since 5.0.0\n     */\n    PIXI.loaders = {};\n\n    Object.defineProperties(PIXI.loaders, {\n        /**\n         * @class PIXI.loaders.Loader\n         * @see PIXI.Loader\n         * @deprecated since 5.0.0\n         */\n        Loader: {\n            get()\n            {\n                deprecation(v5, 'PIXI.loaders.Loader class has moved to PIXI.Loader');\n\n                return PIXI.Loader;\n            },\n        },\n        /**\n         * @class PIXI.loaders.Resource\n         * @see PIXI.LoaderResource\n         * @deprecated since 5.0.0\n         */\n        Resource: {\n            get()\n            {\n                deprecation(v5, 'PIXI.loaders.Resource class has moved to PIXI.LoaderResource');\n\n                return PIXI.LoaderResource;\n            },\n        },\n        /**\n         * @function PIXI.loaders.bitmapFontParser\n         * @see PIXI.BitmapFontLoader.use\n         * @deprecated since 5.0.0\n         */\n        bitmapFontParser: {\n            get()\n            {\n                deprecation(v5, 'PIXI.loaders.bitmapFontParser function has moved to PIXI.BitmapFontLoader.use');\n\n                return PIXI.BitmapFontLoader.use;\n            },\n        },\n        /**\n         * @function PIXI.loaders.parseBitmapFontData\n         * @see PIXI.BitmapFontLoader.parse\n         * @deprecated since 5.0.0\n         */\n        parseBitmapFontData: {\n            get()\n            {\n                deprecation(v5, 'PIXI.loaders.parseBitmapFontData function has moved to PIXI.BitmapFontLoader.parse');\n\n                return PIXI.BitmapFontLoader.parse;\n            },\n        },\n        /**\n         * @function PIXI.loaders.spritesheetParser\n         * @see PIXI.SpritesheetLoader.use\n         * @deprecated since 5.0.0\n         */\n        spritesheetParser: {\n            get()\n            {\n                deprecation(v5, 'PIXI.loaders.spritesheetParser function has moved to PIXI.SpritesheetLoader.use');\n\n                return PIXI.SpritesheetLoader.use;\n            },\n        },\n        /**\n         * @function PIXI.loaders.getResourcePath\n         * @see PIXI.SpritesheetLoader.getResourcePath\n         * @deprecated since 5.0.0\n         */\n        getResourcePath: {\n            get()\n            {\n                deprecation(v5, 'PIXI.loaders.getResourcePath property has moved to PIXI.SpritesheetLoader.getResourcePath');\n\n                return PIXI.SpritesheetLoader.getResourcePath;\n            },\n        },\n    });\n\n    /**\n     * @function PIXI.loaders.Loader.addPixiMiddleware\n     * @see PIXI.Loader.registerPlugin\n     * @deprecated since 5.0.0\n     * @param {function} middleware\n     */\n    PIXI.Loader.addPixiMiddleware = function addPixiMiddleware(middleware)\n    {\n        deprecation(v5,\n            'PIXI.loaders.Loader.addPixiMiddleware function is deprecated, use PIXI.loaders.Loader.registerPlugin'\n        );\n\n        return PIXI.loaders.Loader.registerPlugin({ use: middleware() });\n    };\n\n    /**\n     * @class PIXI.extract.WebGLExtract\n     * @deprecated since 5.0.0\n     * @see PIXI.extract.Extract\n     */\n    Object.defineProperty(PIXI.extract, 'WebGLExtract', {\n        get()\n        {\n            deprecation(v5, 'PIXI.extract.WebGLExtract method has moved to PIXI.extract.Extract');\n\n            return PIXI.extract.Extract;\n        },\n    });\n\n    /**\n     * @class PIXI.prepare.WebGLPrepare\n     * @deprecated since 5.0.0\n     * @see PIXI.prepare.Prepare\n     */\n    Object.defineProperty(PIXI.prepare, 'WebGLPrepare', {\n        get()\n        {\n            deprecation(v5, 'PIXI.prepare.WebGLPrepare class has moved to PIXI.prepare.Prepare');\n\n            return PIXI.prepare.Prepare;\n        },\n    });\n\n    /**\n     * @method PIXI.Container#_renderWebGL\n     * @private\n     * @deprecated since 5.0.0\n     * @see PIXI.Container#render\n     * @param {PIXI.Renderer} renderer Instance of renderer\n     */\n    PIXI.Container.prototype._renderWebGL = function _renderWebGL(renderer)\n    {\n        deprecation(v5, 'PIXI.Container._renderWebGL method has moved to PIXI.Container._render');\n\n        this._render(renderer);\n    };\n\n    /**\n     * @method PIXI.Container#renderWebGL\n     * @deprecated since 5.0.0\n     * @see PIXI.Container#render\n     * @param {PIXI.Renderer} renderer Instance of renderer\n     */\n    PIXI.Container.prototype.renderWebGL = function renderWebGL(renderer)\n    {\n        deprecation(v5, 'PIXI.Container.renderWebGL method has moved to PIXI.Container.render');\n\n        this.render(renderer);\n    };\n\n    /**\n     * @method PIXI.DisplayObject#renderWebGL\n     * @deprecated since 5.0.0\n     * @see PIXI.DisplayObject#render\n     * @param {PIXI.Renderer} renderer Instance of renderer\n     */\n    PIXI.DisplayObject.prototype.renderWebGL = function renderWebGL(renderer)\n    {\n        deprecation(v5, 'PIXI.DisplayObject.renderWebGL method has moved to PIXI.DisplayObject.render');\n\n        this.render(renderer);\n    };\n\n    /**\n     * @method PIXI.Container#renderAdvancedWebGL\n     * @deprecated since 5.0.0\n     * @see PIXI.Container#renderAdvanced\n     * @param {PIXI.Renderer} renderer Instance of renderer\n     */\n    PIXI.Container.prototype.renderAdvancedWebGL = function renderAdvancedWebGL(renderer)\n    {\n        deprecation(v5, 'PIXI.Container.renderAdvancedWebGL method has moved to PIXI.Container.renderAdvanced');\n\n        this.renderAdvanced(renderer);\n    };\n\n    Object.defineProperties(PIXI.settings, {\n        /**\n         * Default transform type.\n         *\n         * @static\n         * @deprecated since 5.0.0\n         * @memberof PIXI.settings\n         * @type {PIXI.TRANSFORM_MODE}\n         * @default PIXI.TRANSFORM_MODE.STATIC\n         */\n        TRANSFORM_MODE: {\n            get()\n            {\n                deprecation(v5, 'PIXI.settings.TRANSFORM_MODE property has been removed');\n\n                return 0;\n            },\n            set()\n            {\n                deprecation(v5, 'PIXI.settings.TRANSFORM_MODE property has been removed');\n            },\n        },\n    });\n\n    const { BaseTexture } = PIXI;\n\n    /**\n     * @method loadSource\n     * @memberof PIXI.BaseTexture#\n     * @deprecated since 5.0.0\n     */\n    BaseTexture.prototype.loadSource = function loadSource(image)\n    {\n        deprecation(v5, 'PIXI.BaseTexture.loadSource method has been deprecated');\n\n        const resource = PIXI.resources.autoDetectResource(image);\n\n        resource.internal = true;\n\n        this.setResource(resource);\n        this.update();\n    };\n\n    Object.defineProperties(BaseTexture.prototype, {\n        /**\n         * @name PIXI.BaseTexture#hasLoaded\n         * @type {boolean}\n         * @deprecated since 5.0.0\n         * @readonly\n         * @see PIXI.BaseTexture#valid\n         */\n        hasLoaded: {\n            get()\n            {\n                deprecation(v5, 'PIXI.BaseTexture.hasLoaded property has been removed, use PIXI.BaseTexture.valid');\n\n                return this.valid;\n            },\n        },\n        /**\n         * @name PIXI.BaseTexture#imageUrl\n         * @type {string}\n         * @deprecated since 5.0.0\n         * @see PIXI.resource.ImageResource#url\n         */\n        imageUrl: {\n            get()\n            {\n                deprecation(v5, 'PIXI.BaseTexture.imageUrl property has been removed, use PIXI.BaseTexture.resource.url');\n\n                return this.resource && this.resource.url;\n            },\n\n            set(imageUrl)\n            {\n                deprecation(v5, 'PIXI.BaseTexture.imageUrl property has been removed, use PIXI.BaseTexture.resource.url');\n\n                if (this.resource)\n                {\n                    this.resource.url = imageUrl;\n                }\n            },\n        },\n        /**\n         * @name PIXI.BaseTexture#source\n         * @type {HTMLImageElement|HTMLCanvasElement|HTMLVideoElement|SVGElement}\n         * @deprecated since 5.0.0\n         * @readonly\n         * @see PIXI.resources.BaseImageResource#source\n         */\n        source: {\n            get()\n            {\n                deprecation(v5, 'PIXI.BaseTexture.source property has been moved, use `PIXI.BaseTexture.resource.source`');\n\n                return this.resource && this.resource.source;\n            },\n            set(source)\n            {\n                deprecation(v5, 'PIXI.BaseTexture.source property has been moved, use `PIXI.BaseTexture.resource.source` '\n                    + 'if you want to set HTMLCanvasElement. Otherwise, create new BaseTexture.');\n\n                if (this.resource)\n                {\n                    this.resource.source = source;\n                }\n            },\n        },\n    });\n\n    /**\n     * @method fromImage\n     * @static\n     * @memberof PIXI.BaseTexture\n     * @deprecated since 5.0.0\n     * @see PIXI.BaseTexture.from\n     */\n    BaseTexture.fromImage = function fromImage(canvas, crossorigin, scaleMode, scale)\n    {\n        deprecation(v5, 'PIXI.BaseTexture.fromImage method has been replaced with PIXI.BaseTexture.from');\n\n        const resourceOptions = { scale, crossorigin };\n\n        return BaseTexture.from(canvas, { scaleMode, resourceOptions });\n    };\n\n    /**\n     * @method fromCanvas\n     * @static\n     * @memberof PIXI.BaseTexture\n     * @deprecated since 5.0.0\n     * @see PIXI.BaseTexture.from\n     */\n    BaseTexture.fromCanvas = function fromCanvas(canvas, scaleMode)\n    {\n        deprecation(v5, 'PIXI.BaseTexture.fromCanvas method has been replaced with PIXI.BaseTexture.from');\n\n        return BaseTexture.from(canvas, { scaleMode });\n    };\n\n    /**\n     * @method fromSVG\n     * @static\n     * @memberof PIXI.BaseTexture\n     * @deprecated since 5.0.0\n     * @see PIXI.BaseTexture.from\n     */\n    BaseTexture.fromSVG = function fromSVG(canvas, crossorigin, scaleMode, scale)\n    {\n        deprecation(v5, 'PIXI.BaseTexture.fromSVG method has been replaced with PIXI.BaseTexture.from');\n\n        const resourceOptions = { scale, crossorigin };\n\n        return BaseTexture.from(canvas, { scaleMode, resourceOptions });\n    };\n\n    /**\n     * @method PIXI.Point#copy\n     * @deprecated since 5.0.0\n     * @see PIXI.Point#copyFrom\n     */\n    PIXI.Point.prototype.copy = function copy(p)\n    {\n        deprecation(v5, 'PIXI.Point.copy method has been replaced with PIXI.Point.copyFrom');\n\n        return this.copyFrom(p);\n    };\n\n    /**\n     * @method PIXI.ObservablePoint#copy\n     * @deprecated since 5.0.0\n     * @see PIXI.ObservablePoint#copyFrom\n     */\n    PIXI.ObservablePoint.prototype.copy = function copy(p)\n    {\n        deprecation(v5, 'PIXI.ObservablePoint.copy method has been replaced with PIXI.ObservablePoint.copyFrom');\n\n        return this.copyFrom(p);\n    };\n\n    /**\n     * @method PIXI.Rectangle#copy\n     * @deprecated since 5.0.0\n     * @see PIXI.Rectangle#copyFrom\n     */\n    PIXI.Rectangle.prototype.copy = function copy(p)\n    {\n        deprecation(v5, 'PIXI.Rectangle.copy method has been replaced with PIXI.Rectangle.copyFrom');\n\n        return this.copyFrom(p);\n    };\n\n    /**\n     * @method PIXI.Matrix#copy\n     * @deprecated since 5.0.0\n     * @see PIXI.Matrix#copyTo\n     */\n    PIXI.Matrix.prototype.copy = function copy(p)\n    {\n        deprecation(v5, 'PIXI.Matrix.copy method has been replaced with PIXI.Matrix.copyTo');\n\n        return this.copyTo(p);\n    };\n\n    /**\n     * @method PIXI.systems.StateSystem#setState\n     * @deprecated since 5.1.0\n     * @see PIXI.systems.StateSystem#set\n     */\n    PIXI.systems.StateSystem.prototype.setState = function setState(s)\n    {\n        deprecation('v5.1.0', 'StateSystem.setState has been renamed to StateSystem.set');\n\n        return this.set(s);\n    };\n\n    Object.assign(PIXI.systems.FilterSystem.prototype, {\n        /**\n         * @method PIXI.FilterManager#getRenderTarget\n         * @deprecated since 5.0.0\n         * @see PIXI.systems.FilterSystem#getFilterTexture\n         */\n        getRenderTarget(clear, resolution)\n        {\n            deprecation(v5,\n                'PIXI.FilterManager.getRenderTarget method has been replaced with PIXI.systems.FilterSystem#getFilterTexture'\n            );\n\n            return this.getFilterTexture(resolution);\n        },\n\n        /**\n         * @method PIXI.FilterManager#returnRenderTarget\n         * @deprecated since 5.0.0\n         * @see PIXI.systems.FilterSystem#returnFilterTexture\n         */\n        returnRenderTarget(renderTexture)\n        {\n            deprecation(v5,\n                'PIXI.FilterManager.returnRenderTarget method has been replaced with '\n                + 'PIXI.systems.FilterSystem.returnFilterTexture'\n            );\n\n            this.returnFilterTexture(renderTexture);\n        },\n\n        /**\n         * @method PIXI.systems.FilterSystem#calculateScreenSpaceMatrix\n         * @deprecated since 5.0.0\n         * @param {PIXI.Matrix} outputMatrix - the matrix to output to.\n         * @return {PIXI.Matrix} The mapped matrix.\n         */\n        calculateScreenSpaceMatrix(outputMatrix)\n        {\n            deprecation(v5, 'PIXI.systems.FilterSystem.calculateScreenSpaceMatrix method is removed, '\n                + 'use `(vTextureCoord * inputSize.xy) + outputFrame.xy` instead');\n\n            const mappedMatrix = outputMatrix.identity();\n            const { sourceFrame, destinationFrame } = this.activeState;\n\n            mappedMatrix.translate(sourceFrame.x / destinationFrame.width, sourceFrame.y / destinationFrame.height);\n            mappedMatrix.scale(destinationFrame.width, destinationFrame.height);\n\n            return mappedMatrix;\n        },\n\n        /**\n         * @method PIXI.systems.FilterSystem#calculateNormalizedScreenSpaceMatrix\n         * @deprecated since 5.0.0\n         * @param {PIXI.Matrix} outputMatrix - The matrix to output to.\n         * @return {PIXI.Matrix} The mapped matrix.\n         */\n        calculateNormalizedScreenSpaceMatrix(outputMatrix)\n        {\n            deprecation(v5, 'PIXI.systems.FilterManager.calculateNormalizedScreenSpaceMatrix method is removed, '\n                + 'use `((vTextureCoord * inputSize.xy) + outputFrame.xy) / outputFrame.zw` instead.');\n\n            const { sourceFrame, destinationFrame } = this.activeState;\n            const mappedMatrix = outputMatrix.identity();\n\n            mappedMatrix.translate(sourceFrame.x / destinationFrame.width, sourceFrame.y / destinationFrame.height);\n\n            const translateScaleX = (destinationFrame.width / sourceFrame.width);\n            const translateScaleY = (destinationFrame.height / sourceFrame.height);\n\n            mappedMatrix.scale(translateScaleX, translateScaleY);\n\n            return mappedMatrix;\n        },\n    });\n\n    Object.defineProperties(PIXI.RenderTexture.prototype, {\n        /**\n         * @name PIXI.RenderTexture#sourceFrame\n         * @type {PIXI.Rectangle}\n         * @deprecated since 5.0.0\n         * @readonly\n         */\n        sourceFrame: {\n            get()\n            {\n                deprecation(v5, 'PIXI.RenderTexture.sourceFrame property has been removed');\n\n                return this.filterFrame;\n            },\n        },\n        /**\n         * @name PIXI.RenderTexture#size\n         * @type {PIXI.Rectangle}\n         * @deprecated since 5.0.0\n         * @readonly\n         */\n        size: {\n            get()\n            {\n                deprecation(v5, 'PIXI.RenderTexture.size property has been removed');\n\n                return this._frame;\n            },\n        },\n    });\n\n    /**\n     * @class BlurXFilter\n     * @memberof PIXI.filters\n     * @deprecated since 5.0.0\n     * @see PIXI.filters.BlurFilterPass\n     */\n    class BlurXFilter extends PIXI.filters.BlurFilterPass\n    {\n        constructor(strength, quality, resolution, kernelSize)\n        {\n            deprecation(v5, 'PIXI.filters.BlurXFilter class is deprecated, use PIXI.filters.BlurFilterPass');\n\n            super(true, strength, quality, resolution, kernelSize);\n        }\n    }\n\n    /**\n     * @class BlurYFilter\n     * @memberof PIXI.filters\n     * @deprecated since 5.0.0\n     * @see PIXI.filters.BlurFilterPass\n     */\n    class BlurYFilter extends PIXI.filters.BlurFilterPass\n    {\n        constructor(strength, quality, resolution, kernelSize)\n        {\n            deprecation(v5, 'PIXI.filters.BlurYFilter class is deprecated, use PIXI.filters.BlurFilterPass');\n\n            super(false, strength, quality, resolution, kernelSize);\n        }\n    }\n\n    Object.assign(PIXI.filters, {\n        BlurXFilter,\n        BlurYFilter,\n    });\n\n    const { Sprite, Texture, Graphics } = PIXI;\n\n    // Support for pixi.js-legacy bifurcation\n    // give users a friendly assist to use legacy\n    if (!Graphics.prototype.generateCanvasTexture)\n    {\n        Graphics.prototype.generateCanvasTexture = function generateCanvasTexture()\n        {\n            deprecation(v5, 'PIXI.Graphics.generateCanvasTexture method is only available in \"pixi.js-legacy\"');\n        };\n    }\n\n    /**\n     * @deprecated since 5.0.0\n     * @member {PIXI.Graphics} PIXI.Graphics#graphicsData\n     * @see PIXI.Graphics#geometry\n     * @readonly\n     */\n    Object.defineProperty(PIXI.Graphics.prototype, 'graphicsData', {\n        get()\n        {\n            deprecation(v5, 'PIXI.Graphics.graphicsData property is deprecated, use PIXI.Graphics.geometry.graphicsData');\n\n            return this.geometry.graphicsData;\n        },\n    });\n\n    // Use these to deprecate all the Sprite from* methods\n    function spriteFrom(name, source, crossorigin, scaleMode)\n    {\n        deprecation(v5, `PIXI.Sprite.${name} method is deprecated, use PIXI.Sprite.from`);\n\n        return Sprite.from(source, {\n            resourceOptions: {\n                scale: scaleMode,\n                crossorigin,\n            },\n        });\n    }\n\n    /**\n     * @deprecated since 5.0.0\n     * @see PIXI.Sprite.from\n     * @method PIXI.Sprite.fromImage\n     * @return {PIXI.Sprite}\n     */\n    Sprite.fromImage = spriteFrom.bind(null, 'fromImage');\n\n    /**\n     * @deprecated since 5.0.0\n     * @method PIXI.Sprite.fromSVG\n     * @see PIXI.Sprite.from\n     * @return {PIXI.Sprite}\n     */\n    Sprite.fromSVG = spriteFrom.bind(null, 'fromSVG');\n\n    /**\n     * @deprecated since 5.0.0\n     * @method PIXI.Sprite.fromCanvas\n     * @see PIXI.Sprite.from\n     * @return {PIXI.Sprite}\n     */\n    Sprite.fromCanvas = spriteFrom.bind(null, 'fromCanvas');\n\n    /**\n     * @deprecated since 5.0.0\n     * @method PIXI.Sprite.fromVideo\n     * @see PIXI.Sprite.from\n     * @return {PIXI.Sprite}\n     */\n    Sprite.fromVideo = spriteFrom.bind(null, 'fromVideo');\n\n    /**\n     * @deprecated since 5.0.0\n     * @method PIXI.Sprite.fromFrame\n     * @see PIXI.Sprite.from\n     * @return {PIXI.Sprite}\n     */\n    Sprite.fromFrame = spriteFrom.bind(null, 'fromFrame');\n\n    // Use these to deprecate all the Texture from* methods\n    function textureFrom(name, source, crossorigin, scaleMode)\n    {\n        deprecation(v5, `PIXI.Texture.${name} method is deprecated, use PIXI.Texture.from`);\n\n        return Texture.from(source, {\n            resourceOptions: {\n                scale: scaleMode,\n                crossorigin,\n            },\n        });\n    }\n\n    /**\n     * @deprecated since 5.0.0\n     * @method PIXI.Texture.fromImage\n     * @see PIXI.Texture.from\n     * @return {PIXI.Texture}\n     */\n    Texture.fromImage = textureFrom.bind(null, 'fromImage');\n\n    /**\n     * @deprecated since 5.0.0\n     * @method PIXI.Texture.fromSVG\n     * @see PIXI.Texture.from\n     * @return {PIXI.Texture}\n     */\n    Texture.fromSVG = textureFrom.bind(null, 'fromSVG');\n\n    /**\n     * @deprecated since 5.0.0\n     * @method PIXI.Texture.fromCanvas\n     * @see PIXI.Texture.from\n     * @return {PIXI.Texture}\n     */\n    Texture.fromCanvas = textureFrom.bind(null, 'fromCanvas');\n\n    /**\n     * @deprecated since 5.0.0\n     * @method PIXI.Texture.fromVideo\n     * @see PIXI.Texture.from\n     * @return {PIXI.Texture}\n     */\n    Texture.fromVideo = textureFrom.bind(null, 'fromVideo');\n\n    /**\n     * @deprecated since 5.0.0\n     * @method PIXI.Texture.fromFrame\n     * @see PIXI.Texture.from\n     * @return {PIXI.Texture}\n     */\n    Texture.fromFrame = textureFrom.bind(null, 'fromFrame');\n\n    /**\n     * @deprecated since 5.0.0\n     * @member {boolean} PIXI.AbstractRenderer#autoResize\n     * @see PIXI.AbstractRenderer#autoDensity\n     */\n    Object.defineProperty(PIXI.AbstractRenderer.prototype, 'autoResize', {\n        get()\n        {\n            deprecation(v5, 'PIXI.AbstractRenderer.autoResize property is deprecated, '\n                + 'use PIXI.AbstractRenderer.autoDensity');\n\n            return this.autoDensity;\n        },\n        set(value)\n        {\n            deprecation(v5, 'PIXI.AbstractRenderer.autoResize property is deprecated, '\n                + 'use PIXI.AbstractRenderer.autoDensity');\n\n            this.autoDensity = value;\n        },\n    });\n\n    /**\n     * @deprecated since 5.0.0\n     * @member {PIXI.systems.TextureSystem} PIXI.Renderer#textureManager\n     * @see PIXI.Renderer#texture\n     */\n    Object.defineProperty(PIXI.Renderer.prototype, 'textureManager', {\n        get()\n        {\n            deprecation(v5, 'PIXI.Renderer.textureManager property is deprecated, use PIXI.Renderer.texture');\n\n            return this.texture;\n        },\n    });\n\n    /**\n     * @namespace PIXI.utils.mixins\n     * @deprecated since 5.0.0\n     */\n    PIXI.utils.mixins = {\n        /**\n         * @memberof PIXI.utils.mixins\n         * @function mixin\n         * @deprecated since 5.0.0\n         */\n        mixin()\n        {\n            deprecation(v5, 'PIXI.utils.mixins.mixin function is no longer available');\n        },\n        /**\n         * @memberof PIXI.utils.mixins\n         * @function delayMixin\n         * @deprecated since 5.0.0\n         */\n        delayMixin()\n        {\n            deprecation(v5, 'PIXI.utils.mixins.delayMixin function is no longer available');\n        },\n        /**\n         * @memberof PIXI.utils.mixins\n         * @function performMixins\n         * @deprecated since 5.0.0\n         */\n        performMixins()\n        {\n            deprecation(v5, 'PIXI.utils.mixins.performMixins function is no longer available');\n        },\n    };\n}\n","/**\n * Class controls cache for UV mapping from Texture normal space to BaseTexture normal space.\n *\n * @class\n * @memberof PIXI\n */\nexport default class MeshBatchUvs\n{\n    /**\n     * @param {PIXI.Buffer} uvBuffer - Buffer with normalized uv's\n     * @param {PIXI.TextureMatrix} uvMatrix - Material UV matrix\n     */\n    constructor(uvBuffer, uvMatrix)\n    {\n        /**\n         * Buffer with normalized UV's\n         * @member {PIXI.Buffer}\n         */\n        this.uvBuffer = uvBuffer;\n\n        /**\n         * Material UV matrix\n         * @member {PIXI.TextureMatrix}\n         */\n        this.uvMatrix = uvMatrix;\n\n        /**\n         * UV Buffer data\n         * @member {Float32Array}\n         * @readonly\n         */\n        this.data = null;\n\n        this._bufferUpdateId = -1;\n\n        this._textureUpdateId = -1;\n\n        this._updateID = 0;\n    }\n\n    /**\n     * updates\n     *\n     * @param {boolean} forceUpdate - force the update\n     */\n    update(forceUpdate)\n    {\n        if (!forceUpdate\n            && this._bufferUpdateId === this.uvBuffer._updateID\n            && this._textureUpdateId === this.uvMatrix._updateID)\n        {\n            return;\n        }\n\n        this._bufferUpdateId = this.uvBuffer._updateID;\n        this._textureUpdateId = this.uvMatrix._updateID;\n\n        const data = this.uvBuffer.data;\n\n        if (!this.data || this.data.length !== data.length)\n        {\n            this.data = new Float32Array(data.length);\n        }\n\n        this.uvMatrix.multiplyUvs(data, this.data);\n\n        this._updateID++;\n    }\n}\n","import { State } from '@pixi/core';\nimport { Point, Polygon } from '@pixi/math';\nimport { BLEND_MODES, DRAW_MODES } from '@pixi/constants';\nimport { Container } from '@pixi/display';\nimport { settings } from '@pixi/settings';\nimport MeshBatchUvs from './MeshBatchUvs';\n\nconst tempPoint = new Point();\nconst tempPolygon = new Polygon();\n\n/**\n * Base mesh class.\n *\n * This class empowers you to have maximum flexibility to render any kind of WebGL visuals you can think of.\n * This class assumes a certain level of WebGL knowledge.\n * If you know a bit this should abstract enough away to make you life easier!\n *\n * Pretty much ALL WebGL can be broken down into the following:\n * - Geometry - The structure and data for the mesh. This can include anything from positions, uvs, normals, colors etc..\n * - Shader - This is the shader that PixiJS will render the geometry with (attributes in the shader must match the geometry)\n * - State - This is the state of WebGL required to render the mesh.\n *\n * Through a combination of the above elements you can render anything you want, 2D or 3D!\n *\n * @class\n * @extends PIXI.Container\n * @memberof PIXI\n */\nexport default class Mesh extends Container\n{\n    /**\n     * @param {PIXI.Geometry} geometry  the geometry the mesh will use\n     * @param {PIXI.Shader|PIXI.MeshMaterial} shader  the shader the mesh will use\n     * @param {PIXI.State} [state] the state that the WebGL context is required to be in to render the mesh\n     *        if no state is provided, uses {@link PIXI.State.for2d} to create a 2D state for PixiJS.\n     * @param {number} [drawMode=PIXI.DRAW_MODES.TRIANGLES] the drawMode, can be any of the PIXI.DRAW_MODES consts\n     */\n    constructor(geometry, shader, state, drawMode = DRAW_MODES.TRIANGLES)// vertices, uvs, indices, drawMode)\n    {\n        super();\n\n        /**\n         * Includes vertex positions, face indices, normals, colors, UVs, and\n         * custom attributes within buffers, reducing the cost of passing all\n         * this data to the GPU. Can be shared between multiple Mesh objects.\n         * @member {PIXI.Geometry}\n         * @readonly\n         */\n        this.geometry = geometry;\n\n        geometry.refCount++;\n\n        /**\n         * Represents the vertex and fragment shaders that processes the geometry and runs on the GPU.\n         * Can be shared between multiple Mesh objects.\n         * @member {PIXI.Shader|PIXI.MeshMaterial}\n         */\n        this.shader = shader;\n\n        /**\n         * Represents the WebGL state the Mesh required to render, excludes shader and geometry. E.g.,\n         * blend mode, culling, depth testing, direction of rendering triangles, backface, etc.\n         * @member {PIXI.State}\n         */\n        this.state = state || State.for2d();\n\n        /**\n         * The way the Mesh should be drawn, can be any of the {@link PIXI.DRAW_MODES} constants.\n         *\n         * @member {number}\n         * @see PIXI.DRAW_MODES\n         */\n        this.drawMode = drawMode;\n\n        /**\n         * Typically the index of the IndexBuffer where to start drawing.\n         * @member {number}\n         * @default 0\n         */\n        this.start = 0;\n\n        /**\n         * How much of the geometry to draw, by default `0` renders everything.\n         * @member {number}\n         * @default 0\n         */\n        this.size = 0;\n\n        /**\n         * thease are used as easy access for batching\n         * @member {Float32Array}\n         * @private\n         */\n        this.uvs = null;\n\n        /**\n         * thease are used as easy access for batching\n         * @member {Uint16Array}\n         * @private\n         */\n        this.indices = null;\n\n        /**\n         * this is the caching layer used by the batcher\n         * @member {Float32Array}\n         * @private\n         */\n        this.vertexData = new Float32Array(1);\n\n        /**\n         * If geometry is changed used to decide to re-transform\n         * the vertexData.\n         * @member {number}\n         * @private\n         */\n        this.vertexDirty = 0;\n\n        this._transformID = -1;\n\n        // Inherited from DisplayMode, set defaults\n        this.tint = 0xFFFFFF;\n        this.blendMode = BLEND_MODES.NORMAL;\n\n        /**\n         * Internal roundPixels field\n         *\n         * @member {boolean}\n         * @private\n         */\n        this._roundPixels = settings.ROUND_PIXELS;\n\n        /**\n         * Batched UV's are cached for atlas textures\n         * @member {PIXI.MeshBatchUvs}\n         * @private\n         */\n        this.batchUvs = null;\n    }\n\n    /**\n     * To change mesh uv's, change its uvBuffer data and increment its _updateID.\n     * @member {PIXI.Buffer}\n     * @readonly\n     */\n    get uvBuffer()\n    {\n        return this.geometry.buffers[1];\n    }\n\n    /**\n     * To change mesh vertices, change its uvBuffer data and increment its _updateID.\n     * Incrementing _updateID is optional because most of Mesh objects do it anyway.\n     * @member {PIXI.Buffer}\n     * @readonly\n     */\n    get verticesBuffer()\n    {\n        return this.geometry.buffers[0];\n    }\n\n    /**\n     * Alias for {@link PIXI.Mesh#shader}.\n     * @member {PIXI.Shader|PIXI.MeshMaterial}\n     */\n    set material(value)\n    {\n        this.shader = value;\n    }\n\n    get material()\n    {\n        return this.shader;\n    }\n\n    /**\n     * The blend mode to be applied to the Mesh. Apply a value of\n     * `PIXI.BLEND_MODES.NORMAL` to reset the blend mode.\n     *\n     * @member {number}\n     * @default PIXI.BLEND_MODES.NORMAL;\n     * @see PIXI.BLEND_MODES\n     */\n    set blendMode(value)\n    {\n        this.state.blendMode = value;\n    }\n\n    get blendMode()\n    {\n        return this.state.blendMode;\n    }\n\n    /**\n     * If true PixiJS will Math.floor() x/y values when rendering, stopping pixel interpolation.\n     * Advantages can include sharper image quality (like text) and faster rendering on canvas.\n     * The main disadvantage is movement of objects may appear less smooth.\n     * To set the global default, change {@link PIXI.settings.ROUND_PIXELS}\n     *\n     * @member {boolean}\n     * @default false\n     */\n    set roundPixels(value)\n    {\n        if (this._roundPixels !== value)\n        {\n            this._transformID = -1;\n        }\n        this._roundPixels = value;\n    }\n\n    get roundPixels()\n    {\n        return this._roundPixels;\n    }\n\n    /**\n     * The multiply tint applied to the Mesh. This is a hex value. A value of\n     * `0xFFFFFF` will remove any tint effect.\n     *\n     * @member {number}\n     * @default 0xFFFFFF\n     */\n    get tint()\n    {\n        return this.shader.tint;\n    }\n\n    set tint(value)\n    {\n        this.shader.tint = value;\n    }\n\n    /**\n     * The texture that the Mesh uses.\n     *\n     * @member {PIXI.Texture}\n     */\n    get texture()\n    {\n        return this.shader.texture;\n    }\n\n    set texture(value)\n    {\n        this.shader.texture = value;\n    }\n\n    /**\n     * Standard renderer draw.\n     * @protected\n     * @param {PIXI.Renderer} renderer - Instance to renderer.\n     */\n    _render(renderer)\n    {\n        // set properties for batching..\n        // TODO could use a different way to grab verts?\n        const vertices = this.geometry.buffers[0].data;\n\n        // TODO benchmark check for attribute size..\n        if (this.shader.batchable && this.drawMode === DRAW_MODES.TRIANGLES && vertices.length < Mesh.BATCHABLE_SIZE * 2)\n        {\n            this._renderToBatch(renderer);\n        }\n        else\n        {\n            this._renderDefault(renderer);\n        }\n    }\n\n    /**\n     * Standard non-batching way of rendering.\n     * @protected\n     * @param {PIXI.Renderer} renderer - Instance to renderer.\n     */\n    _renderDefault(renderer)\n    {\n        const shader = this.shader;\n\n        shader.alpha = this.worldAlpha;\n        if (shader.update)\n        {\n            shader.update();\n        }\n\n        renderer.batch.flush();\n\n        if (shader.program.uniformData.translationMatrix)\n        {\n            shader.uniforms.translationMatrix = this.transform.worldTransform.toArray(true);\n        }\n\n        // bind and sync uniforms..\n        renderer.shader.bind(shader);\n\n        // set state..\n        renderer.state.set(this.state);\n\n        // bind the geometry...\n        renderer.geometry.bind(this.geometry, shader);\n\n        // then render it\n        renderer.geometry.draw(this.drawMode, this.size, this.start, this.geometry.instanceCount);\n    }\n\n    /**\n     * Rendering by using the Batch system.\n     * @protected\n     * @param {PIXI.Renderer} renderer - Instance to renderer.\n     */\n    _renderToBatch(renderer)\n    {\n        const geometry = this.geometry;\n\n        if (this.shader.uvMatrix)\n        {\n            this.shader.uvMatrix.update();\n            this.calculateUvs();\n        }\n\n        // set properties for batching..\n        this.calculateVertices();\n        this.indices = geometry.indexBuffer.data;\n        this._tintRGB = this.shader._tintRGB;\n        this._texture = this.shader.texture;\n\n        const pluginName = this.material.pluginName;\n\n        renderer.batch.setObjectRenderer(renderer.plugins[pluginName]);\n        renderer.plugins[pluginName].render(this);\n    }\n\n    /**\n     * Updates vertexData field based on transform and vertices\n     */\n    calculateVertices()\n    {\n        const geometry = this.geometry;\n        const vertices = geometry.buffers[0].data;\n\n        if (geometry.vertexDirtyId === this.vertexDirty && this._transformID === this.transform._worldID)\n        {\n            return;\n        }\n\n        this._transformID = this.transform._worldID;\n\n        if (this.vertexData.length !== vertices.length)\n        {\n            this.vertexData = new Float32Array(vertices.length);\n        }\n\n        const wt = this.transform.worldTransform;\n        const a = wt.a;\n        const b = wt.b;\n        const c = wt.c;\n        const d = wt.d;\n        const tx = wt.tx;\n        const ty = wt.ty;\n\n        const vertexData = this.vertexData;\n\n        for (let i = 0; i < vertexData.length / 2; i++)\n        {\n            const x = vertices[(i * 2)];\n            const y = vertices[(i * 2) + 1];\n\n            vertexData[(i * 2)] = (a * x) + (c * y) + tx;\n            vertexData[(i * 2) + 1] = (b * x) + (d * y) + ty;\n        }\n\n        if (this._roundPixels)\n        {\n            for (let i = 0; i < vertexData.length; i++)\n            {\n                vertexData[i] = Math.round(vertexData[i]);\n            }\n        }\n\n        this.vertexDirty = geometry.vertexDirtyId;\n    }\n\n    /**\n     * Updates uv field based on from geometry uv's or batchUvs\n     */\n    calculateUvs()\n    {\n        const geomUvs = this.geometry.buffers[1];\n\n        if (!this.shader.uvMatrix.isSimple)\n        {\n            if (!this.batchUvs)\n            {\n                this.batchUvs = new MeshBatchUvs(geomUvs, this.shader.uvMatrix);\n            }\n            this.batchUvs.update();\n            this.uvs = this.batchUvs.data;\n        }\n        else\n        {\n            this.uvs = geomUvs.data;\n        }\n    }\n\n    /**\n     * Updates the bounds of the mesh as a rectangle. The bounds calculation takes the worldTransform into account.\n     * there must be a aVertexPosition attribute present in the geometry for bounds to be calculated correctly.\n     *\n     * @protected\n     */\n    _calculateBounds()\n    {\n        this.calculateVertices();\n\n        this._bounds.addVertexData(this.vertexData, 0, this.vertexData.length);\n    }\n\n    /**\n     * Tests if a point is inside this mesh. Works only for PIXI.DRAW_MODES.TRIANGLES.\n     *\n     * @param {PIXI.Point} point the point to test\n     * @return {boolean} the result of the test\n     */\n    containsPoint(point)\n    {\n        if (!this.getBounds().contains(point.x, point.y))\n        {\n            return false;\n        }\n\n        this.worldTransform.applyInverse(point, tempPoint);\n\n        const vertices = this.geometry.getBuffer('aVertexPosition').data;\n\n        const points = tempPolygon.points;\n        const indices =  this.geometry.getIndex().data;\n        const len = indices.length;\n        const step = this.drawMode === 4 ? 3 : 1;\n\n        for (let i = 0; i + 2 < len; i += step)\n        {\n            const ind0 = indices[i] * 2;\n            const ind1 = indices[i + 1] * 2;\n            const ind2 = indices[i + 2] * 2;\n\n            points[0] = vertices[ind0];\n            points[1] = vertices[ind0 + 1];\n            points[2] = vertices[ind1];\n            points[3] = vertices[ind1 + 1];\n            points[4] = vertices[ind2];\n            points[5] = vertices[ind2 + 1];\n\n            if (tempPolygon.contains(tempPoint.x, tempPoint.y))\n            {\n                return true;\n            }\n        }\n\n        return false;\n    }\n    /**\n     * Destroys the Mesh object.\n     *\n     * @param {object|boolean} [options] - Options parameter. A boolean will act as if all\n     *  options have been set to that value\n     * @param {boolean} [options.children=false] - if set to true, all the children will have\n     *  their destroy method called as well. 'options' will be passed on to those calls.\n     */\n    destroy(options)\n    {\n        super.destroy(options);\n\n        this.geometry.refCount--;\n        if (this.geometry.refCount === 0)\n        {\n            this.geometry.dispose();\n        }\n\n        this.geometry = null;\n        this.shader = null;\n        this.state = null;\n        this.uvs = null;\n        this.indices = null;\n        this.vertexData = null;\n    }\n}\n\n/**\n * The maximum number of vertices to consider batchable. Generally, the complexity\n * of the geometry.\n * @memberof PIXI.Mesh\n * @static\n * @member {number} BATCHABLE_SIZE\n */\nMesh.BATCHABLE_SIZE = 100;\n","import { Shader, Program, TextureMatrix } from '@pixi/core';\nimport vertex from './shader/mesh.vert';\nimport fragment from './shader/mesh.frag';\nimport { Matrix } from '@pixi/math';\nimport { premultiplyTintToRgba } from '@pixi/utils';\n\n/**\n * Slightly opinionated default shader for PixiJS 2D objects.\n * @class\n * @memberof PIXI\n * @extends PIXI.Shader\n */\nexport default class MeshMaterial extends Shader\n{\n    /**\n     * @param {PIXI.Texture} uSampler - Texture that material uses to render.\n     * @param {object} [options] - Additional options\n     * @param {number} [options.alpha=1] - Default alpha.\n     * @param {number} [options.tint=0xFFFFFF] - Default tint.\n     * @param {string} [options.pluginName='batch'] - Renderer plugin for batching.\n     * @param {PIXI.Program} [options.program=0xFFFFFF] - Custom program.\n     * @param {object} [options.uniforms] - Custom uniforms.\n     */\n    constructor(uSampler, options)\n    {\n        const uniforms = {\n            uSampler,\n            alpha: 1,\n            uTextureMatrix: Matrix.IDENTITY,\n            uColor: new Float32Array([1, 1, 1, 1]),\n        };\n\n        // Set defaults\n        options = Object.assign({\n            tint: 0xFFFFFF,\n            alpha: 1,\n            pluginName: 'batch',\n        }, options);\n\n        if (options.uniforms)\n        {\n            Object.assign(uniforms, options.uniforms);\n        }\n\n        super(options.program || Program.from(vertex, fragment), uniforms);\n\n        /**\n         * Only do update if tint or alpha changes.\n         * @member {boolean}\n         * @private\n         * @default false\n         */\n        this._colorDirty = false;\n\n        /**\n         * TextureMatrix instance for this Mesh, used to track Texture changes\n         *\n         * @member {PIXI.TextureMatrix}\n         * @readonly\n         */\n        this.uvMatrix = new TextureMatrix(uSampler);\n\n        /**\n         * `true` if shader can be batch with the renderer's batch system.\n         * @member {boolean}\n         * @default true\n         */\n        this.batchable = options.program === undefined;\n\n        /**\n         * Renderer plugin for batching\n         *\n         * @member {string}\n         * @default 'batch'\n         */\n        this.pluginName = options.pluginName;\n\n        this.tint = options.tint;\n        this.alpha = options.alpha;\n    }\n\n    /**\n     * Reference to the texture being rendered.\n     * @member {PIXI.Texture}\n     */\n    get texture()\n    {\n        return this.uniforms.uSampler;\n    }\n    set texture(value)\n    {\n        if (this.uniforms.uSampler !== value)\n        {\n            this.uniforms.uSampler = value;\n            this.uvMatrix.texture = value;\n        }\n    }\n\n    /**\n     * This gets automatically set by the object using this.\n     *\n     * @default 1\n     * @member {number}\n     */\n    set alpha(value)\n    {\n        if (value === this._alpha) return;\n\n        this._alpha = value;\n        this._colorDirty = true;\n    }\n    get alpha()\n    {\n        return this._alpha;\n    }\n\n    /**\n     * Multiply tint for the material.\n     * @member {number}\n     * @default 0xFFFFFF\n     */\n    set tint(value)\n    {\n        if (value === this._tint) return;\n\n        this._tint = value;\n        this._tintRGB = (value >> 16) + (value & 0xff00) + ((value & 0xff) << 16);\n        this._colorDirty = true;\n    }\n    get tint()\n    {\n        return this._tint;\n    }\n\n    /**\n     * Gets called automatically by the Mesh. Intended to be overridden for custom\n     * MeshMaterial objects.\n     */\n    update()\n    {\n        if (this._colorDirty)\n        {\n            this._colorDirty = false;\n            const baseTexture = this.texture.baseTexture;\n\n            premultiplyTintToRgba(this._tint, this._alpha, this.uniforms.uColor, baseTexture.premultiplyAlpha);\n        }\n        if (this.uvMatrix.update())\n        {\n            this.uniforms.uTextureMatrix = this.uvMatrix.mapCoord;\n        }\n    }\n}\n","import { TYPES } from '@pixi/constants';\nimport { Buffer, Geometry } from '@pixi/core';\n\n/**\n * Standard 2D geometry used in PixiJS.\n *\n * Geometry can be defined without passing in a style or data if required.\n *\n * ```js\n * const geometry = new PIXI.Geometry();\n *\n * geometry.addAttribute('positions', [0, 0, 100, 0, 100, 100, 0, 100], 2);\n * geometry.addAttribute('uvs', [0,0,1,0,1,1,0,1], 2);\n * geometry.addIndex([0,1,2,1,3,2]);\n *\n * ```\n * @class\n * @memberof PIXI\n * @extends PIXI.Geometry\n */\nexport default class MeshGeometry extends Geometry\n{\n    /**\n     * @param {Float32Array|number[]} vertices - Positional data on geometry.\n     * @param {Float32Array|number[]} uvs - Texture UVs.\n     * @param {Uint16Array|number[]} index - IndexBuffer\n     */\n    constructor(vertices, uvs, index)\n    {\n        super();\n\n        const verticesBuffer = new Buffer(vertices);\n        const uvsBuffer = new Buffer(uvs, true);\n        const indexBuffer = new Buffer(index, true, true);\n\n        this.addAttribute('aVertexPosition', verticesBuffer, 2, false, TYPES.FLOAT)\n            .addAttribute('aTextureCoord', uvsBuffer, 2, false, TYPES.FLOAT)\n            .addIndex(indexBuffer);\n\n        /**\n         * Dirty flag to limit update calls on Mesh. For example,\n         * limiting updates on a single Mesh instance with a shared Geometry\n         * within the render loop.\n         * @private\n         * @member {number}\n         * @default -1\n         */\n        this._updateId = -1;\n    }\n\n    /**\n     * If the vertex position is updated.\n     * @member {number}\n     * @readonly\n     * @private\n     */\n    get vertexDirtyId()\n    {\n        return this.buffers[0]._updateID;\n    }\n}\n","import { MeshGeometry } from '@pixi/mesh';\n\nexport default class PlaneGeometry extends MeshGeometry\n{\n    constructor(width = 100, height = 100, segWidth = 10, segHeight = 10)\n    {\n        super();\n\n        this.segWidth = segWidth;\n        this.segHeight = segHeight;\n\n        this.width = width;\n        this.height = height;\n\n        this.build();\n    }\n\n    /**\n     * Refreshes plane coordinates\n     * @private\n     */\n    build()\n    {\n        const total = this.segWidth * this.segHeight;\n        const verts = [];\n        const uvs = [];\n        const indices = [];\n\n        const segmentsX = this.segWidth - 1;\n        const segmentsY = this.segHeight - 1;\n\n        const sizeX = (this.width) / segmentsX;\n        const sizeY = (this.height) / segmentsY;\n\n        for (let i = 0; i < total; i++)\n        {\n            const x = (i % this.segWidth);\n            const y = ((i / this.segWidth) | 0);\n\n            verts.push(x * sizeX, y * sizeY);\n            uvs.push(x / segmentsX, y / segmentsY);\n        }\n\n        const totalSub = segmentsX * segmentsY;\n\n        for (let i = 0; i < totalSub; i++)\n        {\n            const xpos = i % segmentsX;\n            const ypos = (i / segmentsX) | 0;\n\n            const value = (ypos * this.segWidth) + xpos;\n            const value2 = (ypos * this.segWidth) + xpos + 1;\n            const value3 = ((ypos + 1) * this.segWidth) + xpos;\n            const value4 = ((ypos + 1) * this.segWidth) + xpos + 1;\n\n            indices.push(value, value2, value3,\n                value2, value4, value3);\n        }\n\n        this.buffers[0].data = new Float32Array(verts);\n        this.buffers[1].data = new Float32Array(uvs);\n        this.indexBuffer.data = new Uint16Array(indices);\n\n        // ensure that the changes are uploaded\n        this.buffers[0].update();\n        this.buffers[1].update();\n        this.indexBuffer.update();\n    }\n}\n","import { MeshGeometry } from '@pixi/mesh';\n/**\n * RopeGeometry allows you to draw a geometry across several points and then manipulate these points.\n *\n * ```js\n * for (let i = 0; i < 20; i++) {\n *     points.push(new PIXI.Point(i * 50, 0));\n * };\n * const rope = new PIXI.RopeGeometry(100, points);\n * ```\n *\n * @class\n * @extends PIXI.MeshGeometry\n * @memberof PIXI\n *\n */\nexport default class RopeGeometry extends MeshGeometry\n{\n    /**\n     * @param {number} [width=200] - The width (i.e., thickness) of the rope.\n     * @param {PIXI.Point[]} [points] - An array of {@link PIXI.Point} objects to construct this rope.\n     */\n    constructor(width = 200, points)\n    {\n        super(new Float32Array(points.length * 4),\n            new Float32Array(points.length * 4),\n            new Uint16Array((points.length - 1) * 6));\n\n        /**\n         * An array of points that determine the rope\n         * @member {PIXI.Point[]}\n         */\n        this.points = points;\n\n        /**\n         * The width (i.e., thickness) of the rope.\n         * @member {number}\n         * @readOnly\n         */\n        this.width = width;\n\n        this.build();\n    }\n    /**\n     * Refreshes Rope indices and uvs\n     * @private\n     */\n    build()\n    {\n        const points = this.points;\n\n        if (!points) return;\n\n        const vertexBuffer = this.getBuffer('aVertexPosition');\n        const uvBuffer = this.getBuffer('aTextureCoord');\n        const indexBuffer = this.getIndex();\n\n        // if too little points, or texture hasn't got UVs set yet just move on.\n        if (points.length < 1)\n        {\n            return;\n        }\n\n        // if the number of points has changed we will need to recreate the arraybuffers\n        if (vertexBuffer.data.length / 4 !== points.length)\n        {\n            vertexBuffer.data = new Float32Array(points.length * 4);\n            uvBuffer.data = new Float32Array(points.length * 4);\n            indexBuffer.data = new Uint16Array((points.length - 1) * 6);\n        }\n\n        const uvs = uvBuffer.data;\n        const indices = indexBuffer.data;\n\n        uvs[0] = 0;\n        uvs[1] = 0;\n        uvs[2] = 0;\n        uvs[3] = 1;\n\n        // indices[0] = 0;\n        // indices[1] = 1;\n\n        const total = points.length; // - 1;\n\n        for (let i = 0; i < total; i++)\n        {\n            // time to do some smart drawing!\n            const index = i * 4;\n            const amount = i / (total - 1);\n\n            uvs[index] = amount;\n            uvs[index + 1] = 0;\n\n            uvs[index + 2] = amount;\n            uvs[index + 3] = 1;\n        }\n\n        let indexCount = 0;\n\n        for (let i = 0; i < total - 1; i++)\n        {\n            const index = i * 2;\n\n            indices[indexCount++] = index;\n            indices[indexCount++] = index + 1;\n            indices[indexCount++] = index + 2;\n\n            indices[indexCount++] = index + 2;\n            indices[indexCount++] = index + 1;\n            indices[indexCount++] = index + 3;\n        }\n\n        // ensure that the changes are uploaded\n        uvBuffer.update();\n        indexBuffer.update();\n\n        this.updateVertices();\n    }\n\n    /**\n     * refreshes vertices of Rope mesh\n     */\n    updateVertices()\n    {\n        const points = this.points;\n\n        if (points.length < 1)\n        {\n            return;\n        }\n\n        let lastPoint = points[0];\n        let nextPoint;\n        let perpX = 0;\n        let perpY = 0;\n\n        // this.count -= 0.2;\n\n        const vertices = this.buffers[0].data;\n        const total = points.length;\n\n        for (let i = 0; i < total; i++)\n        {\n            const point = points[i];\n            const index = i * 4;\n\n            if (i < points.length - 1)\n            {\n                nextPoint = points[i + 1];\n            }\n            else\n            {\n                nextPoint = point;\n            }\n\n            perpY = -(nextPoint.x - lastPoint.x);\n            perpX = nextPoint.y - lastPoint.y;\n\n            let ratio = (1 - (i / (total - 1))) * 10;\n\n            if (ratio > 1)\n            {\n                ratio = 1;\n            }\n\n            const perpLength = Math.sqrt((perpX * perpX) + (perpY * perpY));\n            const num = this.width / 2; // (20 + Math.abs(Math.sin((i + this.count) * 0.3) * 50) )* ratio;\n\n            perpX /= perpLength;\n            perpY /= perpLength;\n\n            perpX *= num;\n            perpY *= num;\n\n            vertices[index] = point.x + perpX;\n            vertices[index + 1] = point.y + perpY;\n            vertices[index + 2] = point.x - perpX;\n            vertices[index + 3] = point.y - perpY;\n\n            lastPoint = point;\n        }\n\n        this.buffers[0].update();\n    }\n\n    update()\n    {\n        this.updateVertices();\n    }\n}\n","import { Mesh, MeshMaterial } from '@pixi/mesh';\nimport RopeGeometry from './geometry/RopeGeometry';\n\n/**\n * The rope allows you to draw a texture across several points and then manipulate these points\n *\n *```js\n * for (let i = 0; i < 20; i++) {\n *     points.push(new PIXI.Point(i * 50, 0));\n * };\n * let rope = new PIXI.SimpleRope(PIXI.Texture.from(\"snake.png\"), points);\n *  ```\n *\n * @class\n * @extends PIXI.Mesh\n * @memberof PIXI\n *\n */\nexport default class SimpleRope extends Mesh\n{\n    /**\n     * @param {PIXI.Texture} texture - The texture to use on the rope.\n     * @param {PIXI.Point[]} points - An array of {@link PIXI.Point} objects to construct this rope.\n     */\n    constructor(texture, points)\n    {\n        const ropeGeometry = new RopeGeometry(texture.height, points);\n        const meshMaterial = new MeshMaterial(texture);\n\n        super(ropeGeometry, meshMaterial);\n\n        /**\n         * re-calculate vertices by rope points each frame\n         *\n         * @member {boolean}\n         */\n        this.autoUpdate = true;\n    }\n\n    _render(renderer)\n    {\n        if (this.autoUpdate\n            || this.geometry.width !== this.shader.texture.height)\n        {\n            this.geometry.width = this.shader.texture.height;\n            this.geometry.update();\n        }\n\n        super._render(renderer);\n    }\n}\n","import { Texture } from '@pixi/core';\nimport { Mesh, MeshMaterial } from '@pixi/mesh';\nimport PlaneGeometry from './geometry/PlaneGeometry';\n\n/**\n * The SimplePlane allows you to draw a texture across several points and then manipulate these points\n *\n *```js\n * for (let i = 0; i < 20; i++) {\n *     points.push(new PIXI.Point(i * 50, 0));\n * };\n * let SimplePlane = new PIXI.SimplePlane(PIXI.Texture.from(\"snake.png\"), points);\n *  ```\n *\n * @class\n * @extends PIXI.Mesh\n * @memberof PIXI\n *\n */\nexport default class SimplePlane extends Mesh\n{\n    /**\n     * @param {PIXI.Texture} texture - The texture to use on the SimplePlane.\n     * @param {number} verticesX - The number of vertices in the x-axis\n     * @param {number} verticesY - The number of vertices in the y-axis\n     */\n    constructor(texture, verticesX, verticesY)\n    {\n        const planeGeometry = new PlaneGeometry(texture.width, texture.height, verticesX, verticesY);\n        const meshMaterial = new MeshMaterial(Texture.WHITE);\n\n        super(planeGeometry, meshMaterial);\n\n        // lets call the setter to ensure all necessary updates are performed\n        this.texture = texture;\n    }\n\n    /**\n     * Method used for overrides, to do something in case texture frame was changed.\n     * Meshes based on plane can override it and change more details based on texture.\n     */\n    textureUpdated()\n    {\n        this._textureID = this.shader.texture._updateID;\n\n        this.geometry.width = this.shader.texture.width;\n        this.geometry.height = this.shader.texture.height;\n\n        this.geometry.build();\n    }\n\n    set texture(value)\n    {\n        // Track texture same way sprite does.\n        // For generated meshes like NineSlicePlane it can change the geometry.\n        // Unfortunately, this method might not work if you directly change texture in material.\n\n        if (this.shader.texture === value)\n        {\n            return;\n        }\n\n        this.shader.texture = value;\n        this._textureID = -1;\n\n        if (value.baseTexture.valid)\n        {\n            this.textureUpdated();\n        }\n        else\n        {\n            value.once('update', this.textureUpdated, this);\n        }\n    }\n\n    get texture()\n    {\n        return this.shader.texture;\n    }\n\n    _render(renderer)\n    {\n        if (this._textureID !== this.shader.texture._updateID)\n        {\n            this.textureUpdated();\n        }\n\n        super._render(renderer);\n    }\n}\n","import { Mesh, MeshGeometry, MeshMaterial } from '@pixi/mesh';\nimport { Texture } from '@pixi/core';\n\n/**\n * The Simple Mesh class mimics Mesh in PixiJS v4, providing easy-to-use constructor arguments.\n * For more robust customization, use {@link PIXI.Mesh}.\n *\n * @class\n * @extends PIXI.Mesh\n * @memberof PIXI\n */\nexport default class SimpleMesh extends Mesh\n{\n    /**\n     * @param {PIXI.Texture} [texture=Texture.EMPTY] - The texture to use\n     * @param {Float32Array} [vertices] - if you want to specify the vertices\n     * @param {Float32Array} [uvs] - if you want to specify the uvs\n     * @param {Uint16Array} [indices] - if you want to specify the indices\n     * @param {number} [drawMode] - the drawMode, can be any of the Mesh.DRAW_MODES consts\n     */\n    constructor(texture = Texture.EMPTY, vertices, uvs, indices, drawMode)\n    {\n        const geometry = new MeshGeometry(vertices, uvs, indices);\n\n        geometry.getBuffer('aVertexPosition').static = false;\n\n        const meshMaterial = new MeshMaterial(texture);\n\n        super(geometry, meshMaterial, null, drawMode);\n\n        /**\n         * upload vertices buffer each frame\n         * @member {boolean}\n         */\n        this.autoUpdate = true;\n    }\n\n    /**\n     * Collection of vertices data.\n     * @member {Float32Array}\n     */\n    get vertices()\n    {\n        return this.geometry.getBuffer('aVertexPosition').data;\n    }\n    set vertices(value)\n    {\n        this.geometry.getBuffer('aVertexPosition').data = value;\n    }\n\n    _render(renderer)\n    {\n        if (this.autoUpdate)\n        {\n            this.geometry.getBuffer('aVertexPosition').update();\n        }\n\n        super._render(renderer);\n    }\n}\n","import { Texture } from '@pixi/core';\nimport SimplePlane from './SimplePlane';\n\nconst DEFAULT_BORDER_SIZE = 10;\n\n/**\n * The NineSlicePlane allows you to stretch a texture using 9-slice scaling. The corners will remain unscaled (useful\n * for buttons with rounded corners for example) and the other areas will be scaled horizontally and or vertically\n *\n *```js\n * let Plane9 = new PIXI.NineSlicePlane(PIXI.Texture.from('BoxWithRoundedCorners.png'), 15, 15, 15, 15);\n *  ```\n * <pre>\n *      A                          B\n *    +---+----------------------+---+\n *  C | 1 |          2           | 3 |\n *    +---+----------------------+---+\n *    |   |                      |   |\n *    | 4 |          5           | 6 |\n *    |   |                      |   |\n *    +---+----------------------+---+\n *  D | 7 |          8           | 9 |\n *    +---+----------------------+---+\n\n *  When changing this objects width and/or height:\n *     areas 1 3 7 and 9 will remain unscaled.\n *     areas 2 and 8 will be stretched horizontally\n *     areas 4 and 6 will be stretched vertically\n *     area 5 will be stretched both horizontally and vertically\n * </pre>\n *\n * @class\n * @extends PIXI.SimplePlane\n * @memberof PIXI\n *\n */\nexport default class NineSlicePlane extends SimplePlane\n{\n    /**\n     * @param {PIXI.Texture} texture - The texture to use on the NineSlicePlane.\n     * @param {number} [leftWidth=10] size of the left vertical bar (A)\n     * @param {number} [topHeight=10] size of the top horizontal bar (C)\n     * @param {number} [rightWidth=10] size of the right vertical bar (B)\n     * @param {number} [bottomHeight=10] size of the bottom horizontal bar (D)\n     */\n    constructor(texture, leftWidth, topHeight, rightWidth, bottomHeight)\n    {\n        super(Texture.WHITE, 4, 4);\n\n        this._origWidth = texture.orig.width;\n        this._origHeight = texture.orig.height;\n\n        /**\n         * The width of the NineSlicePlane, setting this will actually modify the vertices and UV's of this plane\n         *\n         * @member {number}\n         * @override\n         */\n        this._width = this._origWidth;\n\n        /**\n         * The height of the NineSlicePlane, setting this will actually modify the vertices and UV's of this plane\n         *\n         * @member {number}\n         * @override\n         */\n        this._height = this._origHeight;\n\n        /**\n         * The width of the left column (a)\n         *\n         * @member {number}\n         * @private\n         */\n        this._leftWidth = typeof leftWidth !== 'undefined' ? leftWidth : DEFAULT_BORDER_SIZE;\n\n        /**\n         * The width of the right column (b)\n         *\n         * @member {number}\n         * @private\n         */\n        this._rightWidth = typeof rightWidth !== 'undefined' ? rightWidth : DEFAULT_BORDER_SIZE;\n\n        /**\n         * The height of the top row (c)\n         *\n         * @member {number}\n         * @private\n         */\n        this._topHeight = typeof topHeight !== 'undefined' ? topHeight : DEFAULT_BORDER_SIZE;\n\n        /**\n         * The height of the bottom row (d)\n         *\n         * @member {number}\n         * @private\n         */\n        this._bottomHeight = typeof bottomHeight !== 'undefined' ? bottomHeight : DEFAULT_BORDER_SIZE;\n\n        // lets call the setter to ensure all necessary updates are performed\n        this.texture = texture;\n    }\n\n    textureUpdated()\n    {\n        this._textureID = this.shader.texture._updateID;\n        this._refresh();\n    }\n\n    get vertices()\n    {\n        return this.geometry.getBuffer('aVertexPosition').data;\n    }\n\n    set vertices(value)\n    {\n        this.geometry.getBuffer('aVertexPosition').data = value;\n    }\n\n    /**\n     * Updates the horizontal vertices.\n     *\n     */\n    updateHorizontalVertices()\n    {\n        const vertices = this.vertices;\n\n        const h = this._topHeight + this._bottomHeight;\n        const scale = this._height > h ? 1.0 : this._height / h;\n\n        vertices[9] = vertices[11] = vertices[13] = vertices[15] = this._topHeight * scale;\n        vertices[17] = vertices[19] = vertices[21] = vertices[23] = this._height - (this._bottomHeight * scale);\n        vertices[25] = vertices[27] = vertices[29] = vertices[31] = this._height;\n    }\n\n    /**\n     * Updates the vertical vertices.\n     *\n     */\n    updateVerticalVertices()\n    {\n        const vertices = this.vertices;\n\n        const w = this._leftWidth + this._rightWidth;\n        const scale = this._width > w ? 1.0 : this._width / w;\n\n        vertices[2] = vertices[10] = vertices[18] = vertices[26] = this._leftWidth * scale;\n        vertices[4] = vertices[12] = vertices[20] = vertices[28] = this._width - (this._rightWidth * scale);\n        vertices[6] = vertices[14] = vertices[22] = vertices[30] = this._width;\n    }\n\n    /**\n     * The width of the NineSlicePlane, setting this will actually modify the vertices and UV's of this plane\n     *\n     * @member {number}\n     */\n    get width()\n    {\n        return this._width;\n    }\n\n    set width(value) // eslint-disable-line require-jsdoc\n    {\n        this._width = value;\n        this._refresh();\n    }\n\n    /**\n     * The height of the NineSlicePlane, setting this will actually modify the vertices and UV's of this plane\n     *\n     * @member {number}\n     */\n    get height()\n    {\n        return this._height;\n    }\n\n    set height(value) // eslint-disable-line require-jsdoc\n    {\n        this._height = value;\n        this._refresh();\n    }\n\n    /**\n     * The width of the left column\n     *\n     * @member {number}\n     */\n    get leftWidth()\n    {\n        return this._leftWidth;\n    }\n\n    set leftWidth(value) // eslint-disable-line require-jsdoc\n    {\n        this._leftWidth = value;\n        this._refresh();\n    }\n\n    /**\n     * The width of the right column\n     *\n     * @member {number}\n     */\n    get rightWidth()\n    {\n        return this._rightWidth;\n    }\n\n    set rightWidth(value) // eslint-disable-line require-jsdoc\n    {\n        this._rightWidth = value;\n        this._refresh();\n    }\n\n    /**\n     * The height of the top row\n     *\n     * @member {number}\n     */\n    get topHeight()\n    {\n        return this._topHeight;\n    }\n\n    set topHeight(value) // eslint-disable-line require-jsdoc\n    {\n        this._topHeight = value;\n        this._refresh();\n    }\n\n    /**\n     * The height of the bottom row\n     *\n     * @member {number}\n     */\n    get bottomHeight()\n    {\n        return this._bottomHeight;\n    }\n\n    set bottomHeight(value) // eslint-disable-line require-jsdoc\n    {\n        this._bottomHeight = value;\n        this._refresh();\n    }\n\n    /**\n     * Refreshes NineSlicePlane coords. All of them.\n     */\n    _refresh()\n    {\n        const texture = this.texture;\n\n        const uvs = this.geometry.buffers[1].data;\n\n        this._origWidth = texture.orig.width;\n        this._origHeight = texture.orig.height;\n\n        const _uvw = 1.0 / this._origWidth;\n        const _uvh = 1.0 / this._origHeight;\n\n        uvs[0] = uvs[8] = uvs[16] = uvs[24] = 0;\n        uvs[1] = uvs[3] = uvs[5] = uvs[7] = 0;\n        uvs[6] = uvs[14] = uvs[22] = uvs[30] = 1;\n        uvs[25] = uvs[27] = uvs[29] = uvs[31] = 1;\n\n        uvs[2] = uvs[10] = uvs[18] = uvs[26] = _uvw * this._leftWidth;\n        uvs[4] = uvs[12] = uvs[20] = uvs[28] = 1 - (_uvw * this._rightWidth);\n        uvs[9] = uvs[11] = uvs[13] = uvs[15] = _uvh * this._topHeight;\n        uvs[17] = uvs[19] = uvs[21] = uvs[23] = 1 - (_uvh * this._bottomHeight);\n\n        this.updateHorizontalVertices();\n        this.updateVerticalVertices();\n\n        this.geometry.buffers[0].update();\n        this.geometry.buffers[1].update();\n    }\n}\n","import { Texture } from '@pixi/core';\nimport { Sprite } from '@pixi/sprite';\nimport { Ticker, UPDATE_PRIORITY } from '@pixi/ticker';\n\n/**\n * An AnimatedSprite is a simple way to display an animation depicted by a list of textures.\n *\n * ```js\n * let alienImages = [\"image_sequence_01.png\",\"image_sequence_02.png\",\"image_sequence_03.png\",\"image_sequence_04.png\"];\n * let textureArray = [];\n *\n * for (let i=0; i < 4; i++)\n * {\n *      let texture = PIXI.Texture.from(alienImages[i]);\n *      textureArray.push(texture);\n * };\n *\n * let animatedSprite = new PIXI.AnimatedSprite(textureArray);\n * ```\n *\n * The more efficient and simpler way to create an animated sprite is using a {@link PIXI.Spritesheet}\n * containing the animation definitions:\n *\n * ```js\n * PIXI.Loader.shared.add(\"assets/spritesheet.json\").load(setup);\n *\n * function setup() {\n *   let sheet = PIXI.Loader.shared.resources[\"assets/spritesheet.json\"].spritesheet;\n *   animatedSprite = new PIXI.AnimatedSprite(sheet.animations[\"image_sequence\"]);\n *   ...\n * }\n * ```\n *\n * @class\n * @extends PIXI.Sprite\n * @memberof PIXI\n */\nexport default class AnimatedSprite extends Sprite\n{\n    /**\n     * @param {PIXI.Texture[]|PIXI.AnimatedSprite.FrameObject[]} textures - An array of {@link PIXI.Texture} or frame\n     *  objects that make up the animation.\n     * @param {boolean} [autoUpdate=true] - Whether to use PIXI.Ticker.shared to auto update animation time.\n     */\n    constructor(textures, autoUpdate)\n    {\n        super(textures[0] instanceof Texture ? textures[0] : textures[0].texture);\n\n        /**\n         * @type {PIXI.Texture[]}\n         * @private\n         */\n        this._textures = null;\n\n        /**\n         * @type {number[]}\n         * @private\n         */\n        this._durations = null;\n\n        this.textures = textures;\n\n        /**\n         * `true` uses PIXI.Ticker.shared to auto update animation time.\n         * @type {boolean}\n         * @default true\n         * @private\n         */\n        this._autoUpdate = autoUpdate !== false;\n\n        /**\n         * The speed that the AnimatedSprite will play at. Higher is faster, lower is slower.\n         *\n         * @member {number}\n         * @default 1\n         */\n        this.animationSpeed = 1;\n\n        /**\n         * Whether or not the animate sprite repeats after playing.\n         *\n         * @member {boolean}\n         * @default true\n         */\n        this.loop = true;\n\n        /**\n         * Update anchor to [Texture's defaultAnchor]{@link PIXI.Texture#defaultAnchor} when frame changes.\n         *\n         * Useful with [sprite sheet animations]{@link PIXI.Spritesheet#animations} created with tools.\n         * Changing anchor for each frame allows to pin sprite origin to certain moving feature\n         * of the frame (e.g. left foot).\n         *\n         * Note: Enabling this will override any previously set `anchor` on each frame change.\n         *\n         * @member {boolean}\n         * @default false\n         */\n        this.updateAnchor = false;\n\n        /**\n         * Function to call when an AnimatedSprite finishes playing.\n         *\n         * @member {Function}\n         */\n        this.onComplete = null;\n\n        /**\n         * Function to call when an AnimatedSprite changes which texture is being rendered.\n         *\n         * @member {Function}\n         */\n        this.onFrameChange = null;\n\n        /**\n         * Function to call when `loop` is true, and an AnimatedSprite is played and loops around to start again.\n         *\n         * @member {Function}\n         */\n        this.onLoop = null;\n\n        /**\n         * Elapsed time since animation has been started, used internally to display current texture.\n         *\n         * @member {number}\n         * @private\n         */\n        this._currentTime = 0;\n\n        /**\n         * Indicates if the AnimatedSprite is currently playing.\n         *\n         * @member {boolean}\n         * @readonly\n         */\n        this.playing = false;\n    }\n\n    /**\n     * Stops the AnimatedSprite.\n     *\n     */\n    stop()\n    {\n        if (!this.playing)\n        {\n            return;\n        }\n\n        this.playing = false;\n        if (this._autoUpdate)\n        {\n            Ticker.shared.remove(this.update, this);\n        }\n    }\n\n    /**\n     * Plays the AnimatedSprite.\n     *\n     */\n    play()\n    {\n        if (this.playing)\n        {\n            return;\n        }\n\n        this.playing = true;\n        if (this._autoUpdate)\n        {\n            Ticker.shared.add(this.update, this, UPDATE_PRIORITY.HIGH);\n        }\n    }\n\n    /**\n     * Stops the AnimatedSprite and goes to a specific frame.\n     *\n     * @param {number} frameNumber - Frame index to stop at.\n     */\n    gotoAndStop(frameNumber)\n    {\n        this.stop();\n\n        const previousFrame = this.currentFrame;\n\n        this._currentTime = frameNumber;\n\n        if (previousFrame !== this.currentFrame)\n        {\n            this.updateTexture();\n        }\n    }\n\n    /**\n     * Goes to a specific frame and begins playing the AnimatedSprite.\n     *\n     * @param {number} frameNumber - Frame index to start at.\n     */\n    gotoAndPlay(frameNumber)\n    {\n        const previousFrame = this.currentFrame;\n\n        this._currentTime = frameNumber;\n\n        if (previousFrame !== this.currentFrame)\n        {\n            this.updateTexture();\n        }\n\n        this.play();\n    }\n\n    /**\n     * Updates the object transform for rendering.\n     *\n     * @private\n     * @param {number} deltaTime - Time since last tick.\n     */\n    update(deltaTime)\n    {\n        const elapsed = this.animationSpeed * deltaTime;\n        const previousFrame = this.currentFrame;\n\n        if (this._durations !== null)\n        {\n            let lag = this._currentTime % 1 * this._durations[this.currentFrame];\n\n            lag += elapsed / 60 * 1000;\n\n            while (lag < 0)\n            {\n                this._currentTime--;\n                lag += this._durations[this.currentFrame];\n            }\n\n            const sign = Math.sign(this.animationSpeed * deltaTime);\n\n            this._currentTime = Math.floor(this._currentTime);\n\n            while (lag >= this._durations[this.currentFrame])\n            {\n                lag -= this._durations[this.currentFrame] * sign;\n                this._currentTime += sign;\n            }\n\n            this._currentTime += lag / this._durations[this.currentFrame];\n        }\n        else\n        {\n            this._currentTime += elapsed;\n        }\n\n        if (this._currentTime < 0 && !this.loop)\n        {\n            this.gotoAndStop(0);\n\n            if (this.onComplete)\n            {\n                this.onComplete();\n            }\n        }\n        else if (this._currentTime >= this._textures.length && !this.loop)\n        {\n            this.gotoAndStop(this._textures.length - 1);\n\n            if (this.onComplete)\n            {\n                this.onComplete();\n            }\n        }\n        else if (previousFrame !== this.currentFrame)\n        {\n            if (this.loop && this.onLoop)\n            {\n                if (this.animationSpeed > 0 && this.currentFrame < previousFrame)\n                {\n                    this.onLoop();\n                }\n                else if (this.animationSpeed < 0 && this.currentFrame > previousFrame)\n                {\n                    this.onLoop();\n                }\n            }\n\n            this.updateTexture();\n        }\n    }\n\n    /**\n     * Updates the displayed texture to match the current frame index.\n     *\n     * @private\n     */\n    updateTexture()\n    {\n        this._texture = this._textures[this.currentFrame];\n        this._textureID = -1;\n        this._textureTrimmedID = -1;\n        this._cachedTint = 0xFFFFFF;\n        this.uvs = this._texture._uvs.uvsFloat32;\n\n        if (this.updateAnchor)\n        {\n            this._anchor.copyFrom(this._texture.defaultAnchor);\n        }\n\n        if (this.onFrameChange)\n        {\n            this.onFrameChange(this.currentFrame);\n        }\n    }\n\n    /**\n     * Stops the AnimatedSprite and destroys it.\n     *\n     * @param {object|boolean} [options] - Options parameter. A boolean will act as if all options\n     *  have been set to that value.\n     * @param {boolean} [options.children=false] - If set to true, all the children will have their destroy\n     *      method called as well. 'options' will be passed on to those calls.\n     * @param {boolean} [options.texture=false] - Should it destroy the current texture of the sprite as well.\n     * @param {boolean} [options.baseTexture=false] - Should it destroy the base texture of the sprite as well.\n     */\n    destroy(options)\n    {\n        this.stop();\n        super.destroy(options);\n\n        this.onComplete = null;\n        this.onFrameChange = null;\n        this.onLoop = null;\n    }\n\n    /**\n     * A short hand way of creating an AnimatedSprite from an array of frame ids.\n     *\n     * @static\n     * @param {string[]} frames - The array of frames ids the AnimatedSprite will use as its texture frames.\n     * @return {AnimatedSprite} The new animated sprite with the specified frames.\n     */\n    static fromFrames(frames)\n    {\n        const textures = [];\n\n        for (let i = 0; i < frames.length; ++i)\n        {\n            textures.push(Texture.from(frames[i]));\n        }\n\n        return new AnimatedSprite(textures);\n    }\n\n    /**\n     * A short hand way of creating an AnimatedSprite from an array of image ids.\n     *\n     * @static\n     * @param {string[]} images - The array of image urls the AnimatedSprite will use as its texture frames.\n     * @return {AnimatedSprite} The new animate sprite with the specified images as frames.\n     */\n    static fromImages(images)\n    {\n        const textures = [];\n\n        for (let i = 0; i < images.length; ++i)\n        {\n            textures.push(Texture.from(images[i]));\n        }\n\n        return new AnimatedSprite(textures);\n    }\n\n    /**\n     * The total number of frames in the AnimatedSprite. This is the same as number of textures\n     * assigned to the AnimatedSprite.\n     *\n     * @readonly\n     * @member {number}\n     * @default 0\n     */\n    get totalFrames()\n    {\n        return this._textures.length;\n    }\n\n    /**\n     * The array of textures used for this AnimatedSprite.\n     *\n     * @member {PIXI.Texture[]}\n     */\n    get textures()\n    {\n        return this._textures;\n    }\n\n    set textures(value) // eslint-disable-line require-jsdoc\n    {\n        if (value[0] instanceof Texture)\n        {\n            this._textures = value;\n            this._durations = null;\n        }\n        else\n        {\n            this._textures = [];\n            this._durations = [];\n\n            for (let i = 0; i < value.length; i++)\n            {\n                this._textures.push(value[i].texture);\n                this._durations.push(value[i].time);\n            }\n        }\n        this.gotoAndStop(0);\n        this.updateTexture();\n    }\n\n    /**\n    * The AnimatedSprites current frame index.\n    *\n    * @member {number}\n    * @readonly\n    */\n    get currentFrame()\n    {\n        let currentFrame = Math.floor(this._currentTime) % this._textures.length;\n\n        if (currentFrame < 0)\n        {\n            currentFrame += this._textures.length;\n        }\n\n        return currentFrame;\n    }\n}\n\n/**\n * @memberof PIXI.AnimatedSprite\n * @typedef {object} FrameObject\n * @type {object}\n * @property {PIXI.Texture} texture - The {@link PIXI.Texture} of the frame\n * @property {number} time - the duration of the frame in ms\n */\n","import '@pixi/polyfill';\n\nimport * as accessibility from '@pixi/accessibility';\nimport * as extract from '@pixi/extract';\nimport * as interaction from '@pixi/interaction';\nimport * as prepare from '@pixi/prepare';\nimport * as utils from '@pixi/utils';\nimport { Application } from '@pixi/app';\nimport { Renderer, BatchRenderer } from '@pixi/core';\nimport { Loader, AppLoaderPlugin } from '@pixi/loaders';\nimport { ParticleRenderer } from '@pixi/particles';\nimport { SpritesheetLoader } from '@pixi/spritesheet';\nimport { TilingSpriteRenderer } from '@pixi/sprite-tiling';\nimport { BitmapFontLoader } from '@pixi/text-bitmap';\nimport { TickerPlugin } from '@pixi/ticker';\nimport { AlphaFilter } from '@pixi/filter-alpha';\nimport { BlurFilter, BlurFilterPass } from '@pixi/filter-blur';\nimport { ColorMatrixFilter } from '@pixi/filter-color-matrix';\nimport { DisplacementFilter } from '@pixi/filter-displacement';\nimport { FXAAFilter } from '@pixi/filter-fxaa';\nimport { NoiseFilter } from '@pixi/filter-noise';\nimport '@pixi/mixin-cache-as-bitmap';\nimport '@pixi/mixin-get-child-by-name';\nimport '@pixi/mixin-get-global-position';\n\n// Export deprecations so Rollup can call it\n// in the footer after global is defined\n// other module must call this manually\nimport useDeprecated from './useDeprecated';\n\n// Install renderer plugins\nRenderer.registerPlugin('accessibility', accessibility.AccessibilityManager);\nRenderer.registerPlugin('extract', extract.Extract);\nRenderer.registerPlugin('interaction', interaction.InteractionManager);\nRenderer.registerPlugin('particle', ParticleRenderer);\nRenderer.registerPlugin('prepare', prepare.Prepare);\nRenderer.registerPlugin('batch', BatchRenderer);\nRenderer.registerPlugin('tilingSprite', TilingSpriteRenderer);\n\nLoader.registerPlugin(BitmapFontLoader);\nLoader.registerPlugin(SpritesheetLoader);\n\nApplication.registerPlugin(TickerPlugin);\nApplication.registerPlugin(AppLoaderPlugin);\n\n/**\n * String of the current PIXI version.\n *\n * @static\n * @constant\n * @memberof PIXI\n * @name VERSION\n * @type {string}\n */\nexport const VERSION = '__VERSION__';\n\n/**\n * @namespace PIXI\n */\n\n/**\n * This namespace contains WebGL-only display filters that can be applied\n * to DisplayObjects using the {@link PIXI.DisplayObject#filters filters} property.\n *\n * Since PixiJS only had a handful of built-in filters, additional filters\n * can be downloaded {@link https://github.com/pixijs/pixi-filters here} from the\n * PixiJS Filters repository.\n *\n * All filters must extend {@link PIXI.Filter}.\n *\n * @example\n * // Create a new application\n * const app = new PIXI.Application();\n *\n * // Draw a green rectangle\n * const rect = new PIXI.Graphics()\n *     .beginFill(0x00ff00)\n *     .drawRect(40, 40, 200, 200);\n *\n * // Add a blur filter\n * rect.filters = [new PIXI.filters.BlurFilter()];\n *\n * // Display rectangle\n * app.stage.addChild(rect);\n * document.body.appendChild(app.view);\n * @namespace PIXI.filters\n */\nexport const filters = {\n    AlphaFilter,\n    BlurFilter,\n    BlurFilterPass,\n    ColorMatrixFilter,\n    DisplacementFilter,\n    FXAAFilter,\n    NoiseFilter,\n};\n\n// Export ES for those importing specifically by name,\nexport * from '@pixi/app';\nexport * from '@pixi/constants';\nexport * from '@pixi/core';\nexport * from '@pixi/display';\nexport * from '@pixi/graphics';\nexport * from '@pixi/loaders';\nexport * from '@pixi/math';\nexport * from '@pixi/mesh';\nexport * from '@pixi/mesh-extras';\nexport * from '@pixi/particles';\nexport * from '@pixi/runner';\nexport * from '@pixi/sprite';\nexport * from '@pixi/spritesheet';\nexport * from '@pixi/sprite-animated';\nexport * from '@pixi/sprite-tiling';\nexport * from '@pixi/text';\nexport * from '@pixi/text-bitmap';\nexport * from '@pixi/ticker';\nexport * from '@pixi/settings';\nexport {\n    accessibility,\n    extract,\n    interaction,\n    prepare,\n    utils,\n    useDeprecated,\n};\n"],"names":["define","global","this","arguments","Polyfill","const","let","isMobile","match","majorVersion","hasOwnProperty","require$$0","require$$1","sign","url","_url","prototypeAccessors","i","staticAccessors","super","EventEmitter","Texture","resolution","width","height","UID","map","j","byteSizeMap","defaultVertex","defaultFragment","BLEND","OFFSET","CULLING","DEPTH_TEST","WINDING","displayObject","buildLine","earcut","data","style","index","radius","len","_noop","eachSeries","array","iterator","callback","deferNext","length","next","err","setTimeout","onlyOnce","fn","onceWrapper","Error","callFn","apply","queue","worker","concurrency","workers","q","_tasks","saturated","unsaturated","buffer","empty","drain","error","started","paused","push","_insert","kill","unshift","process","task","shift","_next","running","idle","pause","resume","w","insertAtFront","item","cache","caching","resource","complete","onComplete","once","useXdr","window","XDomainRequest","XMLHttpRequest","tempAnchor","STATUS_NONE","STATUS_OK","STATUS_EMPTY","STATUS_IE_BUG_EMPTY","STATUS_TYPE_OK","Resource","setExtensionLoadType","extname","loadType","setExtMap","_loadTypeMap","setExtensionXhrType","xhrType","_xhrTypeMap","name","options","_flags","_setFlag","STATUS_FLAGS","DATA_URL","indexOf","extension","_getExtension","crossOrigin","timeout","_determineLoadType","metadata","xhr","children","type","TYPE","UNKNOWN","progressChunk","_dequeue","_onLoadBinding","_elementTimer","_boundComplete","bind","_boundOnError","_onError","_boundOnProgress","_onProgress","_boundOnTimeout","_onTimeout","_boundXhrOnError","_xhrOnError","_boundXhrOnTimeout","_xhrOnTimeout","_boundXhrOnAbort","_xhrOnAbort","_boundXhrOnLoad","_xhrOnLoad","onStart","Signal","onProgress","onAfterMiddleware","_clearEvents","_finish","abort","message","xdr","src","EMPTY_GIF","firstChild","removeChild","load","cb","isLoading","isComplete","LOADING","dispatch","_determineCrossOrigin","LOAD_TYPE","IMAGE","_loadElement","AUDIO","_loadSourceElement","VIDEO","XHR","_loadXdr","_loadXhr","_hasFlag","flag","value","clearTimeout","removeEventListener","onerror","ontimeout","onprogress","onload","COMPLETE","loadElement","Image","document","createElement","skipSource","addEventListener","Audio","navigator","isCocoonJS","Array","isArray","mimeTypes","mimeType","appendChild","_createSource","_determineXhrType","open","XHR_RESPONSE_TYPE","JSON","DOCUMENT","responseType","TEXT","send","mime","source","event","target","nodeName","lengthComputable","loaded","total","reqType","status","statusText","text","responseText","BUFFER","statusType","parse","e","DOMParser","domparser","parseFromString","div","innerHTML","XML","response","responseURL","loc","origin","location","href","parseUri","strictMode","samePort","port","protocol","host","hostname","ext","isDataUrl","slashIndex","substring","queryStart","hashStart","Math","min","lastIndexOf","toLowerCase","_getMimeFromXhrType","BLOB","DEFAULT","NONE","gif","png","bmp","jpg","jpeg","tif","tiff","webp","tga","svg","mp3","ogg","wav","mp4","webm","xhtml","html","htm","xml","tmx","tsx","json","txt","ttf","otf","val","toString","replace","_keyStr","encodeBinary","input","output","inx","bytebuffer","encodedCharIndexes","jnx","charCodeAt","paddingBytes","charAt","Url","URL","webkitURL","parsing","Blob","getResponseHeader","createObjectURL","blob","revokeObjectURL","MAX_PROGRESS","rgxExtractUrlHash","Loader","baseUrl","progress","loading","defaultQueryString","_beforeMiddleware","_afterMiddleware","_resourcesParsing","_boundLoadResource","r","d","_loadResource","_queue","async","resources","onError","onLoad","_defaultBeforeMiddleware","pre","_defaultAfterMiddleware","use","add","key","parentResource","_prepareUrl","parent","incompleteChildren","fullChunk","eachChunk","reset","k","res","detach","_onStart","_onComplete","numTasks","chunk","parsedUrl","result","path","hash","exec","substr","dequeue","call","_onLoad","splice","LoaderPreStatic","LoaderUseStatic","ResourceLoader","middleware","property","vertex","fragment","tempPoint","tempMat","fragTemplate","defaultFilterVertex","accessibility.AccessibilityManager","extract.Extract","interaction.InteractionManager","prepare.Prepare","VERSION"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAA,CAAC,SAAS,MAAM,CAAC;;;;;;CAMjB,IAAI,aAAa,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;CACtC,IAAI,sBAAsB;GACxB,aAAa;;;GAGb,SAAS,IAAI,aAAa;GAC1B,QAAQ,IAAI,aAAa;GACzB,KAAK,IAAI,aAAa;GACtB,MAAM,IAAI,aAAa;;;GAGvB,CAAC,UAAU;KACT,IAAI,OAAO,CAAC;KACZ,IAAI,aAAa,CAAC,SAAS,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;KAC/C,OAAO,OAAO,OAAO,KAAK,UAAU,CAAC;IACtC,GAAG,CAAC;;;;;;;CAOP,IAAI,QAAc,KAAK,WAAW,IAAI,OAAO;CAC7C;;GAEE,eAAe,GAAG,sBAAsB,GAAG,aAAa,GAAG,OAAO,CAAC;GACnE,gBAAgB,GAAG,OAAO,CAAC;EAC5B;;CAED;;GAEE,IAAI,OAAOA,SAAM,IAAI,UAAU,IAAIA,SAAM,CAAC,GAAG;GAC7C;KACEA,SAAM,CAAC,UAAU;OACf,OAAO,sBAAsB,GAAG,aAAa,GAAG,OAAO,CAAC;MACzD,CAAC,CAAC;IACJ;;GAED;;KAEE,IAAI,CAAC,sBAAsB;SACzB,MAAM,CAAC,SAAS,CAAC,GAAG,OAAO,GAAC;IAC/B;EACF;;;;;;;CAOD,IAAI,OAAO,GAAG,SAAS,CAAC;CACxB,IAAI,MAAM,GAAG,QAAQ,CAAC;CACtB,IAAI,SAAS,GAAG,WAAW,CAAC;CAC5B,IAAI,QAAQ,GAAG,UAAU,CAAC;CAC1B,IAAI,IAAI,GAAG,UAAU,EAAE,CAAC;;CAExB,SAAS,OAAO,CAAC,KAAK,EAAE;GACtB,OAAO,MA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AAC;CAChD,QAAQ,CAAC,cAAc,CAAC,cAAc,EAAE,oBAAoB,CAAC,CAAC;;AAE9D7D,SAAM,CAAC,cAAc,CAAC,gBAAgB,CAAC,CAAC;AACxCA,SAAM,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAC;;CAEzC,WAAW,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC;CACzC,WAAW,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC;;;;;;;;;;;AAW5C,AAAY,KAAC8D,SAAO,GAAG,OAAa,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCrC,AAAY,KAAC,OAAO,GAAG;kBACnB,WAAW;iBACX,UAAU;qBACV,cAAc;wBACd,iBAAiB;yBACjB,kBAAkB;iBAClB,UAAU;kBACV,WAAW;EACd;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
\ No newline at end of file
diff --git a/js/pixi.min.5.js b/js/pixi.min.5.js
new file mode 100644
index 0000000..a6b9d86
--- /dev/null
+++ b/js/pixi.min.5.js
@@ -0,0 +1,9 @@
+/*!
+ * pixi.js - v5.1.4
+ * Compiled Fri, 20 Sep 2019 17:22:13 UTC
+ *
+ * pixi.js is licensed under the MIT License.
+ * http://www.opensource.org/licenses/mit-license
+ */
+var PIXI=function(t){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(t,e){return t(e={exports:{}},e.exports),e.exports}var r=i(function(t,i){!function(t){var e=t.Promise,r=e&&"resolve"in e&&"reject"in e&&"all"in e&&"race"in e&&function(){var t;return new e(function(e){t=e}),"function"==typeof t}();i?(i.Promise=r?e:w,i.Polyfill=w):r||(t.Promise=w);var n="pending",o="sealed",s="fulfilled",a="rejected",h=function(){};function u(t){return"[object Array]"===Object.prototype.toString.call(t)}var l,c="undefined"!=typeof setImmediate?setImmediate:setTimeout,d=[];function p(){for(var t=0;t<d.length;t++)d[t][0](d[t][1]);d=[],l=!1}function f(t,e){d.push([t,e]),l||(l=!0,c(p,0))}function v(t){var e=t.owner,i=e.state_,r=e.data_,n=t[i],o=t.then;if("function"==typeof n){i=s;try{r=n(r)}catch(t){_(o,t)}}g(o,r)||(i===s&&m(o,r),i===a&&_(o,r))}function g(t,e){var i;try{if(t===e)throw new TypeError("A promises callback cannot return that same promise.");if(e&&("function"==typeof e||"object"==typeof e)){var r=e.then;if("function"==typeof r)return r.call(e,function(r){i||(i=!0,e!==r?m(t,r):y(t,r))},function(e){i||(i=!0,_(t,e))}),!0}}catch(e){return i||_(t,e),!0}return!1}function m(t,e){t!==e&&g(t,e)||y(t,e)}function y(t,e){t.state_===n&&(t.state_=o,t.data_=e,f(b,t))}function _(t,e){t.state_===n&&(t.state_=o,t.data_=e,f(T,t))}function x(t){var e=t.then_;t.then_=void 0;for(var i=0;i<e.length;i++)v(e[i])}function b(t){t.state_=s,x(t)}function T(t){t.state_=a,x(t)}function w(t){if("function"!=typeof t)throw new TypeError("Promise constructor takes a function argument");if(this instanceof w==!1)throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this.then_=[],function(t,e){function i(t){_(e,t)}try{t(function(t){m(e,t)},i)}catch(t){i(t)}}(t,this)}w.prototype={constructor:w,state_:n,then_:null,data_:void 0,then:function(t,e){var i={owner:this,then:new this.constructor(h),fulfilled:t,rejected:e};return this.state_===s||this.state_===a?f(v,i):this.then_.push(i),i.then},catch:function(t){return this.then(null,t)}},w.all=function(t){if(!u(t))throw new TypeError("You must pass an array to Promise.all().");return new this(function(e,i){var r=[],n=0;function o(t){return n++,function(i){r[t]=i,--n||e(r)}}for(var s,a=0;a<t.length;a++)(s=t[a])&&"function"==typeof s.then?s.then(o(a),i):r[a]=s;n||e(r)})},w.race=function(t){if(!u(t))throw new TypeError("You must pass an array to Promise.race().");return new this(function(e,i){for(var r,n=0;n<t.length;n++)(r=t[n])&&"function"==typeof r.then?r.then(e,i):e(r)})},w.resolve=function(t){return t&&"object"==typeof t&&t.constructor===this?t:new this(function(e){e(t)})},w.reject=function(t){return new this(function(e,i){i(t)})}}("undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:e)}),n=(r.Promise,r.Polyfill),o=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;var h=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={},i=0;i<10;i++)e["_"+String.fromCharCode(i)]=i;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(t){r[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var i,r,n=arguments,h=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),u=1;u<arguments.length;u++){for(var l in i=Object(n[u]))s.call(i,l)&&(h[l]=i[l]);if(o){r=o(i);for(var c=0;c<r.length;c++)a.call(i,r[c])&&(h[r[c]]=i[r[c]])}}return h};window.Promise||(window.Promise=n),Object.assign||(Object.assign=h);var u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};if(Date.now&&Date.prototype.getTime||(Date.now=function(){return(new Date).getTime()}),!u.performance||!u.performance.now){var l=Date.now();u.performance||(u.performance={}),u.performance.now=function(){return Date.now()-l}}for(var c=Date.now(),d=["ms","moz","webkit","o"],p=0;p<d.length&&!u.requestAnimationFrame;++p){var f=d[p];u.requestAnimationFrame=u[f+"RequestAnimationFrame"],u.cancelAnimationFrame=u[f+"CancelAnimationFrame"]||u[f+"CancelRequestAnimationFrame"]}u.requestAnimationFrame||(u.requestAnimationFrame=function(t){if("function"!=typeof t)throw new TypeError(t+"is not a function");var e=Date.now(),i=16+c-e;return i<0&&(i=0),c=e,setTimeout(function(){c=Date.now(),t(performance.now())},i)}),u.cancelAnimationFrame||(u.cancelAnimationFrame=function(t){return clearTimeout(t)}),Math.sign||(Math.sign=function(t){return 0===(t=Number(t))||isNaN(t)?t:t>0?1:-1}),Number.isInteger||(Number.isInteger=function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}),window.ArrayBuffer||(window.ArrayBuffer=Array),window.Float32Array||(window.Float32Array=Array),window.Uint32Array||(window.Uint32Array=Array),window.Uint16Array||(window.Uint16Array=Array),window.Uint8Array||(window.Uint8Array=Array),window.Int32Array||(window.Int32Array=Array);var v=i(function(t){!function(e){var i=/iPhone/i,r=/iPod/i,n=/iPad/i,o=/\bAndroid(?:.+)Mobile\b/i,s=/Android/i,a=/\bAndroid(?:.+)SD4930UR\b/i,h=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,u=/Windows Phone/i,l=/\bWindows(?:.+)ARM\b/i,c=/BlackBerry/i,d=/BB10/i,p=/Opera Mini/i,f=/\b(CriOS|Chrome)(?:.+)Mobile/i,v=/Mobile(?:.+)Firefox\b/i;function g(t,e){return t.test(e)}function m(t){var e=t||("undefined"!=typeof navigator?navigator.userAgent:""),m=e.split("[FBAN");void 0!==m[1]&&(e=m[0]),void 0!==(m=e.split("Twitter"))[1]&&(e=m[0]);var y={apple:{phone:g(i,e)&&!g(u,e),ipod:g(r,e),tablet:!g(i,e)&&g(n,e)&&!g(u,e),device:(g(i,e)||g(r,e)||g(n,e))&&!g(u,e)},amazon:{phone:g(a,e),tablet:!g(a,e)&&g(h,e),device:g(a,e)||g(h,e)},android:{phone:!g(u,e)&&g(a,e)||!g(u,e)&&g(o,e),tablet:!g(u,e)&&!g(a,e)&&!g(o,e)&&(g(h,e)||g(s,e)),device:!g(u,e)&&(g(a,e)||g(h,e)||g(o,e)||g(s,e))||g(/\bokhttp\b/i,e)},windows:{phone:g(u,e),tablet:g(l,e),device:g(u,e)||g(l,e)},other:{blackberry:g(c,e),blackberry10:g(d,e),opera:g(p,e),firefox:g(v,e),chrome:g(f,e),device:g(c,e)||g(d,e)||g(p,e)||g(v,e)||g(f,e)}};return y.any=y.apple.device||y.android.device||y.windows.device||y.other.device,y.phone=y.apple.phone||y.android.phone||y.windows.phone,y.tablet=y.apple.tablet||y.android.tablet||y.windows.tablet,y}t.exports&&"undefined"==typeof window?t.exports=m:t.exports&&"undefined"!=typeof window?(t.exports=m(),t.exports.isMobile=m):e.isMobile=m()}(e)});v.isMobile;var g={MIPMAP_TEXTURES:1,ANISOTROPIC_LEVEL:0,RESOLUTION:1,FILTER_RESOLUTION:1,SPRITE_MAX_TEXTURES:function(t){var e=!0;if(v.tablet||v.phone){if(e=!1,v.apple.device){var i=navigator.userAgent.match(/OS (\d+)_(\d+)?/);i&&parseInt(i[1],10)>=11&&(e=!0)}if(v.android.device){var r=navigator.userAgent.match(/Android\s([0-9.]*)/);r&&parseInt(r[1],10)>=7&&(e=!0)}}return e?t:4}(32),SPRITE_BATCH_SIZE:4096,RENDER_OPTIONS:{view:null,antialias:!1,forceFXAA:!1,autoDensity:!1,transparent:!1,backgroundColor:0,clearBeforeRender:!0,preserveDrawingBuffer:!1,width:800,height:600,legacy:!1},GC_MODE:0,GC_MAX_IDLE:3600,GC_MAX_CHECK_COUNT:600,WRAP_MODE:33071,SCALE_MODE:1,PRECISION_VERTEX:"highp",PRECISION_FRAGMENT:v.apple.device?"highp":"mediump",CAN_UPLOAD_SAME_BUFFER:!v.apple.device,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1},m=i(function(t){var e=Object.prototype.hasOwnProperty,i="~";function r(){}function n(t,e,i){this.fn=t,this.context=e,this.once=i||!1}function o(t,e,r,o,s){if("function"!=typeof r)throw new TypeError("The listener must be a function");var a=new n(r,o||t,s),h=i?i+e:e;return t._events[h]?t._events[h].fn?t._events[h]=[t._events[h],a]:t._events[h].push(a):(t._events[h]=a,t._eventsCount++),t}function s(t,e){0==--t._eventsCount?t._events=new r:delete t._events[e]}function a(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(i=!1)),a.prototype.eventNames=function(){var t,r,n=[];if(0===this._eventsCount)return n;for(r in t=this._events)e.call(t,r)&&n.push(i?r.slice(1):r);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},a.prototype.listeners=function(t){var e=i?i+t:t,r=this._events[e];if(!r)return[];if(r.fn)return[r.fn];for(var n=0,o=r.length,s=new Array(o);n<o;n++)s[n]=r[n].fn;return s},a.prototype.listenerCount=function(t){var e=i?i+t:t,r=this._events[e];return r?r.fn?1:r.length:0},a.prototype.emit=function(t,e,r,n,o,s){var a=arguments,h=i?i+t:t;if(!this._events[h])return!1;var u,l,c=this._events[h],d=arguments.length;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),d){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,e),!0;case 3:return c.fn.call(c.context,e,r),!0;case 4:return c.fn.call(c.context,e,r,n),!0;case 5:return c.fn.call(c.context,e,r,n,o),!0;case 6:return c.fn.call(c.context,e,r,n,o,s),!0}for(l=1,u=new Array(d-1);l<d;l++)u[l-1]=a[l];c.fn.apply(c.context,u)}else{var p,f=c.length;for(l=0;l<f;l++)switch(c[l].once&&this.removeListener(t,c[l].fn,void 0,!0),d){case 1:c[l].fn.call(c[l].context);break;case 2:c[l].fn.call(c[l].context,e);break;case 3:c[l].fn.call(c[l].context,e,r);break;case 4:c[l].fn.call(c[l].context,e,r,n);break;default:if(!u)for(p=1,u=new Array(d-1);p<d;p++)u[p-1]=a[p];c[l].fn.apply(c[l].context,u)}}return!0},a.prototype.on=function(t,e,i){return o(this,t,e,i,!1)},a.prototype.once=function(t,e,i){return o(this,t,e,i,!0)},a.prototype.removeListener=function(t,e,r,n){var o=i?i+t:t;if(!this._events[o])return this;if(!e)return s(this,o),this;var a=this._events[o];if(a.fn)a.fn!==e||n&&!a.once||r&&a.context!==r||s(this,o);else{for(var h=0,u=[],l=a.length;h<l;h++)(a[h].fn!==e||n&&!a[h].once||r&&a[h].context!==r)&&u.push(a[h]);u.length?this._events[o]=1===u.length?u[0]:u:s(this,o)}return this},a.prototype.removeAllListeners=function(t){var e;return t?(e=i?i+t:t,this._events[e]&&s(this,e)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=i,a.EventEmitter=a,t.exports=a}),y=x,_=x;function x(t,e,i){i=i||2;var r,n,o,s,a,h,u,l=e&&e.length,c=l?e[0]*i:t.length,d=b(t,0,c,i,!0),p=[];if(!d||d.next===d.prev)return p;if(l&&(d=function(t,e,i,r){var n,o,s,a,h,u=[];for(n=0,o=e.length;n<o;n++)s=e[n]*r,a=n<o-1?e[n+1]*r:t.length,(h=b(t,s,a,r,!1))===h.next&&(h.steiner=!0),u.push(D(h));for(u.sort(A),n=0;n<u.length;n++)O(u[n],i),i=T(i,i.next);return i}(t,e,d,i)),t.length>80*i){r=o=t[0],n=s=t[1];for(var f=i;f<c;f+=i)(a=t[f])<r&&(r=a),(h=t[f+1])<n&&(n=h),a>o&&(o=a),h>s&&(s=h);u=0!==(u=Math.max(o-r,s-n))?1/u:0}return w(d,p,i,r,n,u),p}function b(t,e,i,r,n){var o,s;if(n===V(t,e,i,r)>0)for(o=e;o<i;o+=r)s=G(o,t[o],t[o+1],s);else for(o=i-r;o>=e;o-=r)s=G(o,t[o],t[o+1],s);return s&&N(s,s.next)&&(H(s),s=s.next),s}function T(t,e){if(!t)return t;e||(e=t);var i,r=t;do{if(i=!1,r.steiner||!N(r,r.next)&&0!==L(r.prev,r,r.next))r=r.next;else{if(H(r),(r=e=r.prev)===r.next)break;i=!0}}while(i||r!==e);return e}function w(t,e,i,r,n,o,s){if(t){!s&&o&&function(t,e,i,r){var n=t;do{null===n.z&&(n.z=M(n.x,n.y,e,i,r)),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,i,r,n,o,s,a,h,u=1;do{for(i=t,t=null,o=null,s=0;i;){for(s++,r=i,a=0,e=0;e<u&&(a++,r=r.nextZ);e++);for(h=u;a>0||h>0&&r;)0!==a&&(0===h||!r||i.z<=r.z)?(n=i,i=i.nextZ,a--):(n=r,r=r.nextZ,h--),o?o.nextZ=n:t=n,n.prevZ=o,o=n;i=r}o.nextZ=null,u*=2}while(s>1)}(n)}(t,r,n,o);for(var a,h,u=t;t.prev!==t.next;)if(a=t.prev,h=t.next,o?S(t,r,n,o):E(t))e.push(a.i/i),e.push(t.i/i),e.push(h.i/i),H(t),t=h.next,u=h.next;else if((t=h)===u){s?1===s?w(t=I(T(t),e,i),e,i,r,n,o,2):2===s&&P(t,e,i,r,n,o):w(T(t),e,i,r,n,o,1);break}}}function E(t){var e=t.prev,i=t,r=t.next;if(L(e,i,r)>=0)return!1;for(var n=t.next.next;n!==t.prev;){if(R(e.x,e.y,i.x,i.y,r.x,r.y,n.x,n.y)&&L(n.prev,n,n.next)>=0)return!1;n=n.next}return!0}function S(t,e,i,r){var n=t.prev,o=t,s=t.next;if(L(n,o,s)>=0)return!1;for(var a=n.x<o.x?n.x<s.x?n.x:s.x:o.x<s.x?o.x:s.x,h=n.y<o.y?n.y<s.y?n.y:s.y:o.y<s.y?o.y:s.y,u=n.x>o.x?n.x>s.x?n.x:s.x:o.x>s.x?o.x:s.x,l=n.y>o.y?n.y>s.y?n.y:s.y:o.y>s.y?o.y:s.y,c=M(a,h,e,i,r),d=M(u,l,e,i,r),p=t.prevZ,f=t.nextZ;p&&p.z>=c&&f&&f.z<=d;){if(p!==t.prev&&p!==t.next&&R(n.x,n.y,o.x,o.y,s.x,s.y,p.x,p.y)&&L(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,f!==t.prev&&f!==t.next&&R(n.x,n.y,o.x,o.y,s.x,s.y,f.x,f.y)&&L(f.prev,f,f.next)>=0)return!1;f=f.nextZ}for(;p&&p.z>=c;){if(p!==t.prev&&p!==t.next&&R(n.x,n.y,o.x,o.y,s.x,s.y,p.x,p.y)&&L(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;f&&f.z<=d;){if(f!==t.prev&&f!==t.next&&R(n.x,n.y,o.x,o.y,s.x,s.y,f.x,f.y)&&L(f.prev,f,f.next)>=0)return!1;f=f.nextZ}return!0}function I(t,e,i){var r=t;do{var n=r.prev,o=r.next.next;!N(n,o)&&B(n,r,r.next,o)&&X(n,o)&&X(o,n)&&(e.push(n.i/i),e.push(r.i/i),e.push(o.i/i),H(r),H(r.next),r=t=o),r=r.next}while(r!==t);return T(r)}function P(t,e,i,r,n,o){var s=t;do{for(var a=s.next.next;a!==s.prev;){if(s.i!==a.i&&F(s,a)){var h=j(s,a);return s=T(s,s.next),h=T(h,h.next),w(s,e,i,r,n,o),void w(h,e,i,r,n,o)}a=a.next}s=s.next}while(s!==t)}function A(t,e){return t.x-e.x}function O(t,e){if(e=function(t,e){var i,r=e,n=t.x,o=t.y,s=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var a=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(a<=n&&a>s){if(s=a,a===n){if(o===r.y)return r;if(o===r.next.y)return r.next}i=r.x<r.next.x?r:r.next}}r=r.next}while(r!==e);if(!i)return null;if(n===s)return i;var h,u=i,l=i.x,c=i.y,d=1/0;r=i;do{n>=r.x&&r.x>=l&&n!==r.x&&R(o<c?n:s,o,l,c,o<c?s:n,o,r.x,r.y)&&(h=Math.abs(o-r.y)/(n-r.x),X(r,t)&&(h<d||h===d&&(r.x>i.x||r.x===i.x&&C(i,r)))&&(i=r,d=h)),r=r.next}while(r!==u);return i}(t,e)){var i=j(e,t);T(i,i.next)}}function C(t,e){return L(t.prev,t,e.prev)<0&&L(e.next,t,t.next)<0}function M(t,e,i,r,n){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)*n)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*n)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function D(t){var e=t,i=t;do{(e.x<i.x||e.x===i.x&&e.y<i.y)&&(i=e),e=e.next}while(e!==t);return i}function R(t,e,i,r,n,o,s,a){return(n-s)*(e-a)-(t-s)*(o-a)>=0&&(t-s)*(r-a)-(i-s)*(e-a)>=0&&(i-s)*(o-a)-(n-s)*(r-a)>=0}function F(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var i=t;do{if(i.i!==t.i&&i.next.i!==t.i&&i.i!==e.i&&i.next.i!==e.i&&B(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&(X(t,e)&&X(e,t)&&function(t,e){var i=t,r=!1,n=(t.x+e.x)/2,o=(t.y+e.y)/2;do{i.y>o!=i.next.y>o&&i.next.y!==i.y&&n<(i.next.x-i.x)*(o-i.y)/(i.next.y-i.y)+i.x&&(r=!r),i=i.next}while(i!==t);return r}(t,e)&&(L(t.prev,t,e.prev)||L(t,e.prev,e))||N(t,e)&&L(t.prev,t,t.next)>0&&L(e.prev,e,e.next)>0)}function L(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function N(t,e){return t.x===e.x&&t.y===e.y}function B(t,e,i,r){var n=k(L(t,e,i)),o=k(L(t,e,r)),s=k(L(i,r,t)),a=k(L(i,r,e));return n!==o&&s!==a||(!(0!==n||!U(t,i,e))||(!(0!==o||!U(t,r,e))||(!(0!==s||!U(i,t,r))||!(0!==a||!U(i,e,r)))))}function U(t,e,i){return e.x<=Math.max(t.x,i.x)&&e.x>=Math.min(t.x,i.x)&&e.y<=Math.max(t.y,i.y)&&e.y>=Math.min(t.y,i.y)}function k(t){return t>0?1:t<0?-1:0}function X(t,e){return L(t.prev,t,t.next)<0?L(t,e,t.next)>=0&&L(t,t.prev,e)>=0:L(t,e,t.prev)<0||L(t,t.next,e)<0}function j(t,e){var i=new z(t.i,t.x,t.y),r=new z(e.i,e.x,e.y),n=t.next,o=e.prev;return t.next=e,e.prev=t,i.next=n,n.prev=i,r.next=i,i.prev=r,o.next=r,r.prev=o,r}function G(t,e,i,r){var n=new z(t,e,i);return r?(n.next=r.next,n.prev=r,r.next.prev=n,r.next=n):(n.prev=n,n.next=n),n}function H(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 z(t,e,i){this.i=t,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function V(t,e,i,r){for(var n=0,o=e,s=i-r;o<i;o+=r)n+=(t[s]-t[o])*(t[o+1]+t[s+1]),s=o;return n}x.deviation=function(t,e,i,r){var n=e&&e.length,o=n?e[0]*i:t.length,s=Math.abs(V(t,0,o,i));if(n)for(var a=0,h=e.length;a<h;a++){var u=e[a]*i,l=a<h-1?e[a+1]*i:t.length;s-=Math.abs(V(t,u,l,i))}var c=0;for(a=0;a<r.length;a+=3){var d=r[a]*i,p=r[a+1]*i,f=r[a+2]*i;c+=Math.abs((t[d]-t[f])*(t[p+1]-t[d+1])-(t[d]-t[p])*(t[f+1]-t[d+1]))}return 0===s&&0===c?0:Math.abs((c-s)/s)},x.flatten=function(t){for(var e=t[0][0].length,i={vertices:[],holes:[],dimensions:e},r=0,n=0;n<t.length;n++){for(var o=0;o<t[n].length;o++)for(var s=0;s<e;s++)i.vertices.push(t[n][o][s]);n>0&&(r+=t[n-1].length,i.holes.push(r))}return i},y.default=_;var Y=i(function(t,i){!function(r){var n=i&&!i.nodeType&&i,o=t&&!t.nodeType&&t,s="object"==typeof e&&e;s.global!==s&&s.window!==s&&s.self!==s||(r=s);var a,h,u=2147483647,l=36,c=1,d=26,p=38,f=700,v=72,g=128,m="-",y=/^xn--/,_=/[^\x20-\x7E]/,x=/[\x2E\u3002\uFF0E\uFF61]/g,b={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},T=l-c,w=Math.floor,E=String.fromCharCode;function S(t){throw RangeError(b[t])}function I(t,e){for(var i=t.length,r=[];i--;)r[i]=e(t[i]);return r}function P(t,e){var i=t.split("@"),r="";return i.length>1&&(r=i[0]+"@",t=i[1]),r+I((t=t.replace(x,".")).split("."),e).join(".")}function A(t){for(var e,i,r=[],n=0,o=t.length;n<o;)(e=t.charCodeAt(n++))>=55296&&e<=56319&&n<o?56320==(64512&(i=t.charCodeAt(n++)))?r.push(((1023&e)<<10)+(1023&i)+65536):(r.push(e),n--):r.push(e);return r}function O(t){return I(t,function(t){var e="";return t>65535&&(e+=E((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=E(t)}).join("")}function C(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function M(t,e,i){var r=0;for(t=i?w(t/f):t>>1,t+=w(t/e);t>T*d>>1;r+=l)t=w(t/T);return w(r+(T+1)*t/(t+p))}function D(t){var e,i,r,n,o,s,a,h,p,f,y,_=[],x=t.length,b=0,T=g,E=v;for((i=t.lastIndexOf(m))<0&&(i=0),r=0;r<i;++r)t.charCodeAt(r)>=128&&S("not-basic"),_.push(t.charCodeAt(r));for(n=i>0?i+1:0;n<x;){for(o=b,s=1,a=l;n>=x&&S("invalid-input"),((h=(y=t.charCodeAt(n++))-48<10?y-22:y-65<26?y-65:y-97<26?y-97:l)>=l||h>w((u-b)/s))&&S("overflow"),b+=h*s,!(h<(p=a<=E?c:a>=E+d?d:a-E));a+=l)s>w(u/(f=l-p))&&S("overflow"),s*=f;E=M(b-o,e=_.length+1,0==o),w(b/e)>u-T&&S("overflow"),T+=w(b/e),b%=e,_.splice(b++,0,T)}return O(_)}function R(t){var e,i,r,n,o,s,a,h,p,f,y,_,x,b,T,I=[];for(_=(t=A(t)).length,e=g,i=0,o=v,s=0;s<_;++s)(y=t[s])<128&&I.push(E(y));for(r=n=I.length,n&&I.push(m);r<_;){for(a=u,s=0;s<_;++s)(y=t[s])>=e&&y<a&&(a=y);for(a-e>w((u-i)/(x=r+1))&&S("overflow"),i+=(a-e)*x,e=a,s=0;s<_;++s)if((y=t[s])<e&&++i>u&&S("overflow"),y==e){for(h=i,p=l;!(h<(f=p<=o?c:p>=o+d?d:p-o));p+=l)T=h-f,b=l-f,I.push(E(C(f+T%b,0))),h=w(T/b);I.push(E(C(h,0))),o=M(i,x,r==n),i=0,++r}++i,++e}return I.join("")}if(a={version:"1.3.2",ucs2:{decode:A,encode:O},decode:D,encode:R,toASCII:function(t){return P(t,function(t){return _.test(t)?"xn--"+R(t):t})},toUnicode:function(t){return P(t,function(t){return y.test(t)?D(t.slice(4).toLowerCase()):t})}},n&&o)if(t.exports==n)o.exports=a;else for(h in a)a.hasOwnProperty(h)&&(n[h]=a[h]);else r.punycode=a}(e)}),W={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}};W.isString,W.isObject,W.isNull,W.isNullOrUndefined;function q(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var Z=function(t,e,i,r){e=e||"&",i=i||"=";var n={};if("string"!=typeof t||0===t.length)return n;var o=/\+/g;t=t.split(e);var s=1e3;r&&"number"==typeof r.maxKeys&&(s=r.maxKeys);var a=t.length;s>0&&a>s&&(a=s);for(var h=0;h<a;++h){var u,l,c,d,p=t[h].replace(o,"%20"),f=p.indexOf(i);f>=0?(u=p.substr(0,f),l=p.substr(f+1)):(u=p,l=""),c=decodeURIComponent(u),d=decodeURIComponent(l),q(n,c)?Array.isArray(n[c])?n[c].push(d):n[c]=[n[c],d]:n[c]=d}return n},K=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}},J=function(t,e,i,r){return e=e||"&",i=i||"=",null===t&&(t=void 0),"object"==typeof t?Object.keys(t).map(function(r){var n=encodeURIComponent(K(r))+i;return Array.isArray(t[r])?t[r].map(function(t){return n+encodeURIComponent(K(t))}).join(e):n+encodeURIComponent(K(t[r]))}).join(e):r?encodeURIComponent(K(r))+i+encodeURIComponent(K(t)):""},Q=i(function(t,e){e.decode=e.parse=Z,e.encode=e.stringify=J}),$=(Q.decode,Q.parse,Q.encode,Q.stringify,mt),tt=function(t,e){return mt(t,!1,!0).resolve(e)},et=function(t,e){if(!t)return e;return mt(t,!1,!0).resolveObject(e)},it=function(t){W.isString(t)&&(t=mt(t));if(!(t instanceof nt))return nt.prototype.format.call(t);return t.format()},rt=nt;function nt(){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}var ot=/^([a-z0-9.+-]+:)/i,st=/:[0-9]*$/,at=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,ht=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),ut=["'"].concat(ht),lt=["%","/","?",";","#"].concat(ut),ct=["/","?","#"],dt=/^[+a-z0-9A-Z_-]{0,63}$/,pt=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,ft={javascript:!0,"javascript:":!0},vt={javascript:!0,"javascript:":!0},gt={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function mt(t,e,i){if(t&&W.isObject(t)&&t instanceof nt)return t;var r=new nt;return r.parse(t,e,i),r}nt.prototype.parse=function(t,e,i){if(!W.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var r=t.indexOf("?"),n=-1!==r&&r<t.indexOf("#")?"?":"#",o=t.split(n);o[0]=o[0].replace(/\\/g,"/");var s=t=o.join(n);if(s=s.trim(),!i&&1===t.split("#").length){var a=at.exec(s);if(a)return this.path=s,this.href=s,this.pathname=a[1],a[2]?(this.search=a[2],this.query=e?Q.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search="",this.query={}),this}var h=ot.exec(s);if(h){var u=(h=h[0]).toLowerCase();this.protocol=u,s=s.substr(h.length)}if(i||h||s.match(/^\/\/[^@\/]+@[^@\/]+/)){var l="//"===s.substr(0,2);!l||h&&vt[h]||(s=s.substr(2),this.slashes=!0)}if(!vt[h]&&(l||h&&!gt[h])){for(var c,d,p=-1,f=0;f<ct.length;f++){-1!==(v=s.indexOf(ct[f]))&&(-1===p||v<p)&&(p=v)}-1!==(d=-1===p?s.lastIndexOf("@"):s.lastIndexOf("@",p))&&(c=s.slice(0,d),s=s.slice(d+1),this.auth=decodeURIComponent(c)),p=-1;for(f=0;f<lt.length;f++){var v;-1!==(v=s.indexOf(lt[f]))&&(-1===p||v<p)&&(p=v)}-1===p&&(p=s.length),this.host=s.slice(0,p),s=s.slice(p),this.parseHost(),this.hostname=this.hostname||"";var g="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!g)for(var m=this.hostname.split(/\./),y=(f=0,m.length);f<y;f++){var _=m[f];if(_&&!_.match(dt)){for(var x="",b=0,T=_.length;b<T;b++)_.charCodeAt(b)>127?x+="x":x+=_[b];if(!x.match(dt)){var w=m.slice(0,f),E=m.slice(f+1),S=_.match(pt);S&&(w.push(S[1]),E.unshift(S[2])),E.length&&(s="/"+E.join(".")+s),this.hostname=w.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),g||(this.hostname=Y.toASCII(this.hostname));var I=this.port?":"+this.port:"",P=this.hostname||"";this.host=P+I,this.href+=this.host,g&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!ft[u])for(f=0,y=ut.length;f<y;f++){var A=ut[f];if(-1!==s.indexOf(A)){var O=encodeURIComponent(A);O===A&&(O=escape(A)),s=s.split(A).join(O)}}var C=s.indexOf("#");-1!==C&&(this.hash=s.substr(C),s=s.slice(0,C));var M=s.indexOf("?");if(-1!==M?(this.search=s.substr(M),this.query=s.substr(M+1),e&&(this.query=Q.parse(this.query)),s=s.slice(0,M)):e&&(this.search="",this.query={}),s&&(this.pathname=s),gt[u]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){I=this.pathname||"";var D=this.search||"";this.path=I+D}return this.href=this.format(),this},nt.prototype.format=function(){var t=this.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var e=this.protocol||"",i=this.pathname||"",r=this.hash||"",n=!1,o="";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&&W.isObject(this.query)&&Object.keys(this.query).length&&(o=Q.stringify(this.query));var s=this.search||o&&"?"+o||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||gt[e])&&!1!==n?(n="//"+(n||""),i&&"/"!==i.charAt(0)&&(i="/"+i)):n||(n=""),r&&"#"!==r.charAt(0)&&(r="#"+r),s&&"?"!==s.charAt(0)&&(s="?"+s),e+n+(i=i.replace(/[?#]/g,function(t){return encodeURIComponent(t)}))+(s=s.replace("#","%23"))+r},nt.prototype.resolve=function(t){return this.resolveObject(mt(t,!1,!0)).format()},nt.prototype.resolveObject=function(t){if(W.isString(t)){var e=new nt;e.parse(t,!1,!0),t=e}for(var i=new nt,r=Object.keys(this),n=0;n<r.length;n++){var o=r[n];i[o]=this[o]}if(i.hash=t.hash,""===t.href)return i.href=i.format(),i;if(t.slashes&&!t.protocol){for(var s=Object.keys(t),a=0;a<s.length;a++){var h=s[a];"protocol"!==h&&(i[h]=t[h])}return gt[i.protocol]&&i.hostname&&!i.pathname&&(i.path=i.pathname="/"),i.href=i.format(),i}if(t.protocol&&t.protocol!==i.protocol){if(!gt[t.protocol]){for(var u=Object.keys(t),l=0;l<u.length;l++){var c=u[l];i[c]=t[c]}return i.href=i.format(),i}if(i.protocol=t.protocol,t.host||vt[t.protocol])i.pathname=t.pathname;else{for(var d=(t.pathname||"").split("/");d.length&&!(t.host=d.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==d[0]&&d.unshift(""),d.length<2&&d.unshift(""),i.pathname=d.join("/")}if(i.search=t.search,i.query=t.query,i.host=t.host||"",i.auth=t.auth,i.hostname=t.hostname||t.host,i.port=t.port,i.pathname||i.search){var p=i.pathname||"",f=i.search||"";i.path=p+f}return i.slashes=i.slashes||t.slashes,i.href=i.format(),i}var v=i.pathname&&"/"===i.pathname.charAt(0),g=t.host||t.pathname&&"/"===t.pathname.charAt(0),m=g||v||i.host&&t.pathname,y=m,_=i.pathname&&i.pathname.split("/")||[],x=(d=t.pathname&&t.pathname.split("/")||[],i.protocol&&!gt[i.protocol]);if(x&&(i.hostname="",i.port=null,i.host&&(""===_[0]?_[0]=i.host:_.unshift(i.host)),i.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===d[0]?d[0]=t.host:d.unshift(t.host)),t.host=null),m=m&&(""===d[0]||""===_[0])),g)i.host=t.host||""===t.host?t.host:i.host,i.hostname=t.hostname||""===t.hostname?t.hostname:i.hostname,i.search=t.search,i.query=t.query,_=d;else if(d.length)_||(_=[]),_.pop(),_=_.concat(d),i.search=t.search,i.query=t.query;else if(!W.isNullOrUndefined(t.search)){if(x)i.hostname=i.host=_.shift(),(S=!!(i.host&&i.host.indexOf("@")>0)&&i.host.split("@"))&&(i.auth=S.shift(),i.host=i.hostname=S.shift());return i.search=t.search,i.query=t.query,W.isNull(i.pathname)&&W.isNull(i.search)||(i.path=(i.pathname?i.pathname:"")+(i.search?i.search:"")),i.href=i.format(),i}if(!_.length)return i.pathname=null,i.search?i.path="/"+i.search:i.path=null,i.href=i.format(),i;for(var b=_.slice(-1)[0],T=(i.host||t.host||_.length>1)&&("."===b||".."===b)||""===b,w=0,E=_.length;E>=0;E--)"."===(b=_[E])?_.splice(E,1):".."===b?(_.splice(E,1),w++):w&&(_.splice(E,1),w--);if(!m&&!y)for(;w--;w)_.unshift("..");!m||""===_[0]||_[0]&&"/"===_[0].charAt(0)||_.unshift(""),T&&"/"!==_.join("/").substr(-1)&&_.push("");var S,I=""===_[0]||_[0]&&"/"===_[0].charAt(0);x&&(i.hostname=i.host=I?"":_.length?_.shift():"",(S=!!(i.host&&i.host.indexOf("@")>0)&&i.host.split("@"))&&(i.auth=S.shift(),i.host=i.hostname=S.shift()));return(m=m||i.host&&_.length)&&!I&&_.unshift(""),_.length?i.pathname=_.join("/"):(i.pathname=null,i.path=null),W.isNull(i.pathname)&&W.isNull(i.search)||(i.path=(i.pathname?i.pathname:"")+(i.search?i.search:"")),i.auth=t.auth||i.auth,i.slashes=i.slashes||t.slashes,i.href=i.format(),i},nt.prototype.parseHost=function(){var t=this.host,e=st.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)};var yt={parse:$,resolve:tt,resolveObject:et,format:it,Url:rt},_t={WEBGL_LEGACY:0,WEBGL:1,WEBGL2:2},xt={UNKNOWN:0,WEBGL:1,CANVAS:2},bt={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,NONE:20,SRC_OVER:0,SRC_IN:21,SRC_OUT:22,SRC_ATOP:23,DST_OVER:24,DST_IN:25,DST_OUT:26,DST_ATOP:27,ERASE:26,SUBTRACT:28},Tt={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},wt={RGBA:6408,RGB:6407,ALPHA:6406,LUMINANCE:6409,LUMINANCE_ALPHA:6410,DEPTH_COMPONENT:6402,DEPTH_STENCIL:34041},Et={TEXTURE_2D:3553,TEXTURE_CUBE_MAP:34067,TEXTURE_2D_ARRAY:35866,TEXTURE_CUBE_MAP_POSITIVE_X:34069,TEXTURE_CUBE_MAP_NEGATIVE_X:34070,TEXTURE_CUBE_MAP_POSITIVE_Y:34071,TEXTURE_CUBE_MAP_NEGATIVE_Y:34072,TEXTURE_CUBE_MAP_POSITIVE_Z:34073,TEXTURE_CUBE_MAP_NEGATIVE_Z:34074},St={UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123,UNSIGNED_SHORT_5_6_5:33635,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,FLOAT:5126,HALF_FLOAT:36193},It={LINEAR:1,NEAREST:0},Pt={CLAMP:33071,REPEAT:10497,MIRRORED_REPEAT:33648},At={OFF:0,POW2:1,ON:2},Ot={AUTO:0,MANUAL:1},Ct={LOW:"lowp",MEDIUM:"mediump",HIGH:"highp"};g.RETINA_PREFIX=/@([0-9\.]+)x/,g.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!0;var Mt,Dt=!1,Rt="5.1.4";function Ft(t){if(!Dt){if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var e=["\n %c %c %c PixiJS "+Rt+" - ✰ "+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 "+Rt+" - "+t+" - http://www.pixijs.com/");Dt=!0}}function Lt(){return void 0===Mt&&(Mt=function(){var t={stencil:!0,failIfMajorPerformanceCaveat:g.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!window.WebGLRenderingContext)return!1;var e=document.createElement("canvas"),i=e.getContext("webgl",t)||e.getContext("experimental-webgl",t),r=!(!i||!i.getContextAttributes().stencil);if(i){var n=i.getExtension("WEBGL_lose_context");n&&n.loseContext()}return i=null,r}catch(t){return!1}}()),Mt}function Nt(t,e){return(e=e||[])[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255,e}function Bt(t){return t=t.toString(16),"#"+(t="000000".substr(0,6-t.length)+t)}function Ut(t){return"string"==typeof t&&"#"===t[0]&&(t=t.substr(1)),parseInt(t,16)}var kt=function(){for(var t=[],e=[],i=0;i<32;i++)t[i]=i,e[i]=i;t[bt.NORMAL_NPM]=bt.NORMAL,t[bt.ADD_NPM]=bt.ADD,t[bt.SCREEN_NPM]=bt.SCREEN,e[bt.NORMAL]=bt.NORMAL_NPM,e[bt.ADD]=bt.ADD_NPM,e[bt.SCREEN]=bt.SCREEN_NPM;var r=[];return r.push(e),r.push(t),r}();function Xt(t,e){return kt[e?1:0][t]}function jt(t,e,i,r){return i=i||new Float32Array(4),r||void 0===r?(i[0]=t[0]*e,i[1]=t[1]*e,i[2]=t[2]*e):(i[0]=t[0],i[1]=t[1],i[2]=t[2]),i[3]=e,i}function Gt(t,e){if(1===e)return(255*e<<24)+t;if(0===e)return 0;var i=t>>16&255,r=t>>8&255,n=255&t;return(255*e<<24)+((i=i*e+.5|0)<<16)+((r=r*e+.5|0)<<8)+(n=n*e+.5|0)}function Ht(t,e,i,r){return(i=i||new Float32Array(4))[0]=(t>>16&255)/255,i[1]=(t>>8&255)/255,i[2]=(255&t)/255,(r||void 0===r)&&(i[0]*=e,i[1]*=e,i[2]*=e),i[3]=e,i}function zt(t,e){void 0===e&&(e=null);var i=6*t;if((e=e||new Uint16Array(i)).length!==i)throw new Error("Out buffer length is incorrect, got "+e.length+" and expected "+i);for(var r=0,n=0;r<i;r+=6,n+=4)e[r+0]=n+0,e[r+1]=n+1,e[r+2]=n+2,e[r+3]=n+0,e[r+4]=n+2,e[r+5]=n+3;return e}function Vt(t,e,i){var r,n=t.length;if(!(e>=n||0===i)){var o=n-(i=e+i>n?n-e:i);for(r=e;r<o;++r)t[r]=t[r+i];t.length=o}}var Yt=0;function Wt(){return++Yt}function qt(t){return 0===t?0:t<0?-1:1}function Zt(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)+1}function Kt(t){return!(t&t-1||!t)}function Jt(t){var e=(t>65535)<<4,i=((t>>>=e)>255)<<3;return e|=i,e|=i=((t>>>=i)>15)<<2,(e|=i=((t>>>=i)>3)<<1)|(t>>>=i)>>1}var Qt={},$t=Object.create(null),te=Object.create(null);function ee(t){var e,i,r,n=t.width,o=t.height,s=t.getContext("2d"),a=s.getImageData(0,0,n,o).data,h=a.length,u={top:null,left:null,right:null,bottom:null},l=null;for(e=0;e<h;e+=4)0!==a[e+3]&&(i=e/4%n,r=~~(e/4/n),null===u.top&&(u.top=r),null===u.left?u.left=i:i<u.left&&(u.left=i),null===u.right?u.right=i+1:u.right<i&&(u.right=i+1),null===u.bottom?u.bottom=r:u.bottom<r&&(u.bottom=r));return null!==u.top&&(n=u.right-u.left,o=u.bottom-u.top+1,l=s.getImageData(u.left,u.top,n,o)),{height:o,width:n,data:l}}var ie=function(t,e,i){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),this.resolution=i||g.RESOLUTION,this.resize(t,e)},re={width:{configurable:!0},height:{configurable:!0}};ie.prototype.clear=function(){this.context.setTransform(1,0,0,1,0,0),this.context.clearRect(0,0,this.canvas.width,this.canvas.height)},ie.prototype.resize=function(t,e){this.canvas.width=t*this.resolution,this.canvas.height=e*this.resolution},ie.prototype.destroy=function(){this.context=null,this.canvas=null},re.width.get=function(){return this.canvas.width},re.width.set=function(t){this.canvas.width=t},re.height.get=function(){return this.canvas.height},re.height.set=function(t){this.canvas.height=t},Object.defineProperties(ie.prototype,re);var ne,oe=/^\s*data:(?:([\w-]+)\/([\w+.-]+))?(?:;charset=([\w-]+))?(?:;(base64))?,(.*)/i;function se(t,e){if(void 0===e&&(e=window.location),0===t.indexOf("data:"))return"";e=e||window.location,ne||(ne=document.createElement("a")),ne.href=t;var i=!(t=yt.parse(ne.href)).port&&""===e.port||t.port===e.port;return t.hostname===e.hostname&&i&&t.protocol===e.protocol?"":"anonymous"}function ae(t,e){var i=g.RETINA_PREFIX.exec(t);return i?parseFloat(i[1]):void 0!==e?e:1}var he={};function ue(t,e,i){if(void 0===i&&(i=3),!he[e]){var r=(new Error).stack;void 0===r?console.warn("PixiJS Deprecation Warning: ",e+"\nDeprecated since v"+t):(r=r.split("\n").splice(i).join("\n"),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",e+"\nDeprecated since v"+t),console.warn(r),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",e+"\nDeprecated since v"+t),console.warn(r))),he[e]=!0}}var le={BaseTextureCache:te,CanvasRenderTarget:ie,DATA_URI:oe,ProgramCache:Qt,TextureCache:$t,clearTextureCache:function(){var t;for(t in $t)delete $t[t];for(t in te)delete te[t]},correctBlendMode:Xt,createIndicesForQuads:zt,decomposeDataUri:function(t){var e=oe.exec(t);if(e)return{mediaType:e[1]?e[1].toLowerCase():void 0,subType:e[2]?e[2].toLowerCase():void 0,charset:e[3]?e[3].toLowerCase():void 0,encoding:e[4]?e[4].toLowerCase():void 0,data:e[5]}},deprecation:ue,destroyTextureCache:function(){var t;for(t in $t)$t[t].destroy();for(t in te)te[t].destroy()},determineCrossOrigin:se,getResolutionOfUrl:ae,hex2rgb:Nt,hex2string:Bt,isPow2:Kt,isWebGLSupported:Lt,log2:Jt,nextPow2:Zt,premultiplyBlendMode:kt,premultiplyRgba:jt,premultiplyTint:Gt,premultiplyTintToRgba:Ht,removeItems:Vt,rgb2hex:function(t){return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},sayHello:Ft,sign:qt,skipHello:function(){Dt=!0},string2hex:Ut,trimCanvas:ee,uid:Wt,isMobile:v,EventEmitter:m,earcut:y,url:yt},ce=function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=t,this.y=e};ce.prototype.clone=function(){return new ce(this.x,this.y)},ce.prototype.copyFrom=function(t){return this.set(t.x,t.y),this},ce.prototype.copyTo=function(t){return t.set(this.x,this.y),t},ce.prototype.equals=function(t){return t.x===this.x&&t.y===this.y},ce.prototype.set=function(t,e){this.x=t||0,this.y=e||(0!==e?this.x:0)};var de=function(t,e,i,r){void 0===i&&(i=0),void 0===r&&(r=0),this._x=i,this._y=r,this.cb=t,this.scope=e},pe={x:{configurable:!0},y:{configurable:!0}};de.prototype.clone=function(t,e){void 0===t&&(t=null),void 0===e&&(e=null);var i=t||this.cb,r=e||this.scope;return new de(i,r,this._x,this._y)},de.prototype.set=function(t,e){var i=t||0,r=e||(0!==e?i:0);this._x===i&&this._y===r||(this._x=i,this._y=r,this.cb.call(this.scope))},de.prototype.copyFrom=function(t){return this._x===t.x&&this._y===t.y||(this._x=t.x,this._y=t.y,this.cb.call(this.scope)),this},de.prototype.copyTo=function(t){return t.set(this._x,this._y),t},de.prototype.equals=function(t){return t.x===this._x&&t.y===this._y},pe.x.get=function(){return this._x},pe.x.set=function(t){this._x!==t&&(this._x=t,this.cb.call(this.scope))},pe.y.get=function(){return this._y},pe.y.set=function(t){this._y!==t&&(this._y=t,this.cb.call(this.scope))},Object.defineProperties(de.prototype,pe);var fe=2*Math.PI,ve=180/Math.PI,ge=Math.PI/180,me={POLY:0,RECT:1,CIRC:2,ELIP:3,RREC:4},ye=function(t,e,i,r,n,o){void 0===t&&(t=1),void 0===e&&(e=0),void 0===i&&(i=0),void 0===r&&(r=1),void 0===n&&(n=0),void 0===o&&(o=0),this.a=t,this.b=e,this.c=i,this.d=r,this.tx=n,this.ty=o,this.array=null},_e={IDENTITY:{configurable:!0},TEMP_MATRIX:{configurable:!0}};ye.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]},ye.prototype.set=function(t,e,i,r,n,o){return this.a=t,this.b=e,this.c=i,this.d=r,this.tx=n,this.ty=o,this},ye.prototype.toArray=function(t,e){this.array||(this.array=new Float32Array(9));var i=e||this.array;return t?(i[0]=this.a,i[1]=this.b,i[2]=0,i[3]=this.c,i[4]=this.d,i[5]=0,i[6]=this.tx,i[7]=this.ty,i[8]=1):(i[0]=this.a,i[1]=this.c,i[2]=this.tx,i[3]=this.b,i[4]=this.d,i[5]=this.ty,i[6]=0,i[7]=0,i[8]=1),i},ye.prototype.apply=function(t,e){e=e||new ce;var i=t.x,r=t.y;return e.x=this.a*i+this.c*r+this.tx,e.y=this.b*i+this.d*r+this.ty,e},ye.prototype.applyInverse=function(t,e){e=e||new ce;var i=1/(this.a*this.d+this.c*-this.b),r=t.x,n=t.y;return e.x=this.d*i*r+-this.c*i*n+(this.ty*this.c-this.tx*this.d)*i,e.y=this.a*i*n+-this.b*i*r+(-this.ty*this.a+this.tx*this.b)*i,e},ye.prototype.translate=function(t,e){return this.tx+=t,this.ty+=e,this},ye.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},ye.prototype.rotate=function(t){var e=Math.cos(t),i=Math.sin(t),r=this.a,n=this.c,o=this.tx;return this.a=r*e-this.b*i,this.b=r*i+this.b*e,this.c=n*e-this.d*i,this.d=n*i+this.d*e,this.tx=o*e-this.ty*i,this.ty=o*i+this.ty*e,this},ye.prototype.append=function(t){var e=this.a,i=this.b,r=this.c,n=this.d;return this.a=t.a*e+t.b*r,this.b=t.a*i+t.b*n,this.c=t.c*e+t.d*r,this.d=t.c*i+t.d*n,this.tx=t.tx*e+t.ty*r+this.tx,this.ty=t.tx*i+t.ty*n+this.ty,this},ye.prototype.setTransform=function(t,e,i,r,n,o,s,a,h){return this.a=Math.cos(s+h)*n,this.b=Math.sin(s+h)*n,this.c=-Math.sin(s-a)*o,this.d=Math.cos(s-a)*o,this.tx=t-(i*this.a+r*this.c),this.ty=e-(i*this.b+r*this.d),this},ye.prototype.prepend=function(t){var e=this.tx;if(1!==t.a||0!==t.b||0!==t.c||1!==t.d){var i=this.a,r=this.c;this.a=i*t.a+this.b*t.c,this.b=i*t.b+this.b*t.d,this.c=r*t.a+this.d*t.c,this.d=r*t.b+this.d*t.d}return this.tx=e*t.a+this.ty*t.c+t.tx,this.ty=e*t.b+this.ty*t.d+t.ty,this},ye.prototype.decompose=function(t){var e=this.a,i=this.b,r=this.c,n=this.d,o=-Math.atan2(-r,n),s=Math.atan2(i,e),a=Math.abs(o+s);return a<1e-5||Math.abs(fe-a)<1e-5?(t.rotation=s,t.skew.x=t.skew.y=0):(t.rotation=0,t.skew.x=o,t.skew.y=s),t.scale.x=Math.sqrt(e*e+i*i),t.scale.y=Math.sqrt(r*r+n*n),t.position.x=this.tx,t.position.y=this.ty,t},ye.prototype.invert=function(){var t=this.a,e=this.b,i=this.c,r=this.d,n=this.tx,o=t*r-e*i;return this.a=r/o,this.b=-e/o,this.c=-i/o,this.d=t/o,this.tx=(i*this.ty-r*n)/o,this.ty=-(t*this.ty-e*n)/o,this},ye.prototype.identity=function(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this},ye.prototype.clone=function(){var t=new ye;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},ye.prototype.copyTo=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},ye.prototype.copyFrom=function(t){return this.a=t.a,this.b=t.b,this.c=t.c,this.d=t.d,this.tx=t.tx,this.ty=t.ty,this},_e.IDENTITY.get=function(){return new ye},_e.TEMP_MATRIX.get=function(){return new ye},Object.defineProperties(ye,_e);var xe=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],be=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],Te=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],we=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],Ee=[],Se=[],Ie=Math.sign;!function(){for(var t=0;t<16;t++){var e=[];Ee.push(e);for(var i=0;i<16;i++)for(var r=Ie(xe[t]*xe[i]+Te[t]*be[i]),n=Ie(be[t]*xe[i]+we[t]*be[i]),o=Ie(xe[t]*Te[i]+Te[t]*we[i]),s=Ie(be[t]*Te[i]+we[t]*we[i]),a=0;a<16;a++)if(xe[a]===r&&be[a]===n&&Te[a]===o&&we[a]===s){e.push(a);break}}for(var h=0;h<16;h++){var u=new ye;u.set(xe[h],be[h],Te[h],we[h],0,0),Se.push(u)}}();var Pe={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:function(t){return xe[t]},uY:function(t){return be[t]},vX:function(t){return Te[t]},vY:function(t){return we[t]},inv:function(t){return 8&t?15&t:7&-t},add:function(t,e){return Ee[t][e]},sub:function(t,e){return Ee[t][Pe.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?Pe.S:Pe.N:2*Math.abs(e)<=Math.abs(t)?t>0?Pe.E:Pe.W:e>0?t>0?Pe.SE:Pe.SW:t>0?Pe.NE:Pe.NW},matrixAppendRotationInv:function(t,e,i,r){void 0===i&&(i=0),void 0===r&&(r=0);var n=Se[Pe.inv(e)];n.tx=i,n.ty=r,t.append(n)}},Ae=function(){this.worldTransform=new ye,this.localTransform=new ye,this.position=new de(this.onChange,this,0,0),this.scale=new de(this.onChange,this,1,1),this.pivot=new de(this.onChange,this,0,0),this.skew=new de(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0},Oe={rotation:{configurable:!0}};Ae.prototype.onChange=function(){this._localID++},Ae.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++},Ae.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)},Ae.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 i=t.worldTransform,r=this.worldTransform;r.a=e.a*i.a+e.b*i.c,r.b=e.a*i.b+e.b*i.d,r.c=e.c*i.a+e.d*i.c,r.d=e.c*i.b+e.d*i.d,r.tx=e.tx*i.a+e.ty*i.c+i.tx,r.ty=e.tx*i.b+e.ty*i.d+i.ty,this._parentID=t._worldID,this._worldID++}},Ae.prototype.setFromMatrix=function(t){t.decompose(this),this._localID++},Oe.rotation.get=function(){return this._rotation},Oe.rotation.set=function(t){this._rotation!==t&&(this._rotation=t,this.updateSkew())},Object.defineProperties(Ae.prototype,Oe),Ae.IDENTITY=new Ae;var Ce=function(t,e,i,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===r&&(r=0),this.x=Number(t),this.y=Number(e),this.width=Number(i),this.height=Number(r),this.type=me.RECT},Me={left:{configurable:!0},right:{configurable:!0},top:{configurable:!0},bottom:{configurable:!0}},De={EMPTY:{configurable:!0}};Me.left.get=function(){return this.x},Me.right.get=function(){return this.x+this.width},Me.top.get=function(){return this.y},Me.bottom.get=function(){return this.y+this.height},De.EMPTY.get=function(){return new Ce(0,0,0,0)},Ce.prototype.clone=function(){return new Ce(this.x,this.y,this.width,this.height)},Ce.prototype.copyFrom=function(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this},Ce.prototype.copyTo=function(t){return t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t},Ce.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)},Ce.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},Ce.prototype.fit=function(t){var e=Math.max(this.x,t.x),i=Math.min(this.x+this.width,t.x+t.width),r=Math.max(this.y,t.y),n=Math.min(this.y+this.height,t.y+t.height);this.x=e,this.width=Math.max(i-e,0),this.y=r,this.height=Math.max(n-r,0)},Ce.prototype.ceil=function(t,e){void 0===t&&(t=1),void 0===e&&(e=.001);var i=Math.ceil((this.x+this.width-e)*t)/t,r=Math.ceil((this.y+this.height-e)*t)/t;this.x=Math.floor((this.x+e)*t)/t,this.y=Math.floor((this.y+e)*t)/t,this.width=i-this.x,this.height=r-this.y},Ce.prototype.enlarge=function(t){var e=Math.min(this.x,t.x),i=Math.max(this.x+this.width,t.x+t.width),r=Math.min(this.y,t.y),n=Math.max(this.y+this.height,t.y+t.height);this.x=e,this.width=i-e,this.y=r,this.height=n-r},Object.defineProperties(Ce.prototype,Me),Object.defineProperties(Ce,De);var Re=function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),this.x=t,this.y=e,this.radius=i,this.type=me.CIRC};Re.prototype.clone=function(){return new Re(this.x,this.y,this.radius)},Re.prototype.contains=function(t,e){if(this.radius<=0)return!1;var i=this.radius*this.radius,r=this.x-t,n=this.y-e;return(r*=r)+(n*=n)<=i},Re.prototype.getBounds=function(){return new Ce(this.x-this.radius,this.y-this.radius,2*this.radius,2*this.radius)};var Fe=function(t,e,i,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===r&&(r=0),this.x=t,this.y=e,this.width=i,this.height=r,this.type=me.ELIP};Fe.prototype.clone=function(){return new Fe(this.x,this.y,this.width,this.height)},Fe.prototype.contains=function(t,e){if(this.width<=0||this.height<=0)return!1;var i=(t-this.x)/this.width,r=(e-this.y)/this.height;return(i*=i)+(r*=r)<=1},Fe.prototype.getBounds=function(){return new Ce(this.x-this.width,this.y-this.height,this.width,this.height)};var Le=function(){for(var t=arguments,e=[],i=arguments.length;i--;)e[i]=t[i];if(Array.isArray(e[0])&&(e=e[0]),e[0]instanceof ce){for(var r=[],n=0,o=e.length;n<o;n++)r.push(e[n].x,e[n].y);e=r}this.points=e,this.type=me.POLY,this.closeStroke=!0};Le.prototype.clone=function(){var t=new Le(this.points.slice());return t.closeStroke=this.closeStroke,t},Le.prototype.contains=function(t,e){for(var i=!1,r=this.points.length/2,n=0,o=r-1;n<r;o=n++){var s=this.points[2*n],a=this.points[2*n+1],h=this.points[2*o],u=this.points[2*o+1];a>e!=u>e&&t<(e-a)/(u-a)*(h-s)+s&&(i=!i)}return i};var Ne=function(t,e,i,r,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===r&&(r=0),void 0===n&&(n=20),this.x=t,this.y=e,this.width=i,this.height=r,this.radius=n,this.type=me.RREC};Ne.prototype.clone=function(){return new Ne(this.x,this.y,this.width,this.height,this.radius)},Ne.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 i=t-(this.x+this.radius),r=e-(this.y+this.radius),n=this.radius*this.radius;if(i*i+r*r<=n)return!0;if((i=t-(this.x+this.width-this.radius))*i+r*r<=n)return!0;if(i*i+(r=e-(this.y+this.height-this.radius))*r<=n)return!0;if((i=t-(this.x+this.radius))*i+r*r<=n)return!0}return!1},g.SORTABLE_CHILDREN=!1;var Be=function(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null};Be.prototype.isEmpty=function(){return this.minX>this.maxX||this.minY>this.maxY},Be.prototype.clear=function(){this.updateID++,this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0},Be.prototype.getRectangle=function(t){return this.minX>this.maxX||this.minY>this.maxY?Ce.EMPTY:((t=t||new Ce(0,0,1,1)).x=this.minX,t.y=this.minY,t.width=this.maxX-this.minX,t.height=this.maxY-this.minY,t)},Be.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)},Be.prototype.addQuad=function(t){var e=this.minX,i=this.minY,r=this.maxX,n=this.maxY,o=t[0],s=t[1];e=o<e?o:e,i=s<i?s:i,r=o>r?o:r,n=s>n?s:n,e=(o=t[2])<e?o:e,i=(s=t[3])<i?s:i,r=o>r?o:r,n=s>n?s:n,e=(o=t[4])<e?o:e,i=(s=t[5])<i?s:i,r=o>r?o:r,n=s>n?s:n,e=(o=t[6])<e?o:e,i=(s=t[7])<i?s:i,r=o>r?o:r,n=s>n?s:n,this.minX=e,this.minY=i,this.maxX=r,this.maxY=n},Be.prototype.addFrame=function(t,e,i,r,n){var o=t.worldTransform,s=o.a,a=o.b,h=o.c,u=o.d,l=o.tx,c=o.ty,d=this.minX,p=this.minY,f=this.maxX,v=this.maxY,g=s*e+h*i+l,m=a*e+u*i+c;d=g<d?g:d,p=m<p?m:p,f=g>f?g:f,v=m>v?m:v,d=(g=s*r+h*i+l)<d?g:d,p=(m=a*r+u*i+c)<p?m:p,f=g>f?g:f,v=m>v?m:v,d=(g=s*e+h*n+l)<d?g:d,p=(m=a*e+u*n+c)<p?m:p,f=g>f?g:f,v=m>v?m:v,d=(g=s*r+h*n+l)<d?g:d,p=(m=a*r+u*n+c)<p?m:p,f=g>f?g:f,v=m>v?m:v,this.minX=d,this.minY=p,this.maxX=f,this.maxY=v},Be.prototype.addVertexData=function(t,e,i){for(var r=this.minX,n=this.minY,o=this.maxX,s=this.maxY,a=e;a<i;a+=2){var h=t[a],u=t[a+1];r=h<r?h:r,n=u<n?u:n,o=h>o?h:o,s=u>s?u:s}this.minX=r,this.minY=n,this.maxX=o,this.maxY=s},Be.prototype.addVertices=function(t,e,i,r){for(var n=t.worldTransform,o=n.a,s=n.b,a=n.c,h=n.d,u=n.tx,l=n.ty,c=this.minX,d=this.minY,p=this.maxX,f=this.maxY,v=i;v<r;v+=2){var g=e[v],m=e[v+1],y=o*g+a*m+u,_=h*m+s*g+l;c=y<c?y:c,d=_<d?_:d,p=y>p?y:p,f=_>f?_:f}this.minX=c,this.minY=d,this.maxX=p,this.maxY=f},Be.prototype.addBounds=function(t){var e=this.minX,i=this.minY,r=this.maxX,n=this.maxY;this.minX=t.minX<e?t.minX:e,this.minY=t.minY<i?t.minY:i,this.maxX=t.maxX>r?t.maxX:r,this.maxY=t.maxY>n?t.maxY:n},Be.prototype.addBoundsMask=function(t,e){var i=t.minX>e.minX?t.minX:e.minX,r=t.minY>e.minY?t.minY:e.minY,n=t.maxX<e.maxX?t.maxX:e.maxX,o=t.maxY<e.maxY?t.maxY:e.maxY;if(i<=n&&r<=o){var s=this.minX,a=this.minY,h=this.maxX,u=this.maxY;this.minX=i<s?i:s,this.minY=r<a?r:a,this.maxX=n>h?n:h,this.maxY=o>u?o:u}},Be.prototype.addBoundsArea=function(t,e){var i=t.minX>e.x?t.minX:e.x,r=t.minY>e.y?t.minY:e.y,n=t.maxX<e.x+e.width?t.maxX:e.x+e.width,o=t.maxY<e.y+e.height?t.maxY:e.y+e.height;if(i<=n&&r<=o){var s=this.minX,a=this.minY,h=this.maxX,u=this.maxY;this.minX=i<s?i:s,this.minY=r<a?r:a,this.maxX=n>h?n:h,this.maxY=o>u?o:u}};var Ue=function(t){function e(){t.call(this),this.tempDisplayObjectParent=null,this.transform=new Ae,this.alpha=1,this.visible=!0,this.renderable=!0,this.parent=null,this.worldAlpha=1,this._lastSortedIndex=0,this._zIndex=0,this.filterArea=null,this.filters=null,this._enabledFilters=null,this._bounds=new Be,this._boundsID=0,this._lastBoundsID=-1,this._boundsRect=null,this._localBoundsRect=null,this._mask=null,this._destroyed=!1,this.isSprite=!1}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={_tempDisplayObjectParent:{configurable:!0},x:{configurable:!0},y:{configurable:!0},worldTransform:{configurable:!0},localTransform:{configurable:!0},position:{configurable:!0},scale:{configurable:!0},pivot:{configurable:!0},skew:{configurable:!0},rotation:{configurable:!0},angle:{configurable:!0},zIndex:{configurable:!0},worldVisible:{configurable:!0},mask:{configurable:!0}};return e.mixin=function(t){for(var i=Object.keys(t),r=0;r<i.length;++r){var n=i[r];Object.defineProperty(e.prototype,n,Object.getOwnPropertyDescriptor(t,n))}},i._tempDisplayObjectParent.get=function(){return null===this.tempDisplayObjectParent&&(this.tempDisplayObjectParent=new e),this.tempDisplayObjectParent},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(),this._lastBoundsID=this._boundsID),e||(this._boundsRect||(this._boundsRect=new Ce),e=this._boundsRect),this._bounds.getRectangle(e)},e.prototype.getLocalBounds=function(t){var e=this.transform,i=this.parent;this.parent=null,this.transform=this._tempDisplayObjectParent.transform,t||(this._localBoundsRect||(this._localBoundsRect=new Ce),t=this._localBoundsRect);var r=this.getBounds(!1,t);return this.parent=i,this.transform=e,r},e.prototype.toGlobal=function(t,e,i){return void 0===i&&(i=!1),i||(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,i,r){return e&&(t=e.toGlobal(t,i,r)),r||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.applyInverse(t,i)},e.prototype.render=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(t,e,i,r,n,o,s,a,h){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=1),void 0===r&&(r=1),void 0===n&&(n=0),void 0===o&&(o=0),void 0===s&&(s=0),void 0===a&&(a=0),void 0===h&&(h=0),this.position.x=t,this.position.y=e,this.scale.x=i||1,this.scale.y=r||1,this.rotation=n,this.skew.x=o,this.skew.y=s,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},i.x.get=function(){return this.position.x},i.x.set=function(t){this.transform.position.x=t},i.y.get=function(){return this.position.y},i.y.set=function(t){this.transform.position.y=t},i.worldTransform.get=function(){return this.transform.worldTransform},i.localTransform.get=function(){return this.transform.localTransform},i.position.get=function(){return this.transform.position},i.position.set=function(t){this.transform.position.copyFrom(t)},i.scale.get=function(){return this.transform.scale},i.scale.set=function(t){this.transform.scale.copyFrom(t)},i.pivot.get=function(){return this.transform.pivot},i.pivot.set=function(t){this.transform.pivot.copyFrom(t)},i.skew.get=function(){return this.transform.skew},i.skew.set=function(t){this.transform.skew.copyFrom(t)},i.rotation.get=function(){return this.transform.rotation},i.rotation.set=function(t){this.transform.rotation=t},i.angle.get=function(){return this.transform.rotation*ve},i.angle.set=function(t){this.transform.rotation=t*ge},i.zIndex.get=function(){return this._zIndex},i.zIndex.set=function(t){this._zIndex=t,this.parent&&(this.parent.sortDirty=!0)},i.worldVisible.get=function(){var t=this;do{if(!t.visible)return!1;t=t.parent}while(t);return!0},i.mask.get=function(){return this._mask},i.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)},Object.defineProperties(e.prototype,i),e}(m);function ke(t,e){return t.zIndex===e.zIndex?t._lastSortedIndex-e._lastSortedIndex:t.zIndex-e.zIndex}Ue.prototype.displayObjectUpdateTransform=Ue.prototype.updateTransform;var Xe=function(t){function e(){t.call(this),this.children=[],this.sortableChildren=g.SORTABLE_CHILDREN,this.sortDirty=!1}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={width:{configurable:!0},height:{configurable:!0}};return e.prototype.onChildrenChange=function(){},e.prototype.addChild=function(t){var e=arguments,i=arguments.length;if(i>1)for(var r=0;r<i;r++)this.addChild(e[r]);else t.parent&&t.parent.removeChild(t),t.parent=this,this.sortDirty=!0,t.transform._parentID=-1,this.children.push(t),this._boundsID++,this.onChildrenChange(this.children.length-1),this.emit("childAdded",t,this,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,this.sortDirty=!0,t.transform._parentID=-1,this.children.splice(e,0,t),this._boundsID++,this.onChildrenChange(e),t.emit("added",this),this.emit("childAdded",t,this,e),t},e.prototype.swapChildren=function(t,e){if(t!==e){var i=this.getChildIndex(t),r=this.getChildIndex(e);this.children[i]=e,this.children[r]=t,this.onChildrenChange(i<r?i:r)}},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 i=this.getChildIndex(t);Vt(this.children,i,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,i=arguments.length;if(i>1)for(var r=0;r<i;r++)this.removeChild(e[r]);else{var n=this.children.indexOf(t);if(-1===n)return null;t.parent=null,t.transform._parentID=-1,Vt(this.children,n,1),this._boundsID++,this.onChildrenChange(n),t.emit("removed",this),this.emit("childRemoved",t,this,n)}return t},e.prototype.removeChildAt=function(t){var e=this.getChildAt(t);return e.parent=null,e.transform._parentID=-1,Vt(this.children,t,1),this._boundsID++,this.onChildrenChange(t),e.emit("removed",this),this.emit("childRemoved",e,this,t),e},e.prototype.removeChildren=function(t,e){void 0===t&&(t=0);var i,r=t,n="number"==typeof e?e:this.children.length,o=n-r;if(o>0&&o<=n){i=this.children.splice(r,o);for(var s=0;s<i.length;++s)i[s].parent=null,i[s].transform&&(i[s].transform._parentID=-1);this._boundsID++,this.onChildrenChange(t);for(var a=0;a<i.length;++a)i[a].emit("removed",this),this.emit("childRemoved",i[a],this,a);return i}if(0===o&&0===this.children.length)return[];throw new RangeError("removeChildren: numeric values are outside the acceptable range.")},e.prototype.sortChildren=function(){for(var t=!1,e=0,i=this.children.length;e<i;++e){var r=this.children[e];r._lastSortedIndex=e,t||0===r.zIndex||(t=!0)}t&&this.children.length>1&&this.children.sort(ke),this.sortDirty=!1},e.prototype.updateTransform=function(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),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 i=this.children[t];i.visible&&i.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.render=function(t){if(this.visible&&!(this.worldAlpha<=0)&&this.renderable)if(this._mask||this.filters&&this.filters.length)this.renderAdvanced(t);else{this._render(t);for(var e=0,i=this.children.length;e<i;++e)this.children[e].render(t)}},e.prototype.renderAdvanced=function(t){t.batch.flush();var e=this.filters,i=this._mask;if(e){this._enabledFilters||(this._enabledFilters=[]),this._enabledFilters.length=0;for(var r=0;r<e.length;r++)e[r].enabled&&this._enabledFilters.push(e[r]);this._enabledFilters.length&&t.filter.push(this,this._enabledFilters)}i&&t.mask.push(this,this._mask),this._render(t);for(var n=0,o=this.children.length;n<o;n++)this.children[n].render(t);t.batch.flush(),i&&t.mask.pop(this,this._mask),e&&this._enabledFilters&&this._enabledFilters.length&&t.filter.pop()},e.prototype._render=function(t){},e.prototype.destroy=function(e){t.prototype.destroy.call(this),this.sortDirty=!1;var i="boolean"==typeof e?e:e&&e.children,r=this.removeChildren(0,this.children.length);if(i)for(var n=0;n<r.length;++n)r[n].destroy(e)},i.width.get=function(){return this.scale.x*this.getLocalBounds().width},i.width.set=function(t){var e=this.getLocalBounds().width;this.scale.x=0!==e?t/e:1,this._width=t},i.height.get=function(){return this.scale.y*this.getLocalBounds().height},i.height.set=function(t){var e=this.getLocalBounds().height;this.scale.y=0!==e?t/e:1,this._height=t},Object.defineProperties(e.prototype,i),e}(Ue);Xe.prototype.containerUpdateTransform=Xe.prototype.updateTransform;var je={accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,_accessibleActive:!1,_accessibleDiv:!1};Ue.mixin(je);var Ge=function(t){this._hookDiv=null,(v.tablet||v.phone)&&this.createTouchHook();var e=document.createElement("div");e.style.width="100px",e.style.height="100px",e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.style.zIndex=2,this.div=e,this.pool=[],this.renderId=0,this.debug=!1,this.renderer=t,this.children=[],this._onKeyDown=this._onKeyDown.bind(this),this._onMouseMove=this._onMouseMove.bind(this),this.isActive=!1,this.isMobileAccessibility=!1,window.addEventListener("keydown",this._onKeyDown,!1)};Ge.prototype.createTouchHook=function(){var t=this,e=document.createElement("button");e.style.width="1px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.left="-1000px",e.style.zIndex=2,e.style.backgroundColor="#FF0000",e.title="HOOK DIV",e.addEventListener("focus",function(){t.isMobileAccessibility=!0,t.activate(),t.destroyTouchHook()}),document.body.appendChild(e),this._hookDiv=e},Ge.prototype.destroyTouchHook=function(){this._hookDiv&&(document.body.removeChild(this._hookDiv),this._hookDiv=null)},Ge.prototype.activate=function(){this.isActive||(this.isActive=!0,window.document.addEventListener("mousemove",this._onMouseMove,!0),window.removeEventListener("keydown",this._onKeyDown,!1),this.renderer.on("postrender",this.update,this),this.renderer.view.parentNode&&this.renderer.view.parentNode.appendChild(this.div))},Ge.prototype.deactivate=function(){this.isActive&&!this.isMobileAccessibility&&(this.isActive=!1,window.document.removeEventListener("mousemove",this._onMouseMove,!0),window.addEventListener("keydown",this._onKeyDown,!1),this.renderer.off("postrender",this.update),this.div.parentNode&&this.div.parentNode.removeChild(this.div))},Ge.prototype.updateAccessibleObjects=function(t){if(t.visible){t.accessible&&t.interactive&&(t._accessibleActive||this.addChild(t),t.renderId=this.renderId);for(var e=t.children,i=0;i<e.length;i++)this.updateAccessibleObjects(e[i])}},Ge.prototype.update=function(){if(this.renderer.renderingToScreen){this.updateAccessibleObjects(this.renderer._lastObjectRendered);var t=this.renderer.view.getBoundingClientRect(),e=t.width/this.renderer.width,i=t.height/this.renderer.height,r=this.div;r.style.left=t.left+"px",r.style.top=t.top+"px",r.style.width=this.renderer.width+"px",r.style.height=this.renderer.height+"px";for(var n=0;n<this.children.length;n++){var o=this.children[n];if(o.renderId!==this.renderId)o._accessibleActive=!1,Vt(this.children,n,1),this.div.removeChild(o._accessibleDiv),this.pool.push(o._accessibleDiv),o._accessibleDiv=null,n--,0===this.children.length&&this.deactivate();else{r=o._accessibleDiv;var s=o.hitArea,a=o.worldTransform;o.hitArea?(r.style.left=(a.tx+s.x*a.a)*e+"px",r.style.top=(a.ty+s.y*a.d)*i+"px",r.style.width=s.width*a.a*e+"px",r.style.height=s.height*a.d*i+"px"):(s=o.getBounds(),this.capHitArea(s),r.style.left=s.x*e+"px",r.style.top=s.y*i+"px",r.style.width=s.width*e+"px",r.style.height=s.height*i+"px",r.title!==o.accessibleTitle&&null!==o.accessibleTitle&&(r.title=o.accessibleTitle),r.getAttribute("aria-label")!==o.accessibleHint&&null!==o.accessibleHint&&r.setAttribute("aria-label",o.accessibleHint))}}this.renderId++}},Ge.prototype.capHitArea=function(t){t.x<0&&(t.width+=t.x,t.x=0),t.y<0&&(t.height+=t.y,t.y=0),t.x+t.width>this.renderer.width&&(t.width=this.renderer.width-t.x),t.y+t.height>this.renderer.height&&(t.height=this.renderer.height-t.y)},Ge.prototype.addChild=function(t){var e=this.pool.pop();e||((e=document.createElement("button")).style.width="100px",e.style.height="100px",e.style.backgroundColor=this.debug?"rgba(255,0,0,0.5)":"transparent",e.style.position="absolute",e.style.zIndex=2,e.style.borderStyle="none",navigator.userAgent.toLowerCase().indexOf("chrome")>-1?e.setAttribute("aria-live","off"):e.setAttribute("aria-live","polite"),navigator.userAgent.match(/rv:.*Gecko\//)?e.setAttribute("aria-relevant","additions"):e.setAttribute("aria-relevant","text"),e.addEventListener("click",this._onClick.bind(this)),e.addEventListener("focus",this._onFocus.bind(this)),e.addEventListener("focusout",this._onFocusOut.bind(this))),t.accessibleTitle&&null!==t.accessibleTitle?e.title=t.accessibleTitle:t.accessibleHint&&null!==t.accessibleHint||(e.title="displayObject "+t.tabIndex),t.accessibleHint&&null!==t.accessibleHint&&e.setAttribute("aria-label",t.accessibleHint),t._accessibleActive=!0,t._accessibleDiv=e,e.displayObject=t,this.children.push(t),this.div.appendChild(t._accessibleDiv),t._accessibleDiv.tabIndex=t.tabIndex},Ge.prototype._onClick=function(t){var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"click",e.eventData),e.dispatchEvent(t.target.displayObject,"pointertap",e.eventData),e.dispatchEvent(t.target.displayObject,"tap",e.eventData)},Ge.prototype._onFocus=function(t){t.target.getAttribute("aria-live","off")||t.target.setAttribute("aria-live","assertive");var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"mouseover",e.eventData)},Ge.prototype._onFocusOut=function(t){t.target.getAttribute("aria-live","off")||t.target.setAttribute("aria-live","polite");var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"mouseout",e.eventData)},Ge.prototype._onKeyDown=function(t){9===t.keyCode&&this.activate()},Ge.prototype._onMouseMove=function(t){0===t.movementX&&0===t.movementY||this.deactivate()},Ge.prototype.destroy=function(){this.destroyTouchHook(),this.div=null;for(var t=0;t<this.children.length;t++)this.children[t].div=null;window.document.removeEventListener("mousemove",this._onMouseMove,!0),window.removeEventListener("keydown",this._onKeyDown),this.pool=null,this.children=null,this.renderer=null};var He={AccessibilityManager:Ge,accessibleTarget:je},ze=function(t){this.items=[],this._name=t,this._aliasCount=0},Ve={empty:{configurable:!0},name:{configurable:!0}};ze.prototype.emit=function(t,e,i,r,n,o,s,a){if(arguments.length>8)throw new Error("max arguments reached");var h=this.name,u=this.items;this._aliasCount++;for(var l=0,c=u.length;l<c;l++)u[l][h](t,e,i,r,n,o,s,a);return u===this.items&&this._aliasCount--,this},ze.prototype.ensureNonAliasedItems=function(){this._aliasCount>0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))},ze.prototype.add=function(t){return t[this._name]&&(this.ensureNonAliasedItems(),this.remove(t),this.items.push(t)),this},ze.prototype.remove=function(t){var e=this.items.indexOf(t);return-1!==e&&(this.ensureNonAliasedItems(),this.items.splice(e,1)),this},ze.prototype.contains=function(t){return-1!==this.items.indexOf(t)},ze.prototype.removeAll=function(){return this.ensureNonAliasedItems(),this.items.length=0,this},ze.prototype.destroy=function(){this.removeAll(),this.items=null,this._name=null},Ve.empty.get=function(){return 0===this.items.length},Ve.name.get=function(){return this._name},Object.defineProperties(ze.prototype,Ve),ze.prototype.dispatch=ze.prototype.emit,ze.prototype.run=ze.prototype.emit,g.TARGET_FPMS=.06;var Ye={INTERACTION:50,HIGH:25,NORMAL:0,LOW:-25,UTILITY:-50},We=function(t,e,i,r){void 0===e&&(e=null),void 0===i&&(i=0),void 0===r&&(r=!1),this.fn=t,this.context=e,this.priority=i,this.once=r,this.next=null,this.previous=null,this._destroyed=!1};We.prototype.match=function(t,e){return e=e||null,this.fn===t&&this.context===e},We.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},We.prototype.connect=function(t){this.previous=t,t.next&&(t.next.previous=this),this.next=t.next,t.next=this},We.prototype.destroy=function(t){void 0===t&&(t=!1),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.next;return this.next=t?null:e,this.previous=null,e};var qe=function(){var t=this;this._head=new We(null,null,1/0),this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this.autoStart=!1,this.deltaTime=1,this.deltaMS=1/g.TARGET_FPMS,this.elapsedMS=1/g.TARGET_FPMS,this.lastTime=-1,this.speed=1,this.started=!1,this._protected=!1,this._lastFrame=-1,this._tick=function(e){t._requestId=null,t.started&&(t.update(e),t.started&&null===t._requestId&&t._head.next&&(t._requestId=requestAnimationFrame(t._tick)))}},Ze={FPS:{configurable:!0},minFPS:{configurable:!0},maxFPS:{configurable:!0}},Ke={shared:{configurable:!0},system:{configurable:!0}};qe.prototype._requestIfNeeded=function(){null===this._requestId&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))},qe.prototype._cancelIfNeeded=function(){null!==this._requestId&&(cancelAnimationFrame(this._requestId),this._requestId=null)},qe.prototype._startIfPossible=function(){this.started?this._requestIfNeeded():this.autoStart&&this.start()},qe.prototype.add=function(t,e,i){return void 0===i&&(i=Ye.NORMAL),this._addListener(new We(t,e,i))},qe.prototype.addOnce=function(t,e,i){return void 0===i&&(i=Ye.NORMAL),this._addListener(new We(t,e,i,!0))},qe.prototype._addListener=function(t){var e=this._head.next,i=this._head;if(e){for(;e;){if(t.priority>e.priority){t.connect(i);break}i=e,e=e.next}t.previous||t.connect(i)}else t.connect(i);return this._startIfPossible(),this},qe.prototype.remove=function(t,e){for(var i=this._head.next;i;)i=i.match(t,e)?i.destroy():i.next;return this._head.next||this._cancelIfNeeded(),this},qe.prototype.start=function(){this.started||(this.started=!0,this._requestIfNeeded())},qe.prototype.stop=function(){this.started&&(this.started=!1,this._cancelIfNeeded())},qe.prototype.destroy=function(){if(!this._protected){this.stop();for(var t=this._head.next;t;)t=t.destroy(!0);this._head.destroy(),this._head=null}},qe.prototype.update=function(t){var e;if(void 0===t&&(t=performance.now()),t>this.lastTime){if((e=this.elapsedMS=t-this.lastTime)>this._maxElapsedMS&&(e=this._maxElapsedMS),e*=this.speed,this._minElapsedMS){var i=t-this._lastFrame|0;if(i<this._minElapsedMS)return;this._lastFrame=t-i%this._minElapsedMS}this.deltaMS=e,this.deltaTime=this.deltaMS*g.TARGET_FPMS;for(var r=this._head,n=r.next;n;)n=n.emit(this.deltaTime);r.next||this._cancelIfNeeded()}else this.deltaTime=this.deltaMS=this.elapsedMS=0;this.lastTime=t},Ze.FPS.get=function(){return 1e3/this.elapsedMS},Ze.minFPS.get=function(){return 1e3/this._maxElapsedMS},Ze.minFPS.set=function(t){var e=Math.min(this.maxFPS,t),i=Math.min(Math.max(0,e)/1e3,g.TARGET_FPMS);this._maxElapsedMS=1/i},Ze.maxFPS.get=function(){return this._minElapsedMS?Math.round(1e3/this._minElapsedMS):0},Ze.maxFPS.set=function(t){if(0===t)this._minElapsedMS=0;else{var e=Math.max(this.minFPS,t);this._minElapsedMS=1/(e/1e3)}},Ke.shared.get=function(){if(!qe._shared){var t=qe._shared=new qe;t.autoStart=!0,t._protected=!0}return qe._shared},Ke.system.get=function(){if(!qe._system){var t=qe._system=new qe;t.autoStart=!0,t._protected=!0}return qe._system},Object.defineProperties(qe.prototype,Ze),Object.defineProperties(qe,Ke);var Je=function(){};Je.init=function(t){var e=this;t=Object.assign({autoStart:!0,sharedTicker:!1},t),Object.defineProperty(this,"ticker",{set:function(t){this._ticker&&this._ticker.remove(this.render,this),this._ticker=t,t&&t.add(this.render,this,Ye.LOW)},get:function(){return this._ticker}}),this.stop=function(){e._ticker.stop()},this.start=function(){e._ticker.start()},this._ticker=null,this.ticker=t.sharedTicker?qe.shared:new qe,t.autoStart&&this.start()},Je.destroy=function(){if(this._ticker){var t=this._ticker;this.ticker=null,t.destroy()}};var Qe=function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this._width=t,this._height=e,this.destroyed=!1,this.internal=!1,this.onResize=new ze("setRealSize",2),this.onUpdate=new ze("update"),this.onError=new ze("onError",1)},$e={valid:{configurable:!0},width:{configurable:!0},height:{configurable:!0}};Qe.prototype.bind=function(t){this.onResize.add(t),this.onUpdate.add(t),this.onError.add(t),(this._width||this._height)&&this.onResize.run(this._width,this._height)},Qe.prototype.unbind=function(t){this.onResize.remove(t),this.onUpdate.remove(t),this.onError.remove(t)},Qe.prototype.resize=function(t,e){t===this._width&&e===this._height||(this._width=t,this._height=e,this.onResize.run(t,e))},$e.valid.get=function(){return!!this._width&&!!this._height},Qe.prototype.update=function(){this.destroyed||this.onUpdate.run()},Qe.prototype.load=function(){return Promise.resolve()},$e.width.get=function(){return this._width},$e.height.get=function(){return this._height},Qe.prototype.upload=function(t,e,i){return!1},Qe.prototype.style=function(t,e,i){return!1},Qe.prototype.dispose=function(){},Qe.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)},Object.defineProperties(Qe.prototype,$e);var ti=function(t){function e(e){var i=e.naturalWidth||e.videoWidth||e.width,r=e.naturalHeight||e.videoHeight||e.height;t.call(this,i,r),this.source=e,this.noSubImage=!1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.crossOrigin=function(t,e,i){void 0===i&&0!==e.indexOf("data:")?t.crossOrigin=se(e):!1!==i&&(t.crossOrigin="string"==typeof i?i:"anonymous")},e.prototype.upload=function(t,e,i,r){var n=t.gl,o=e.realWidth,s=e.realHeight;return r=r||this.source,n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e.premultiplyAlpha),this.noSubImage||e.target!==n.TEXTURE_2D||i.width!==o||i.height!==s?(i.width=o,i.height=s,n.texImage2D(e.target,0,e.format,e.format,e.type,r)):n.texSubImage2D(n.TEXTURE_2D,0,0,0,e.format,e.type,r),!0},e.prototype.update=function(){if(!this.destroyed){var e=this.source.naturalWidth||this.source.videoWidth||this.source.width,i=this.source.naturalHeight||this.source.videoHeight||this.source.height;this.resize(e,i),t.prototype.update.call(this)}},e.prototype.dispose=function(){this.source=null},e}(Qe),ei=function(t){function e(e,i){if(i=i||{},!(e instanceof HTMLImageElement)){var r=new Image;t.crossOrigin(r,e,i.crossorigin),r.src=e,e=r}t.call(this,e),!e.complete&&this._width&&this._height&&(this._width=0,this._height=0),this.url=e.src,this._process=null,this.preserveBitmap=!1,this.createBitmap=(void 0!==i.createBitmap?i.createBitmap:g.CREATE_IMAGE_BITMAP)&&!!window.createImageBitmap,this.premultiplyAlpha=!1!==i.premultiplyAlpha,this.bitmap=null,this._load=null,!1!==i.autoLoad&&this.load()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.load=function(t){var e=this;return void 0!==t&&(this.createBitmap=t),this._load?this._load:(this._load=new Promise(function(t){e.url=e.source.src;var i=e.source,r=function(){e.destroyed||(i.onload=null,i.onerror=null,e.resize(i.width,i.height),e._load=null,e.createBitmap?t(e.process()):t(e))};i.complete&&i.src?r():(i.onload=r,i.onerror=function(t){return e.onError.run(t)})}),this._load)},e.prototype.process=function(){var t=this;return null!==this._process?this._process:null===this.bitmap&&window.createImageBitmap?(this._process=window.createImageBitmap(this.source,0,0,this.source.width,this.source.height,{premultiplyAlpha:this.premultiplyAlpha?"premultiply":"none"}).then(function(e){return t.destroyed?Promise.reject():(t.bitmap=e,t.update(),t._process=null,Promise.resolve(t))}),this._process):Promise.resolve(this)},e.prototype.upload=function(e,i,r){if(i.premultiplyAlpha=this.premultiplyAlpha,!this.createBitmap)return t.prototype.upload.call(this,e,i,r);if(!this.bitmap&&(this.process(),!this.bitmap))return!1;if(t.prototype.upload.call(this,e,i,r,this.bitmap),!this.preserveBitmap){var n=!0;for(var o in i._glTextures){var s=i._glTextures[o];if(s!==r&&s.dirtyId!==i.dirtyId){n=!1;break}}n&&(this.bitmap.close&&this.bitmap.close(),this.bitmap=null)}return!0},e.prototype.dispose=function(){this.source.onload=null,this.source.onerror=null,t.prototype.dispose.call(this),this.bitmap&&(this.bitmap.close(),this.bitmap=null),this._process=null,this._load=null},e}(ti),ii=[];function ri(t,e){if(!t)return null;var i="";if("string"==typeof t){var r=/\.(\w{3,4})(?:$|\?|#)/i.exec(t);r&&(i=r[1].toLowerCase())}for(var n=ii.length-1;n>=0;--n){var o=ii[n];if(o.test&&o.test(t,i))return new o(t,e)}return new ei(t,e)}var ni=function(t){function e(e,i){var r=i||{},n=r.width,o=r.height;if(!n||!o)throw new Error("BufferResource width or height invalid");t.call(this,n,o),this.data=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.upload=function(t,e,i){var r=t.gl;return r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e.premultiplyAlpha),i.width===e.width&&i.height===e.height?r.texSubImage2D(e.target,0,0,0,e.width,e.height,e.format,e.type,this.data):(i.width=e.width,i.height=e.height,r.texImage2D(e.target,0,i.internalFormat,e.width,e.height,0,e.format,i.type,this.data)),!0},e.prototype.dispose=function(){this.data=null},e.test=function(t){return t instanceof Float32Array||t instanceof Uint8Array||t instanceof Uint32Array},e}(Qe),oi={scaleMode:It.NEAREST,format:wt.RGBA,premultiplyAlpha:!1},si=function(t){function e(e,i){void 0===e&&(e=null),void 0===i&&(i=null),t.call(this);var r=(i=i||{}).premultiplyAlpha,n=i.mipmap,o=i.anisotropicLevel,s=i.scaleMode,a=i.width,h=i.height,u=i.wrapMode,l=i.format,c=i.type,d=i.target,p=i.resolution,f=i.resourceOptions;!e||e instanceof Qe||((e=ri(e,f)).internal=!0),this.width=a||0,this.height=h||0,this.resolution=p||g.RESOLUTION,this.mipmap=void 0!==n?n:g.MIPMAP_TEXTURES,this.anisotropicLevel=void 0!==o?o:g.ANISOTROPIC_LEVEL,this.wrapMode=u||g.WRAP_MODE,this.scaleMode=void 0!==s?s:g.SCALE_MODE,this.format=l||wt.RGBA,this.type=c||St.UNSIGNED_BYTE,this.target=d||Et.TEXTURE_2D,this.premultiplyAlpha=!1!==r,this.uid=Wt(),this.touched=0,this.isPowerOfTwo=!1,this._refreshPOT(),this._glTextures={},this.dirtyId=0,this.dirtyStyleId=0,this.cacheId=null,this.valid=a>0&&h>0,this.textureCacheIds=[],this.destroyed=!1,this.resource=null,this._batchEnabled=0,this.setResource(e)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={realWidth:{configurable:!0},realHeight:{configurable:!0}};return i.realWidth.get=function(){return Math.ceil(this.width*this.resolution-1e-4)},i.realHeight.get=function(){return Math.ceil(this.height*this.resolution-1e-4)},e.prototype.setStyle=function(t,e){var i;return void 0!==t&&t!==this.scaleMode&&(this.scaleMode=t,i=!0),void 0!==e&&e!==this.mipmap&&(this.mipmap=e,i=!0),i&&this.dirtyStyleId++,this},e.prototype.setSize=function(t,e,i){return this.resolution=i||this.resolution,this.width=t,this.height=e,this._refreshPOT(),this.update(),this},e.prototype.setRealSize=function(t,e,i){return this.resolution=i||this.resolution,this.width=t/this.resolution,this.height=e/this.resolution,this._refreshPOT(),this.update(),this},e.prototype._refreshPOT=function(){this.isPowerOfTwo=Kt(this.realWidth)&&Kt(this.realHeight)},e.prototype.setResolution=function(t){var e=this.resolution;return e===t?this:(this.resolution=t,this.valid&&(this.width=this.width*e/t,this.height=this.height*e/t,this.emit("update",this)),this._refreshPOT(),this)},e.prototype.setResource=function(t){if(this.resource===t)return this;if(this.resource)throw new Error("Resource can be set only once");return t.bind(this),this.resource=t,this},e.prototype.update=function(){this.valid?(this.dirtyId++,this.dirtyStyleId++,this.emit("update",this)):this.width>0&&this.height>0&&(this.valid=!0,this.emit("loaded",this),this.emit("update",this))},e.prototype.onError=function(t){this.emit("error",this,t)},e.prototype.destroy=function(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete te[this.cacheId],delete $t[this.cacheId],this.cacheId=null),this.dispose(),e.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0},e.prototype.dispose=function(){this.emit("dispose",this)},e.from=function(t,i){var r=null;"string"==typeof t?r=t:(t._pixiId||(t._pixiId="pixiid_"+Wt()),r=t._pixiId);var n=te[r];return n||((n=new e(t,i)).cacheId=r,e.addToCache(n,r)),n},e.fromBuffer=function(t,i,r,n){t=t||new Float32Array(i*r*4);var o=new ni(t,{width:i,height:r}),s=t instanceof Float32Array?St.FLOAT:St.UNSIGNED_BYTE;return new e(o,Object.assign(oi,n||{width:i,height:r,type:s}))},e.addToCache=function(t,e){e&&(-1===t.textureCacheIds.indexOf(e)&&t.textureCacheIds.push(e),te[e]&&console.warn("BaseTexture added to the cache with an id ["+e+"] that already had an entry"),te[e]=t)},e.removeFromCache=function(t){if("string"==typeof t){var e=te[t];if(e){var i=e.textureCacheIds.indexOf(t);return i>-1&&e.textureCacheIds.splice(i,1),delete te[t],e}}else if(t&&t.textureCacheIds){for(var r=0;r<t.textureCacheIds.length;++r)delete te[t.textureCacheIds[r]];return t.textureCacheIds.length=0,t}return null},Object.defineProperties(e.prototype,i),e}(m);si._globalBatch=0;var ai=function(t){function e(e,i){var r;i=i||{};var n=e;Array.isArray(e)&&(r=e,n=e.length),t.call(this,i.width,i.height),this.items=[],this.itemDirtyIds=[];for(var o=0;o<n;o++){var s=new si;this.items.push(s),this.itemDirtyIds.push(-1)}if(this.length=n,this._load=null,r)for(var a=0;a<n;a++)this.addResourceAt(ri(r[a],i),a)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.dispose=function(){for(var t=0,e=this.length;t<e;t++)this.items[t].destroy();this.items=null,this.itemDirtyIds=null,this._load=null},e.prototype.addResourceAt=function(t,e){if(!this.items[e])throw new Error("Index "+e+" is out of bounds");return t.valid&&!this.valid&&this.resize(t.width,t.height),this.items[e].setResource(t),this},e.prototype.bind=function(e){t.prototype.bind.call(this,e),e.target=Et.TEXTURE_2D_ARRAY;for(var i=0;i<this.length;i++)this.items[i].on("update",e.update,e)},e.prototype.unbind=function(e){t.prototype.unbind.call(this,e);for(var i=0;i<this.length;i++)this.items[i].off("update",e.update,e)},e.prototype.load=function(){var t=this;if(this._load)return this._load;var e=this.items.map(function(t){return t.resource}),i=e.map(function(t){return t.load()});return this._load=Promise.all(i).then(function(){var i=e[0],r=i.width,n=i.height;return t.resize(r,n),Promise.resolve(t)}),this._load},e.prototype.upload=function(t,e,i){var r=this.length,n=this.itemDirtyIds,o=this.items,s=t.gl;i.dirtyId<0&&s.texImage3D(s.TEXTURE_2D_ARRAY,0,e.format,this._width,this._height,r,0,e.format,e.type,null);for(var a=0;a<r;a++){var h=o[a];n[a]<h.dirtyId&&(n[a]=h.dirtyId,h.valid&&s.texSubImage3D(s.TEXTURE_2D_ARRAY,0,0,0,a,h.resource.width,h.resource.height,1,e.format,e.type,h.resource.source))}return!0},e}(Qe),hi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.test=function(t){var e=window.OffscreenCanvas;return!!(e&&t instanceof e)||t instanceof HTMLCanvasElement},e}(ti),ui=function(t){function e(i,r){if(r=r||{},t.call(this,i,r),this.length!==e.SIDES)throw new Error("Invalid length. Got "+this.length+", expected 6");for(var n=0;n<e.SIDES;n++)this.items[n].target=Et.TEXTURE_CUBE_MAP_POSITIVE_X+n;!1!==r.autoLoad&&this.load()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.bind=function(e){t.prototype.bind.call(this,e),e.target=Et.TEXTURE_CUBE_MAP},e.prototype.upload=function(t,i,r){for(var n=this.itemDirtyIds,o=0;o<e.SIDES;o++){var s=this.items[o];n[o]<s.dirtyId&&(n[o]=s.dirtyId,s.valid&&s.resource.upload(t,s,r))}return!0},e}(ai);ui.SIDES=6;var li=function(t){function e(e,i){i=i||{},t.call(this,document.createElement("canvas")),this._width=0,this._height=0,this.svg=e,this.scale=i.scale||1,this._overrideWidth=i.width,this._overrideHeight=i.height,this._resolve=null,this._crossorigin=i.crossorigin,this._load=null,!1!==i.autoLoad&&this.load()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.load=function(){var t=this;return this._load?this._load:(this._load=new Promise(function(e){if(t._resolve=function(){t.resize(t.source.width,t.source.height),e(t)},/^\<svg/.test(t.svg.trim())){if(!btoa)throw new Error("Your browser doesn't support base64 conversions.");t.svg="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(t.svg)))}t._loadSvg()}),this._load)},e.prototype._loadSvg=function(){var e=this,i=new Image;t.crossOrigin(i,this.svg,this._crossorigin),i.src=this.svg,i.onerror=function(t){i.onerror=null,e.onError.run(t)},i.onload=function(){var t=i.width,r=i.height;if(!t||!r)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");var n=t*e.scale,o=r*e.scale;(e._overrideWidth||e._overrideHeight)&&(n=e._overrideWidth||e._overrideHeight/r*t,o=e._overrideHeight||e._overrideWidth/t*r),n=Math.round(n),o=Math.round(o);var s=e.source;s.width=n,s.height=o,s._pixiId="canvas_"+Wt(),s.getContext("2d").drawImage(i,0,0,t,r,0,0,n,o),e._resolve(),e._resolve=null}},e.getSize=function(t){var i=e.SVG_SIZE.exec(t),r={};return i&&(r[i[1]]=Math.round(parseFloat(i[3])),r[i[5]]=Math.round(parseFloat(i[7]))),r},e.prototype.dispose=function(){t.prototype.dispose.call(this),this._resolve=null,this._crossorigin=null},e.test=function(t,e){return"svg"===e||"string"==typeof t&&0===t.indexOf("data:image/svg+xml;base64")||"string"==typeof t&&0===t.indexOf("<svg")},e}(ti);li.SVG_SIZE=/<svg[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i;var ci=function(t){function e(e,i){if(i=i||{},!(e instanceof HTMLVideoElement)){var r=document.createElement("video");r.setAttribute("preload","auto"),r.setAttribute("webkit-playsinline",""),r.setAttribute("playsinline",""),"string"==typeof e&&(e=[e]),t.crossOrigin(r,e[0].src||e[0],i.crossorigin);for(var n=0;n<e.length;++n){var o=document.createElement("source"),s=e[n],a=s.src,h=s.mime,u=(a=a||e[n]).split("?").shift().toLowerCase(),l=u.substr(u.lastIndexOf(".")+1);h=h||"video/"+l,o.src=a,o.type=h,r.appendChild(o)}e=r}t.call(this,e),this.noSubImage=!0,this._autoUpdate=!0,this._isAutoUpdating=!1,this._updateFPS=i.updateFPS||0,this._msToNextUpdate=0,this.autoPlay=!1!==i.autoPlay,this._load=null,this._resolve=null,this._onCanPlay=this._onCanPlay.bind(this),this._onError=this._onError.bind(this),!1!==i.autoLoad&&this.load()}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={autoUpdate:{configurable:!0},updateFPS:{configurable:!0}};return e.prototype.update=function(e){if(void 0===e&&(e=0),!this.destroyed){var i=qe.shared.elapsedMS*this.source.playbackRate;this._msToNextUpdate=Math.floor(this._msToNextUpdate-i),(!this._updateFPS||this._msToNextUpdate<=0)&&(t.prototype.update.call(this,e),this._msToNextUpdate=this._updateFPS?Math.floor(1e3/this._updateFPS):0)}},e.prototype.load=function(){var t=this;if(this._load)return this._load;var e=this.source;return(e.readyState===e.HAVE_ENOUGH_DATA||e.readyState===e.HAVE_FUTURE_DATA)&&e.width&&e.height&&(e.complete=!0),e.addEventListener("play",this._onPlayStart.bind(this)),e.addEventListener("pause",this._onPlayStop.bind(this)),this._isSourceReady()?this._onCanPlay():(e.addEventListener("canplay",this._onCanPlay),e.addEventListener("canplaythrough",this._onCanPlay),e.addEventListener("error",this._onError,!0)),this._load=new Promise(function(i){t.valid?i(t):(t._resolve=i,e.load())}),this._load},e.prototype._onError=function(){this.source.removeEventListener("error",this._onError,!0),this.onError.run(event)},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.valid||this._onCanPlay(),!this._isAutoUpdating&&this.autoUpdate&&(qe.shared.add(this.update,this),this._isAutoUpdating=!0)},e.prototype._onPlayStop=function(){this._isAutoUpdating&&(qe.shared.remove(this.update,this),this._isAutoUpdating=!1)},e.prototype._onCanPlay=function(){var t=this.source;t.removeEventListener("canplay",this._onCanPlay),t.removeEventListener("canplaythrough",this._onCanPlay);var e=this.valid;this.resize(t.videoWidth,t.videoHeight),!e&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&t.play()},e.prototype.dispose=function(){this._isAutoUpdating&&qe.shared.remove(this.update,this),this.source&&(this.source.removeEventListener("error",this._onError,!0),this.source.pause(),this.source.src="",this.source.load()),t.prototype.dispose.call(this)},i.autoUpdate.get=function(){return this._autoUpdate},i.autoUpdate.set=function(t){t!==this._autoUpdate&&(this._autoUpdate=t,!this._autoUpdate&&this._isAutoUpdating?(qe.shared.remove(this.update,this),this._isAutoUpdating=!1):this._autoUpdate&&!this._isAutoUpdating&&(qe.shared.add(this.update,this),this._isAutoUpdating=!0))},i.updateFPS.get=function(){return this._updateFPS},i.updateFPS.set=function(t){t!==this._updateFPS&&(this._updateFPS=t)},e.test=function(t,i){return t instanceof HTMLVideoElement||e.TYPES.indexOf(i)>-1},Object.defineProperties(e.prototype,i),e}(ti);ci.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"];var di=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.test=function(t){return!!window.createImageBitmap&&t instanceof ImageBitmap},e}(ti);ii.push(ei,di,hi,ci,li,ni,ui,ai);var pi={INSTALLED:ii,autoDetectResource:ri,ArrayResource:ai,BufferResource:ni,CanvasResource:hi,CubeResource:ui,ImageResource:ei,ImageBitmapResource:di,SVGResource:li,VideoResource:ci,Resource:Qe,BaseImageResource:ti},fi=function(t){this.renderer=t};fi.prototype.destroy=function(){this.renderer=null};var vi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.upload=function(t,e,i){var r=t.gl;return r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e.premultiplyAlpha),i.width===e.width&&i.height===e.height?r.texSubImage2D(e.target,0,0,0,e.width,e.height,e.format,e.type,this.data):(i.width=e.width,i.height=e.height,r.texImage2D(e.target,0,r.DEPTH_COMPONENT16,e.width,e.height,0,e.format,e.type,this.data)),!0},e}(ni),gi=function(t,e){this.width=Math.ceil(t||100),this.height=Math.ceil(e||100),this.stencil=!1,this.depth=!1,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.depthTexture=null,this.colorTextures=[],this.glFramebuffers={},this.disposeRunner=new ze("disposeFramebuffer",2)},mi={colorTexture:{configurable:!0}};mi.colorTexture.get=function(){return this.colorTextures[0]},gi.prototype.addColorTexture=function(t,e){return void 0===t&&(t=0),this.colorTextures[t]=e||new si(null,{scaleMode:0,resolution:1,mipmap:!1,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this},gi.prototype.addDepthTexture=function(t){return this.depthTexture=t||new si(new vi(null,{width:this.width,height:this.height}),{scaleMode:0,resolution:1,width:this.width,height:this.height,mipmap:!1,format:wt.DEPTH_COMPONENT,type:St.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this},gi.prototype.enableDepth=function(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this},gi.prototype.enableStencil=function(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this},gi.prototype.resize=function(t,e){if(t=Math.ceil(t),e=Math.ceil(e),t!==this.width||e!==this.height){this.width=t,this.height=e,this.dirtyId++,this.dirtySize++;for(var i=0;i<this.colorTextures.length;i++){var r=this.colorTextures[i],n=r.resolution;r.setSize(t/n,e/n)}if(this.depthTexture){var o=this.depthTexture.resolution;this.depthTexture.setSize(t/o,e/o)}}},gi.prototype.dispose=function(){this.disposeRunner.run(this,!1)},Object.defineProperties(gi.prototype,mi);var yi=function(t){function e(e){"number"==typeof e&&(e={width:arguments[0],height:arguments[1],scaleMode:arguments[2],resolution:arguments[3]});t.call(this,null,e);var i=e||{},r=i.width,n=i.height;this.mipmap=!1,this.width=Math.ceil(r)||100,this.height=Math.ceil(n)||100,this.valid=!0,this._canvasRenderTarget=null,this.clearColor=[0,0,0,0],this.framebuffer=new gi(this.width*this.resolution,this.height*this.resolution).addColorTexture(0,this),this.stencilMaskStack=[],this.filterStack=[{}]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.resize=function(t,e){t=Math.ceil(t),e=Math.ceil(e),this.framebuffer.resize(t*this.resolution,e*this.resolution)},e.prototype.dispose=function(){this.framebuffer.dispose(),t.prototype.dispose.call(this)},e.prototype.destroy=function(){t.prototype.destroy.call(this,!0),this.framebuffer=null},e}(si),_i=function(){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.uvsFloat32=new Float32Array(8)};_i.prototype.set=function(t,e,i){var r=e.width,n=e.height;if(i){var o=t.width/2/r,s=t.height/2/n,a=t.x/r+o,h=t.y/n+s;i=Pe.add(i,Pe.NW),this.x0=a+o*Pe.uX(i),this.y0=h+s*Pe.uY(i),i=Pe.add(i,2),this.x1=a+o*Pe.uX(i),this.y1=h+s*Pe.uY(i),i=Pe.add(i,2),this.x2=a+o*Pe.uX(i),this.y2=h+s*Pe.uY(i),i=Pe.add(i,2),this.x3=a+o*Pe.uX(i),this.y3=h+s*Pe.uY(i)}else this.x0=t.x/r,this.y0=t.y/n,this.x1=(t.x+t.width)/r,this.y1=t.y/n,this.x2=(t.x+t.width)/r,this.y2=(t.y+t.height)/n,this.x3=t.x/r,this.y3=(t.y+t.height)/n;this.uvsFloat32[0]=this.x0,this.uvsFloat32[1]=this.y0,this.uvsFloat32[2]=this.x1,this.uvsFloat32[3]=this.y1,this.uvsFloat32[4]=this.x2,this.uvsFloat32[5]=this.y2,this.uvsFloat32[6]=this.x3,this.uvsFloat32[7]=this.y3};var xi=new _i,bi=function(t){function e(i,r,n,o,s,a){if(t.call(this),this.noFrame=!1,r||(this.noFrame=!0,r=new Ce(0,0,1,1)),i instanceof e&&(i=i.baseTexture),this.baseTexture=i,this._frame=r,this.trim=o,this.valid=!1,this.requiresUpdate=!1,this._uvs=xi,this.uvMatrix=null,this.orig=n||r,this._rotate=Number(s||0),!0===s)this._rotate=2;else if(this._rotate%2!=0)throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually");this.defaultAnchor=a?new ce(a.x,a.y):new ce(0,0),this._updateID=0,this.textureCacheIds=[],i.valid?this.noFrame?i.valid&&this.onBaseTextureUpdated(i):this.frame=r:i.once("loaded",this.onBaseTextureUpdated,this),this.noFrame&&i.on("update",this.onBaseTextureUpdated,this)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={resolution:{configurable:!0},frame:{configurable:!0},rotate:{configurable:!0},width:{configurable:!0},height:{configurable:!0}};return e.prototype.update=function(){this.baseTexture.resource&&this.baseTexture.resource.update()},e.prototype.onBaseTextureUpdated=function(t){if(this.noFrame){if(!this.baseTexture.valid)return;this._frame.width=t.width,this._frame.height=t.height,this.valid=!0,this.updateUvs()}else this.frame=this._frame;this.emit("update",this)},e.prototype.destroy=function(t){if(this.baseTexture){if(t){var i=this.baseTexture.resource;i&&$t[i.url]&&e.removeFromCache(i.url),this.baseTexture.destroy()}this.baseTexture.off("update",this.onBaseTextureUpdated,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,this.defaultAnchor)},e.prototype.updateUvs=function(){this._uvs===xi&&(this._uvs=new _i),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++},e.from=function(t,i){void 0===i&&(i={});var r=null;"string"==typeof t?r=t:(t._pixiId||(t._pixiId="pixiid_"+Wt()),r=t._pixiId);var n=$t[r];return n||(i.resolution||(i.resolution=ae(t)),(n=new e(new si(t,i))).baseTexture.cacheId=r,si.addToCache(n.baseTexture,r),e.addToCache(n,r)),n},e.fromBuffer=function(t,i,r,n){return new e(si.fromBuffer(t,i,r,n))},e.fromLoader=function(t,i,r){var n=new ei(t);n.url=i;var o=new e(new si(n,{scaleMode:g.SCALE_MODE,resolution:ae(i)}));return r||(r=i),si.addToCache(o.baseTexture,r),e.addToCache(o,r),r!==i&&(si.addToCache(o.baseTexture,i),e.addToCache(o,i)),o},e.addToCache=function(t,e){e&&(-1===t.textureCacheIds.indexOf(e)&&t.textureCacheIds.push(e),$t[e]&&console.warn("Texture added to the cache with an id ["+e+"] that already had an entry"),$t[e]=t)},e.removeFromCache=function(t){if("string"==typeof t){var e=$t[t];if(e){var i=e.textureCacheIds.indexOf(t);return i>-1&&e.textureCacheIds.splice(i,1),delete $t[t],e}}else if(t&&t.textureCacheIds){for(var r=0;r<t.textureCacheIds.length;++r)$t[t.textureCacheIds[r]]===t&&delete $t[t.textureCacheIds[r]];return t.textureCacheIds.length=0,t}return null},i.resolution.get=function(){return this.baseTexture.resolution},i.frame.get=function(){return this._frame},i.frame.set=function(t){this._frame=t,this.noFrame=!1;var e=t.x,i=t.y,r=t.width,n=t.height,o=e+r>this.baseTexture.width,s=i+n>this.baseTexture.height;if(o||s){var a=o&&s?"and":"or",h="X: "+e+" + "+r+" = "+(e+r)+" > "+this.baseTexture.width,u="Y: "+i+" + "+n+" = "+(i+n)+" > "+this.baseTexture.height;throw new Error("Texture Error: frame does not fit inside the base Texture dimensions: "+h+" "+a+" "+u)}this.valid=r&&n&&this.baseTexture.valid,this.trim||this.rotate||(this.orig=t),this.valid&&this.updateUvs()},i.rotate.get=function(){return this._rotate},i.rotate.set=function(t){this._rotate=t,this.valid&&this.updateUvs()},i.width.get=function(){return this.orig.width},i.height.get=function(){return this.orig.height},Object.defineProperties(e.prototype,i),e}(m);function Ti(t){t.destroy=function(){},t.on=function(){},t.once=function(){},t.emit=function(){}}bi.EMPTY=new bi(new si),Ti(bi.EMPTY),Ti(bi.EMPTY.baseTexture),bi.WHITE=function(){var t=document.createElement("canvas");t.width=16,t.height=16;var e=t.getContext("2d");return e.fillStyle="white",e.fillRect(0,0,16,16),new bi(new si(new hi(t)))}(),Ti(bi.WHITE),Ti(bi.WHITE.baseTexture);var wi=function(t){function e(e,i){var r=null;if(!(e instanceof yi)){var n=arguments[1],o=arguments[2],s=arguments[3],a=arguments[4];console.warn("Please use RenderTexture.create("+n+", "+o+") instead of the ctor directly."),r=arguments[0],i=null,e=new yi({width:n,height:o,scaleMode:s,resolution:a})}t.call(this,e,i),this.legacyRenderer=r,this.valid=!0,this.filterFrame=null,this.filterPoolKey=null,this.updateUvs()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.resize=function(t,e,i){void 0===i&&(i=!0),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,i&&this.baseTexture.resize(t,e),this.updateUvs()},e.prototype.setResolution=function(t){var e=this.baseTexture;e.resolution!==t&&(e.setResolution(t),this.resize(e.width,e.height,!1))},e.create=function(t){return"number"==typeof t&&(t={width:t,height:arguments[1],scaleMode:arguments[2],resolution:arguments[3]}),new e(new yi(t))},e}(bi),Ei=function(t){this.texturePool={},this.textureOptions=t||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0};Ei.prototype.createTexture=function(t,e){var i=new yi(Object.assign({width:t,height:e,resolution:1},this.textureOptions));return new wi(i)},Ei.prototype.getOptimalTexture=function(t,e,i){void 0===i&&(i=1);var r=Ei.SCREEN_KEY;t*=i,e*=i,this.enableFullScreen&&t===this._pixelsWidth&&e===this._pixelsHeight||(r=(65535&(t=Zt(t)))<<16|65535&(e=Zt(e))),this.texturePool[r]||(this.texturePool[r]=[]);var n=this.texturePool[r].pop();return n||(n=this.createTexture(t,e)),n.filterPoolKey=r,n.setResolution(i),n},Ei.prototype.getFilterTexture=function(t,e){var i=this.getOptimalTexture(t.width,t.height,e||t.resolution);return i.filterFrame=t.filterFrame,i},Ei.prototype.returnTexture=function(t){var e=t.filterPoolKey;t.filterFrame=null,this.texturePool[e].push(t)},Ei.prototype.returnFilterTexture=function(t){this.returnTexture(t)},Ei.prototype.clear=function(t){if(t=!1!==t)for(var e in this.texturePool){var i=this.texturePool[e];if(i)for(var r=0;r<i.length;r++)i[r].destroy(!0)}this.texturePool={}},Ei.prototype.setScreenSize=function(t){if(t.width!==this._pixelsWidth||t.height!==this._pixelsHeight){var e=Ei.SCREEN_KEY,i=this.texturePool[e];if(this.enableFullScreen=t.width>0&&t.height>0,i)for(var r=0;r<i.length;r++)i[r].destroy(!0);this.texturePool[e]=[],this._pixelsWidth=t.width,this._pixelsHeight=t.height}},Ei.SCREEN_KEY="screen";var Si=function(t,e,i,r,n,o,s){void 0===i&&(i=!1),void 0===r&&(r=5126),this.buffer=t,this.size=e,this.normalized=i,this.type=r,this.stride=n,this.start=o,this.instance=s};Si.prototype.destroy=function(){this.buffer=null},Si.from=function(t,e,i,r,n){return new Si(t,e,i,r,n)};var Ii=0,Pi=function(t,e,i){void 0===e&&(e=!0),void 0===i&&(i=!1),this.data=t||new Float32Array(1),this._glBuffers={},this._updateID=0,this.index=i,this.static=e,this.id=Ii++,this.disposeRunner=new ze("disposeBuffer",2)};function Ai(t){if(4===t.BYTES_PER_ELEMENT)return t instanceof Float32Array?"Float32Array":t instanceof Uint32Array?"Uint32Array":"Int32Array";if(2===t.BYTES_PER_ELEMENT){if(t instanceof Uint16Array)return"Uint16Array"}else if(1===t.BYTES_PER_ELEMENT&&t instanceof Uint8Array)return"Uint8Array";return null}Pi.prototype.update=function(t){this.data=t||this.data,this._updateID++},Pi.prototype.dispose=function(){this.disposeRunner.run(this,!1)},Pi.prototype.destroy=function(){this.dispose(),this.data=null},Pi.from=function(t){return t instanceof Array&&(t=new Float32Array(t)),new Pi(t)};var Oi={Float32Array:Float32Array,Uint32Array:Uint32Array,Int32Array:Int32Array,Uint8Array:Uint8Array};var Ci={5126:4,5123:2,5121:1},Mi=0,Di={Float32Array:Float32Array,Uint32Array:Uint32Array,Int32Array:Int32Array,Uint8Array:Uint8Array,Uint16Array:Uint16Array},Ri=function(t,e){void 0===t&&(t=[]),void 0===e&&(e={}),this.buffers=t,this.indexBuffer=null,this.attributes=e,this.glVertexArrayObjects={},this.id=Mi++,this.instanced=!1,this.instanceCount=1,this.disposeRunner=new ze("disposeGeometry",2),this.refCount=0};Ri.prototype.addAttribute=function(t,e,i,r,n,o,s,a){if(void 0===r&&(r=!1),void 0===a&&(a=!1),!e)throw new Error("You must pass a buffer when creating an attribute");e.data||(e instanceof Array&&(e=new Float32Array(e)),e=new Pi(e));var h=t.split("|");if(h.length>1){for(var u=0;u<h.length;u++)this.addAttribute(h[u],e,i,r,n);return this}var l=this.buffers.indexOf(e);return-1===l&&(this.buffers.push(e),l=this.buffers.length-1),this.attributes[t]=new Si(l,i,r,n,o,s,a),this.instanced=this.instanced||a,this},Ri.prototype.getAttribute=function(t){return this.attributes[t]},Ri.prototype.getBuffer=function(t){return this.buffers[this.getAttribute(t).buffer]},Ri.prototype.addIndex=function(t){return t.data||(t instanceof Array&&(t=new Uint16Array(t)),t=new Pi(t)),t.index=!0,this.indexBuffer=t,-1===this.buffers.indexOf(t)&&this.buffers.push(t),this},Ri.prototype.getIndex=function(){return this.indexBuffer},Ri.prototype.interleave=function(){if(1===this.buffers.length||2===this.buffers.length&&this.indexBuffer)return this;var t,e=[],i=[],r=new Pi;for(t in this.attributes){var n=this.attributes[t],o=this.buffers[n.buffer];e.push(o.data),i.push(n.size*Ci[n.type]/4),n.buffer=0}for(r.data=function(t,e){for(var i=0,r=0,n={},o=0;o<t.length;o++)r+=e[o],i+=t[o].length;for(var s=new ArrayBuffer(4*i),a=null,h=0,u=0;u<t.length;u++){var l=e[u],c=t[u],d=Ai(c);n[d]||(n[d]=new Oi[d](s)),a=n[d];for(var p=0;p<c.length;p++)a[(p/l|0)*r+h+p%l]=c[p];h+=l}return new Float32Array(s)}(e,i),t=0;t<this.buffers.length;t++)this.buffers[t]!==this.indexBuffer&&this.buffers[t].destroy();return this.buffers=[r],this.indexBuffer&&this.buffers.push(this.indexBuffer),this},Ri.prototype.getSize=function(){for(var t in this.attributes){var e=this.attributes[t];return this.buffers[e.buffer].data.length/(e.stride/4||e.size)}return 0},Ri.prototype.dispose=function(){this.disposeRunner.run(this,!1)},Ri.prototype.destroy=function(){this.dispose(),this.buffers=null,this.indexBuffer.destroy(),this.attributes=null},Ri.prototype.clone=function(){for(var t=new Ri,e=0;e<this.buffers.length;e++)t.buffers[e]=new Pi(this.buffers[e].data.slice());for(var i in this.attributes){var r=this.attributes[i];t.attributes[i]=new Si(r.buffer,r.size,r.normalized,r.type,r.stride,r.start,r.instance)}return this.indexBuffer&&(t.indexBuffer=t.buffers[this.buffers.indexOf(this.indexBuffer)],t.indexBuffer.index=!0),t},Ri.merge=function(t){for(var e,i=new Ri,r=[],n=[],o=[],s=0;s<t.length;s++){e=t[s];for(var a=0;a<e.buffers.length;a++)n[a]=n[a]||0,n[a]+=e.buffers[a].data.length,o[a]=0}for(var h=0;h<e.buffers.length;h++)r[h]=new(Di[Ai(e.buffers[h].data)])(n[h]),i.buffers[h]=new Pi(r[h]);for(var u=0;u<t.length;u++){e=t[u];for(var l=0;l<e.buffers.length;l++)r[l].set(e.buffers[l].data,o[l]),o[l]+=e.buffers[l].data.length}if(i.attributes=e.attributes,e.indexBuffer){i.indexBuffer=i.buffers[e.buffers.indexOf(e.indexBuffer)],i.indexBuffer.index=!0;for(var c=0,d=0,p=0,f=0,v=0;v<e.buffers.length;v++)if(e.buffers[v]!==e.indexBuffer){f=v;break}for(var g in e.attributes){var m=e.attributes[g];(0|m.buffer)===f&&(d+=m.size*Ci[m.type]/4)}for(var y=0;y<t.length;y++){for(var _=t[y].indexBuffer.data,x=0;x<_.length;x++)i.indexBuffer.data[x+p]+=c;c+=e.buffers[f].data.length/d,p+=_.length}}return i};var Fi=function(t){function e(){t.call(this),this.addAttribute("aVertexPosition",[0,0,1,0,1,1,0,1]).addIndex([0,1,3,2])}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Ri),Li=function(t){function e(){t.call(this),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.vertexBuffer=new Pi(this.vertices),this.uvBuffer=new Pi(this.uvs),this.addAttribute("aVertexPosition",this.vertexBuffer).addAttribute("aTextureCoord",this.uvBuffer).addIndex([0,1,2,0,2,3])}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.map=function(t,e){var i=0,r=0;return this.uvs[0]=i,this.uvs[1]=r,this.uvs[2]=i+e.width/t.width,this.uvs[3]=r,this.uvs[4]=i+e.width/t.width,this.uvs[5]=r+e.height/t.height,this.uvs[6]=i,this.uvs[7]=r+e.height/t.height,i=e.x,r=e.y,this.vertices[0]=i,this.vertices[1]=r,this.vertices[2]=i+e.width,this.vertices[3]=r,this.vertices[4]=i+e.width,this.vertices[5]=r+e.height,this.vertices[6]=i,this.vertices[7]=r+e.height,this.invalidate(),this},e.prototype.invalidate=function(){return this.vertexBuffer._updateID++,this.uvBuffer._updateID++,this},e}(Ri),Ni=0,Bi=function(t,e){this.uniforms=t,this.group=!0,this.syncUniforms={},this.dirtyId=0,this.id=Ni++,this.static=!!e};Bi.prototype.update=function(){this.dirtyId++},Bi.prototype.add=function(t,e,i){this.uniforms[t]=new Bi(e,i)},Bi.from=function(t,e){return new Bi(t,e)};var Ui=function(){this.renderTexture=null,this.target=null,this.legacy=!1,this.resolution=1,this.sourceFrame=new Ce,this.destinationFrame=new Ce,this.filters=[]};Ui.prototype.clear=function(){this.target=null,this.filters=null,this.renderTexture=null};var ki=function(t){function e(e){t.call(this,e),this.defaultFilterStack=[{}],this.texturePool=new Ei,this.texturePool.setScreenSize(e.view),this.statePool=[],this.quad=new Fi,this.quadUv=new Li,this.tempRect=new Ce,this.activeState={},this.globalUniforms=new Bi({outputFrame:this.tempRect,inputSize:new Float32Array(4),inputPixel:new Float32Array(4),inputClamp:new Float32Array(4),resolution:1,filterArea:new Float32Array(4),filterClamp:new Float32Array(4)},!0),this._pixelsWidth=e.view.width,this._pixelsHeight=e.view.height}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.push=function(t,e){for(var i=this.renderer,r=this.defaultFilterStack,n=this.statePool.pop()||new Ui,o=e[0].resolution,s=e[0].padding,a=e[0].autoFit,h=e[0].legacy,u=1;u<e.length;u++){var l=e[u];o=Math.min(o,l.resolution),s=Math.max(s,l.padding),a=a||l.autoFit,h=h||l.legacy}1===r.length&&(this.defaultFilterStack[0].renderTexture=i.renderTexture.current),r.push(n),n.resolution=o,n.legacy=h,n.target=t,n.sourceFrame.copyFrom(t.filterArea||t.getBounds(!0)),n.sourceFrame.pad(s),a&&n.sourceFrame.fit(this.renderer.renderTexture.sourceFrame),n.sourceFrame.ceil(o),n.renderTexture=this.getOptimalFilterTexture(n.sourceFrame.width,n.sourceFrame.height,o),n.filters=e,n.destinationFrame.width=n.renderTexture.width,n.destinationFrame.height=n.renderTexture.height,n.renderTexture.filterFrame=n.sourceFrame,i.renderTexture.bind(n.renderTexture,n.sourceFrame),i.renderTexture.clear()},e.prototype.pop=function(){var t=this.defaultFilterStack,e=t.pop(),i=e.filters;this.activeState=e;var r=this.globalUniforms.uniforms;r.outputFrame=e.sourceFrame,r.resolution=e.resolution;var n=r.inputSize,o=r.inputPixel,s=r.inputClamp;if(n[0]=e.destinationFrame.width,n[1]=e.destinationFrame.height,n[2]=1/n[0],n[3]=1/n[1],o[0]=n[0]*e.resolution,o[1]=n[1]*e.resolution,o[2]=1/o[0],o[3]=1/o[1],s[0]=.5*o[2],s[1]=.5*o[3],s[2]=e.sourceFrame.width*n[2]-.5*o[2],s[3]=e.sourceFrame.height*n[3]-.5*o[3],e.legacy){var a=r.filterArea;a[0]=e.destinationFrame.width,a[1]=e.destinationFrame.height,a[2]=e.sourceFrame.x,a[3]=e.sourceFrame.y,r.filterClamp=r.inputClamp}this.globalUniforms.update();var h=t[t.length-1];if(1===i.length)i[0].apply(this,e.renderTexture,h.renderTexture,!1,e),this.returnFilterTexture(e.renderTexture);else{var u=e.renderTexture,l=this.getOptimalFilterTexture(u.width,u.height,e.resolution);l.filterFrame=u.filterFrame;var c=0;for(c=0;c<i.length-1;++c){i[c].apply(this,u,l,!0,e);var d=u;u=l,l=d}i[c].apply(this,u,h.renderTexture,!1,e),this.returnFilterTexture(u),this.returnFilterTexture(l)}e.clear(),this.statePool.push(e)},e.prototype.applyFilter=function(t,e,i,r){var n=this.renderer;n.renderTexture.bind(i,i?i.filterFrame:null),r&&n.renderTexture.clear(),t.uniforms.uSampler=e,t.uniforms.filterGlobals=this.globalUniforms,n.state.set(t.state),n.shader.bind(t),t.legacy?(this.quadUv.map(e._frame,e.filterFrame),n.geometry.bind(this.quadUv),n.geometry.draw(Tt.TRIANGLES)):(n.geometry.bind(this.quad),n.geometry.draw(Tt.TRIANGLE_STRIP))},e.prototype.calculateSpriteMatrix=function(t,e){var i=this.activeState,r=i.sourceFrame,n=i.destinationFrame,o=e._texture.orig,s=t.set(n.width,0,0,n.height,r.x,r.y),a=e.worldTransform.copyTo(ye.TEMP_MATRIX);return a.invert(),s.prepend(a),s.scale(1/o.width,1/o.height),s.translate(e.anchor.x,e.anchor.y),s},e.prototype.destroy=function(){this.texturePool.clear(!1)},e.prototype.getOptimalFilterTexture=function(t,e,i){return void 0===i&&(i=1),this.texturePool.getOptimalTexture(t,e,i)},e.prototype.getFilterTexture=function(t,e){if("number"==typeof t){var i=t;t=e,e=i}t=t||this.activeState.renderTexture;var r=this.texturePool.getOptimalTexture(t.width,t.height,e||t.resolution);return r.filterFrame=t.filterFrame,r},e.prototype.returnFilterTexture=function(t){this.texturePool.returnTexture(t)},e.prototype.emptyPool=function(){this.texturePool.clear(!0)},e.prototype.resize=function(){this.texturePool.setScreenSize(this.renderer.view)},e}(fi),Xi=function(t){this.renderer=t};Xi.prototype.flush=function(){},Xi.prototype.destroy=function(){this.renderer=null},Xi.prototype.start=function(){},Xi.prototype.stop=function(){this.flush()},Xi.prototype.render=function(t){};var ji=function(t){function e(e){t.call(this,e),this.emptyRenderer=new Xi(e),this.currentRenderer=this.emptyRenderer}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,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.reset=function(){this.setObjectRenderer(this.emptyRenderer)},e}(fi);g.PREFER_ENV=v.any?_t.WEBGL:_t.WEBGL2;var Gi=0,Hi=function(t){function e(e){t.call(this,e),this.webGLVersion=1,this.extensions={},this.handleContextLost=this.handleContextLost.bind(this),this.handleContextRestored=this.handleContextRestored.bind(this),e.view.addEventListener("webglcontextlost",this.handleContextLost,!1),e.view.addEventListener("webglcontextrestored",this.handleContextRestored,!1)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={isLost:{configurable:!0}};return i.isLost.get=function(){return!this.gl||this.gl.isContextLost()},e.prototype.contextChange=function(t){this.gl=t,this.renderer.gl=t,this.renderer.CONTEXT_UID=Gi++,t.isContextLost()&&t.getExtension("WEBGL_lose_context")&&t.getExtension("WEBGL_lose_context").restoreContext()},e.prototype.initFromContext=function(t){this.gl=t,this.validateContext(t),this.renderer.gl=t,this.renderer.CONTEXT_UID=Gi++,this.renderer.runners.contextChange.run(t)},e.prototype.initFromOptions=function(t){var e=this.createContext(this.renderer.view,t);this.initFromContext(e)},e.prototype.createContext=function(t,e){var i;if(g.PREFER_ENV>=_t.WEBGL2&&(i=t.getContext("webgl2",e)),i)this.webGLVersion=2;else if(this.webGLVersion=1,!(i=t.getContext("webgl",e)||t.getContext("experimental-webgl",e)))throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=i,this.getExtensions(),i},e.prototype.getExtensions=function(){var t=this.gl;1===this.webGLVersion?Object.assign(this.extensions,{drawBuffers:t.getExtension("WEBGL_draw_buffers"),depthTexture:t.getExtension("WEBKIT_WEBGL_depth_texture"),loseContext:t.getExtension("WEBGL_lose_context"),vertexArrayObject:t.getExtension("OES_vertex_array_object")||t.getExtension("MOZ_OES_vertex_array_object")||t.getExtension("WEBKIT_OES_vertex_array_object"),anisotropicFiltering:t.getExtension("EXT_texture_filter_anisotropic"),uint32ElementIndex:t.getExtension("OES_element_index_uint"),floatTexture:t.getExtension("OES_texture_float"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),textureHalfFloat:t.getExtension("OES_texture_half_float"),textureHalfFloatLinear:t.getExtension("OES_texture_half_float_linear")}):2===this.webGLVersion&&Object.assign(this.extensions,{anisotropicFiltering:t.getExtension("EXT_texture_filter_anisotropic"),colorBufferFloat:t.getExtension("EXT_color_buffer_float"),floatTextureLinear:t.getExtension("OES_texture_float_linear")})},e.prototype.handleContextLost=function(t){t.preventDefault()},e.prototype.handleContextRestored=function(){this.renderer.runners.contextChange.run(this.gl)},e.prototype.destroy=function(){var t=this.renderer.view;t.removeEventListener("webglcontextlost",this.handleContextLost),t.removeEventListener("webglcontextrestored",this.handleContextRestored),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()},e.prototype.postrender=function(){this.gl.flush()},e.prototype.validateContext=function(t){t.getContextAttributes().stencil||console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly")},Object.defineProperties(e.prototype,i),e}(fi),zi=function(t){function e(e){t.call(this,e),this.managedFramebuffers=[],this.unknownFramebuffer=new gi(10,10)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={size:{configurable:!0}};return e.prototype.contextChange=function(){var t=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new Ce,this.hasMRT=!0,this.writeDepthTexture=!0,this.disposeAll(!0),1===this.renderer.context.webGLVersion){var e=this.renderer.context.extensions.drawBuffers,i=this.renderer.context.extensions.depthTexture;g.PREFER_ENV===_t.WEBGL_LEGACY&&(e=null,i=null),e?t.drawBuffers=function(t){return e.drawBuffersWEBGL(t)}:(this.hasMRT=!1,t.drawBuffers=function(){}),i||(this.writeDepthTexture=!1)}},e.prototype.bind=function(t,e){var i=this.gl;if(t){var r=t.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(t);this.current!==t&&(this.current=t,i.bindFramebuffer(i.FRAMEBUFFER,r.framebuffer)),r.dirtyId!==t.dirtyId&&(r.dirtyId=t.dirtyId,r.dirtyFormat!==t.dirtyFormat?(r.dirtyFormat=t.dirtyFormat,this.updateFramebuffer(t)):r.dirtySize!==t.dirtySize&&(r.dirtySize=t.dirtySize,this.resizeFramebuffer(t)));for(var n=0;n<t.colorTextures.length;n++)t.colorTextures[n].texturePart?this.renderer.texture.unbind(t.colorTextures[n].texture):this.renderer.texture.unbind(t.colorTextures[n]);t.depthTexture&&this.renderer.texture.unbind(t.depthTexture),e?this.setViewport(e.x,e.y,e.width,e.height):this.setViewport(0,0,t.width,t.height)}else this.current&&(this.current=null,i.bindFramebuffer(i.FRAMEBUFFER,null)),e?this.setViewport(e.x,e.y,e.width,e.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)},e.prototype.setViewport=function(t,e,i,r){var n=this.viewport;n.width===i&&n.height===r&&n.x===t&&n.y===e||(n.x=t,n.y=e,n.width=i,n.height=r,this.gl.viewport(t,e,i,r))},i.size.get=function(){return this.current?{x:0,y:0,width:this.current.width,height:this.current.height}:{x:0,y:0,width:this.renderer.width,height:this.renderer.height}},e.prototype.clear=function(t,e,i,r){var n=this.gl;n.clearColor(t,e,i,r),n.clear(n.COLOR_BUFFER_BIT|n.DEPTH_BUFFER_BIT)},e.prototype.initFramebuffer=function(t){var e={framebuffer:this.gl.createFramebuffer(),stencil:null,dirtyId:0,dirtyFormat:0,dirtySize:0};return t.glFramebuffers[this.CONTEXT_UID]=e,this.managedFramebuffers.push(t),t.disposeRunner.add(this),e},e.prototype.resizeFramebuffer=function(t){var e=this.gl,i=t.glFramebuffers[this.CONTEXT_UID];i.stencil&&(e.bindRenderbuffer(e.RENDERBUFFER,i.stencil),e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_STENCIL,t.width,t.height));for(var r=t.colorTextures,n=0;n<r.length;n++)this.renderer.texture.bind(r[n],0);t.depthTexture&&this.renderer.texture.bind(t.depthTexture,0)},e.prototype.updateFramebuffer=function(t){var e=this.gl,i=t.glFramebuffers[this.CONTEXT_UID],r=t.colorTextures.length;e.drawBuffers||(r=Math.min(r,1));for(var n=[],o=0;o<r;o++){var s=t.colorTextures[o];s.texturePart?(this.renderer.texture.bind(s.texture,0),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0+o,e.TEXTURE_CUBE_MAP_NEGATIVE_X+s.side,s.texture._glTextures[this.CONTEXT_UID].texture,0)):(this.renderer.texture.bind(s,0),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0+o,e.TEXTURE_2D,s._glTextures[this.CONTEXT_UID].texture,0)),n.push(e.COLOR_ATTACHMENT0+o)}if((n.length>1&&e.drawBuffers(n),t.depthTexture)&&this.writeDepthTexture){var a=t.depthTexture;this.renderer.texture.bind(a,0),e.framebufferTexture2D(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.TEXTURE_2D,a._glTextures[this.CONTEXT_UID].texture,0)}i.stencil||!t.stencil&&!t.depth||(i.stencil=e.createRenderbuffer(),e.bindRenderbuffer(e.RENDERBUFFER,i.stencil),e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_STENCIL,t.width,t.height),t.depthTexture||e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.RENDERBUFFER,i.stencil))},e.prototype.disposeFramebuffer=function(t,e){var i=t.glFramebuffers[this.CONTEXT_UID],r=this.gl;if(i){delete t.glFramebuffers[this.CONTEXT_UID];var n=this.managedFramebuffers.indexOf(t);n>=0&&this.managedFramebuffers.splice(n,1),t.disposeRunner.remove(this),e||(r.deleteFramebuffer(i.framebuffer),i.stencil&&r.deleteRenderbuffer(i.stencil))}},e.prototype.disposeAll=function(t){var e=this.managedFramebuffers;this.managedFramebuffers=[];for(var i=0;i<e.length;i++)this.disposeFramebuffer(e[i],t)},e.prototype.forceStencil=function(){var t=this.current;if(t){var e=t.glFramebuffers[this.CONTEXT_UID];if(e&&!e.stencil){t.enableStencil();var i=t.width,r=t.height,n=this.gl,o=n.createRenderbuffer();n.bindRenderbuffer(n.RENDERBUFFER,o),n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,i,r),e.stencil=o,n.framebufferRenderbuffer(n.FRAMEBUFFER,n.STENCIL_ATTACHMENT,n.RENDERBUFFER,o),n.bindFramebuffer(n.FRAMEBUFFER,e.framebuffer)}}},e.prototype.reset=function(){this.current=this.unknownFramebuffer,this.viewport=new Ce},Object.defineProperties(e.prototype,i),e}(fi),Vi=function(t){this.buffer=t,this.updateID=-1,this.byteLength=-1,this.refCount=0},Yi={5126:4,5123:2,5121:1},Wi=function(t){function e(e){t.call(this,e),this._activeGeometry=null,this._activeVao=null,this.hasVao=!0,this.hasInstance=!0,this.canUseUInt32ElementIndex=!1,this.boundBuffers={},this.managedGeometries={},this.managedBuffers={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.contextChange=function(){this.disposeAll(!0);var t=this.gl=this.renderer.gl,e=this.renderer.context;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,!t.createVertexArray){var i=this.renderer.context.extensions.vertexArrayObject;g.PREFER_ENV===_t.WEBGL_LEGACY&&(i=null),i?(t.createVertexArray=function(){return i.createVertexArrayOES()},t.bindVertexArray=function(t){return i.bindVertexArrayOES(t)},t.deleteVertexArray=function(t){return i.deleteVertexArrayOES(t)}):(this.hasVao=!1,t.createVertexArray=function(){},t.bindVertexArray=function(){},t.deleteVertexArray=function(){})}if(!t.vertexAttribDivisor){var r=t.getExtension("ANGLE_instanced_arrays");r?(t.vertexAttribDivisor=function(t,e){return r.vertexAttribDivisorANGLE(t,e)},t.drawElementsInstanced=function(t,e,i,n,o){return r.drawElementsInstancedANGLE(t,e,i,n,o)},t.drawArraysInstanced=function(t,e,i,n){return r.drawArraysInstancedANGLE(t,e,i,n)}):this.hasInstance=!1}this.canUseUInt32ElementIndex=2===e.webGLVersion||!!e.extensions.uint32ElementIndex},e.prototype.bind=function(t,e){e=e||this.renderer.shader.shader;var i=this.gl,r=t.glVertexArrayObjects[this.CONTEXT_UID];r||(this.managedGeometries[t.id]=t,t.disposeRunner.add(this),t.glVertexArrayObjects[this.CONTEXT_UID]=r={});var n=r[e.program.id]||this.initGeometryVao(t,e.program);this._activeGeometry=t,this._activeVao!==n&&(this._activeVao=n,this.hasVao?i.bindVertexArray(n):this.activateVao(t,e.program)),this.updateBuffers()},e.prototype.reset=function(){this.unbind()},e.prototype.updateBuffers=function(){for(var t=this._activeGeometry,e=this.gl,i=0;i<t.buffers.length;i++){var r=t.buffers[i],n=r._glBuffers[this.CONTEXT_UID];if(r._updateID!==n.updateID){n.updateID=r._updateID;var o=r.index?e.ELEMENT_ARRAY_BUFFER:e.ARRAY_BUFFER;if(e.bindBuffer(o,n.buffer),this._boundBuffer=n,n.byteLength>=r.data.byteLength)e.bufferSubData(o,0,r.data);else{var s=r.static?e.STATIC_DRAW:e.DYNAMIC_DRAW;n.byteLength=r.data.byteLength,e.bufferData(o,r.data,s)}}}},e.prototype.checkCompatibility=function(t,e){var i=t.attributes,r=e.attributeData;for(var n in r)if(!i[n])throw new Error('shader and geometry incompatible, geometry missing the "'+n+'" attribute')},e.prototype.getSignature=function(t,e){var i=t.attributes,r=e.attributeData,n=["g",t.id];for(var o in i)r[o]&&n.push(o);return n.join("-")},e.prototype.initGeometryVao=function(t,e){this.checkCompatibility(t,e);var i=this.gl,r=this.CONTEXT_UID,n=this.getSignature(t,e),o=t.glVertexArrayObjects[this.CONTEXT_UID],s=o[n];if(s)return o[e.id]=s,s;var a=t.buffers,h=t.attributes,u={},l={};for(var c in a)u[c]=0,l[c]=0;for(var d in h)!h[d].size&&e.attributeData[d]?h[d].size=e.attributeData[d].size:h[d].size||console.warn("PIXI Geometry attribute '"+d+"' size cannot be determined (likely the bound shader does not have the attribute)"),u[h[d].buffer]+=h[d].size*Yi[h[d].type];for(var p in h){var f=h[p],v=f.size;void 0===f.stride&&(u[f.buffer]===v*Yi[f.type]?f.stride=0:f.stride=u[f.buffer]),void 0===f.start&&(f.start=l[f.buffer],l[f.buffer]+=v*Yi[f.type])}s=i.createVertexArray(),i.bindVertexArray(s);for(var g=0;g<a.length;g++){var m=a[g];m._glBuffers[r]||(m._glBuffers[r]=new Vi(i.createBuffer()),this.managedBuffers[m.id]=m,m.disposeRunner.add(this)),m._glBuffers[r].refCount++}return this.activateVao(t,e),this._activeVao=s,o[e.id]=s,o[n]=s,s},e.prototype.disposeBuffer=function(t,e){if(this.managedBuffers[t.id]){delete this.managedBuffers[t.id];var i=t._glBuffers[this.CONTEXT_UID],r=this.gl;t.disposeRunner.remove(this),i&&(e||r.deleteBuffer(i.buffer),delete t._glBuffers[this.CONTEXT_UID])}},e.prototype.disposeGeometry=function(t,e){if(this.managedGeometries[t.id]){delete this.managedGeometries[t.id];var i=t.glVertexArrayObjects[this.CONTEXT_UID],r=this.gl,n=t.buffers;if(t.disposeRunner.remove(this),i){for(var o=0;o<n.length;o++){var s=n[o]._glBuffers[this.CONTEXT_UID];s.refCount--,0!==s.refCount||e||this.disposeBuffer(n[o],e)}if(!e)for(var a in i)if("g"===a[0]){var h=i[a];this._activeVao===h&&this.unbind(),r.deleteVertexArray(h)}delete t.glVertexArrayObjects[this.CONTEXT_UID]}}},e.prototype.disposeAll=function(t){for(var e=Object.keys(this.managedGeometries),i=0;i<e.length;i++)this.disposeGeometry(this.managedGeometries[e[i]],t);e=Object.keys(this.managedBuffers);for(var r=0;r<e.length;r++)this.disposeBuffer(this.managedBuffers[e[r]],t)},e.prototype.activateVao=function(t,e){var i=this.gl,r=this.CONTEXT_UID,n=t.buffers,o=t.attributes;t.indexBuffer&&i.bindBuffer(i.ELEMENT_ARRAY_BUFFER,t.indexBuffer._glBuffers[r].buffer);var s=null;for(var a in o){var h=o[a],u=n[h.buffer]._glBuffers[r];if(e.attributeData[a]){s!==u&&(i.bindBuffer(i.ARRAY_BUFFER,u.buffer),s=u);var l=e.attributeData[a].location;if(i.enableVertexAttribArray(l),i.vertexAttribPointer(l,h.size,h.type||i.FLOAT,h.normalized,h.stride,h.start),h.instance){if(!this.hasInstance)throw new Error("geometry error, GPU Instancing is not supported on this device");i.vertexAttribDivisor(l,1)}}}},e.prototype.draw=function(t,e,i,r){var n=this.gl,o=this._activeGeometry;if(o.indexBuffer){var s=o.indexBuffer.data.BYTES_PER_ELEMENT,a=2===s?n.UNSIGNED_SHORT:n.UNSIGNED_INT;2===s||4===s&&this.canUseUInt32ElementIndex?o.instanced?n.drawElementsInstanced(t,e||o.indexBuffer.data.length,a,(i||0)*s,r||1):n.drawElements(t,e||o.indexBuffer.data.length,a,(i||0)*s):console.warn("unsupported index buffer type: uint32")}else o.instanced?n.drawArraysInstanced(t,i,e||o.getSize(),r||1):n.drawArrays(t,i,e||o.getSize());return this},e.prototype.unbind=function(){this.gl.bindVertexArray(null),this._activeVao=null,this._activeGeometry=null},e}(fi);function qi(t,e,i,r){var n=Zi(t,t.VERTEX_SHADER,e),o=Zi(t,t.FRAGMENT_SHADER,i),s=t.createProgram();if(t.attachShader(s,n),t.attachShader(s,o),r)for(var a in r)t.bindAttribLocation(s,r[a],a);return t.linkProgram(s),t.getProgramParameter(s,t.LINK_STATUS)||(console.error("Pixi.js Error: Could not initialize shader."),console.error("gl.VALIDATE_STATUS",t.getProgramParameter(s,t.VALIDATE_STATUS)),console.error("gl.getError()",t.getError()),""!==t.getProgramInfoLog(s)&&console.warn("Pixi.js Warning: gl.getProgramInfoLog()",t.getProgramInfoLog(s)),t.deleteProgram(s),s=null),t.deleteShader(n),t.deleteShader(o),s}function Zi(t,e,i){var r=t.createShader(e);return t.shaderSource(r,i),t.compileShader(r),t.getShaderParameter(r,t.COMPILE_STATUS)?r:(console.warn(i),console.error(t.getShaderInfoLog(r)),null)}function Ki(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":case"sampler2DArray":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 Ji(2*e);case"bvec3":return Ji(3*e);case"bvec4":return Ji(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])}return null}function Ji(t){for(var e=new Array(t),i=0;i<e.length;i++)e[i]=!1;return e}var Qi,$i={},tr=$i;function er(){if(tr===$i){var t,e=document.createElement("canvas");g.PREFER_ENV>=_t.WEBGL2&&(t=e.getContext("webgl2",{})),t||((t=e.getContext("webgl",{})||e.getContext("experimental-webgl",{}))?t.getExtension("WEBGL_draw_buffers"):t=null),tr=t}return tr}function ir(t,e,i){if("precision"!==t.substring(0,9)){var r=e;return e===Ct.HIGH&&i!==Ct.HIGH&&(r=Ct.MEDIUM),"precision "+r+" float;\n"+t}return i!==Ct.HIGH&&"precision highp"===t.substring(0,15)?t.replace("precision highp","precision mediump"):t}var rr={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};function nr(t){return rr[t]}var or=null,sr={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",SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray"};function ar(t,e){if(!or){var i=Object.keys(sr);or={};for(var r=0;r<i.length;++r){var n=i[r];or[t[n]]=sr[n]}}return or[e]}var hr={float:"\n    if(cv !== v)\n    {\n        cv.v = v;\n        gl.uniform1f(location, v)\n    }",vec2:"\n    if(cv[0] !== v[0] || cv[1] !== v[1])\n    {\n        cv[0] = v[0];\n        cv[1] = v[1];\n        gl.uniform2f(location, v[0], v[1])\n    }",vec3:"\n    if(cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])\n    {\n        cv[0] = v[0];\n        cv[1] = v[1];\n        cv[2] = v[2];\n\n        gl.uniform3f(location, v[0], v[1], v[2])\n    }",vec4:"gl.uniform4f(location, v[0], v[1], v[2], v[3])",int:"gl.uniform1i(location, v)",ivec2:"gl.uniform2i(location, v[0], v[1])",ivec3:"gl.uniform3i(location, v[0], v[1], v[2])",ivec4:"gl.uniform4i(location, v[0], v[1], v[2], v[3])",bool:"gl.uniform1i(location, v)",bvec2:"gl.uniform2i(location, v[0], v[1])",bvec3:"gl.uniform3i(location, v[0], v[1], v[2])",bvec4:"gl.uniform4i(location, v[0], v[1], v[2], v[3])",mat2:"gl.uniformMatrix2fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",sampler2D:"gl.uniform1i(location, v)",samplerCube:"gl.uniform1i(location, v)",sampler2DArray:"gl.uniform1i(location, v)"},ur={float:"gl.uniform1fv(location, v)",vec2:"gl.uniform2fv(location, v)",vec3:"gl.uniform3fv(location, v)",vec4:"gl.uniform4fv(location, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat2:"gl.uniformMatrix2fv(location, false, v)",int:"gl.uniform1iv(location, v)",ivec2:"gl.uniform2iv(location, v)",ivec3:"gl.uniform3iv(location, v)",ivec4:"gl.uniform4iv(location, v)",bool:"gl.uniform1iv(location, v)",bvec2:"gl.uniform2iv(location, v)",bvec3:"gl.uniform3iv(location, v)",bvec4:"gl.uniform4iv(location, v)",sampler2D:"gl.uniform1iv(location, v)",samplerCube:"gl.uniform1iv(location, v)",sampler2DArray:"gl.uniform1iv(location, v)"};var lr,cr=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join("\n");function dr(t,e){if(0===t)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");for(var i=e.createShader(e.FRAGMENT_SHADER);;){var r=cr.replace(/%forloop%/gi,pr(t));if(e.shaderSource(i,r),e.compileShader(i),e.getShaderParameter(i,e.COMPILE_STATUS))break;t=t/2|0}return t}function pr(t){for(var e="",i=0;i<t;++i)i>0&&(e+="\nelse "),i<t-1&&(e+="if(test == "+i+".0){}");return e}var fr=0,vr={},gr=function t(e,i,r){void 0===r&&(r="pixi-shader"),this.id=fr++,this.vertexSrc=e||t.defaultVertexSrc,this.fragmentSrc=i||t.defaultFragmentSrc,this.vertexSrc=this.vertexSrc.trim(),this.fragmentSrc=this.fragmentSrc.trim(),"#version"!==this.vertexSrc.substring(0,8)&&(r=r.replace(/\s+/g,"-"),vr[r]?(vr[r]++,r+="-"+vr[r]):vr[r]=1,this.vertexSrc="#define SHADER_NAME "+r+"\n"+this.vertexSrc,this.fragmentSrc="#define SHADER_NAME "+r+"\n"+this.fragmentSrc,this.vertexSrc=ir(this.vertexSrc,g.PRECISION_VERTEX,Ct.HIGH),this.fragmentSrc=ir(this.fragmentSrc,g.PRECISION_FRAGMENT,function(){if(!Qi){Qi=Ct.MEDIUM;var t=er();if(t&&t.getShaderPrecisionFormat){var e=t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT);Qi=e.precision?Ct.HIGH:Ct.MEDIUM}}return Qi}())),this.extractData(this.vertexSrc,this.fragmentSrc),this.glPrograms={},this.syncUniforms=null},mr={defaultVertexSrc:{configurable:!0},defaultFragmentSrc:{configurable:!0}};gr.prototype.extractData=function(t,e){var i=er();if(i){var r=qi(i,t,e);this.attributeData=this.getAttributeData(r,i),this.uniformData=this.getUniformData(r,i),i.deleteProgram(r)}else this.uniformData={},this.attributeData={}},gr.prototype.getAttributeData=function(t,e){for(var i={},r=[],n=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES),o=0;o<n;o++){var s=e.getActiveAttrib(t,o),a=ar(e,s.type),h={type:a,name:s.name,size:nr(a),location:0};i[s.name]=h,r.push(h)}r.sort(function(t,e){return t.name>e.name?1:-1});for(var u=0;u<r.length;u++)r[u].location=u;return i},gr.prototype.getUniformData=function(t,e){for(var i={},r=e.getProgramParameter(t,e.ACTIVE_UNIFORMS),n=0;n<r;n++){var o=e.getActiveUniform(t,n),s=o.name.replace(/\[.*?\]/,""),a=o.name.match(/\[.*?\]/,""),h=ar(e,o.type);i[s]={type:h,size:o.size,isArray:a,value:Ki(h,o.size)}}return i},mr.defaultVertexSrc.get=function(){return"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void){\n   gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n   vTextureCoord = aTextureCoord;\n}\n"},mr.defaultFragmentSrc.get=function(){return"varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\n\nvoid main(void){\n   gl_FragColor *= texture2D(uSampler, vTextureCoord);\n}"},gr.from=function(t,e,i){var r=t+e,n=Qt[r];return n||(Qt[r]=n=new gr(t,e,i)),n},Object.defineProperties(gr,mr);var yr=function(t,e){for(var i in this.program=t,this.uniformGroup=e?e instanceof Bi?e:new Bi(e):new Bi({}),t.uniformData)this.uniformGroup.uniforms[i]instanceof Array&&(this.uniformGroup.uniforms[i]=new Float32Array(this.uniformGroup.uniforms[i]))},_r={uniforms:{configurable:!0}};yr.prototype.checkUniformExists=function(t,e){if(e.uniforms[t])return!0;for(var i in e.uniforms){var r=e.uniforms[i];if(r.group&&this.checkUniformExists(t,r))return!0}return!1},yr.prototype.destroy=function(){this.uniformGroup=null},_r.uniforms.get=function(){return this.uniformGroup.uniforms},yr.from=function(t,e,i){var r=gr.from(t,e);return new yr(r,i)},Object.defineProperties(yr.prototype,_r);var xr=function(){this.data=0,this.blendMode=bt.NORMAL,this.polygonOffset=0,this.blend=!0},br={blend:{configurable:!0},offsets:{configurable:!0},culling:{configurable:!0},depthTest:{configurable:!0},clockwiseFrontFace:{configurable:!0},blendMode:{configurable:!0},polygonOffset:{configurable:!0}};br.blend.get=function(){return!!(1&this.data)},br.blend.set=function(t){!!(1&this.data)!==t&&(this.data^=1)},br.offsets.get=function(){return!!(2&this.data)},br.offsets.set=function(t){!!(2&this.data)!==t&&(this.data^=2)},br.culling.get=function(){return!!(4&this.data)},br.culling.set=function(t){!!(4&this.data)!==t&&(this.data^=4)},br.depthTest.get=function(){return!!(8&this.data)},br.depthTest.set=function(t){!!(8&this.data)!==t&&(this.data^=8)},br.clockwiseFrontFace.get=function(){return!!(16&this.data)},br.clockwiseFrontFace.set=function(t){!!(16&this.data)!==t&&(this.data^=16)},br.blendMode.get=function(){return this._blendMode},br.blendMode.set=function(t){this.blend=t!==bt.NONE,this._blendMode=t},br.polygonOffset.get=function(){return this._polygonOffset},br.polygonOffset.set=function(t){this.offsets=!!t,this._polygonOffset=t},xr.for2d=function(){var t=new xr;return t.depthTest=!1,t.blend=!0,t},Object.defineProperties(xr.prototype,br);var Tr=function(t){function e(i,r,n){var o=gr.from(i||e.defaultVertexSrc,r||e.defaultFragmentSrc);t.call(this,o,n),this.padding=0,this.resolution=g.FILTER_RESOLUTION,this.enabled=!0,this.autoFit=!0,this.legacy=!!this.program.attributeData.aTextureCoord,this.state=new xr}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={blendMode:{configurable:!0}},r={defaultVertexSrc:{configurable:!0},defaultFragmentSrc:{configurable:!0}};return e.prototype.apply=function(t,e,i,r,n){t.applyFilter(this,e,i,r,n)},i.blendMode.get=function(){return this.state.blendMode},i.blendMode.set=function(t){this.state.blendMode=t},r.defaultVertexSrc.get=function(){return"attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n    vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n    return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n    return aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\n\nvoid main(void)\n{\n    gl_Position = filterVertexPosition();\n    vTextureCoord = filterTextureCoord();\n}\n"},r.defaultFragmentSrc.get=function(){return"varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\n\nvoid main(void){\n   gl_FragColor = texture2D(uSampler, vTextureCoord);\n}\n"},Object.defineProperties(e.prototype,i),Object.defineProperties(e,r),e}(yr);Tr.SOURCE_KEY_MAP={};var wr="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 otherMatrix;\n\nvarying vec2 vMaskCoord;\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n    gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n    vTextureCoord = aTextureCoord;\n    vMaskCoord = ( otherMatrix * vec3( aTextureCoord, 1.0)  ).xy;\n}\n",Er="varying vec2 vMaskCoord;\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform sampler2D mask;\nuniform float alpha;\nuniform float npmAlpha;\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    float alphaMul = 1.0 - npmAlpha * (1.0 - masky.a);\n\n    original *= (alphaMul * masky.r * alpha * clip);\n\n    gl_FragColor = original;\n}\n",Sr=new ye,Ir=function(t,e){this._texture=t,this.mapCoord=new ye,this.uClampFrame=new Float32Array(4),this.uClampOffset=new Float32Array(2),this._updateID=-1,this.clampOffset=0,this.clampMargin=void 0===e?.5:e,this.isSimple=!1},Pr={texture:{configurable:!0}};Pr.texture.get=function(){return this._texture},Pr.texture.set=function(t){this._texture=t,this._updateID=-1},Ir.prototype.multiplyUvs=function(t,e){void 0===e&&(e=t);for(var i=this.mapCoord,r=0;r<t.length;r+=2){var n=t[r],o=t[r+1];e[r]=n*i.a+o*i.c+i.tx,e[r+1]=n*i.b+o*i.d+i.ty}return e},Ir.prototype.update=function(t){var e=this._texture;if(!e||!e.valid)return!1;if(!t&&this._updateID===e._updateID)return!1;this._updateID=e._updateID;var i=e._uvs;this.mapCoord.set(i.x1-i.x0,i.y1-i.y0,i.x3-i.x0,i.y3-i.y0,i.x0,i.y0);var r=e.orig,n=e.trim;n&&(Sr.set(r.width/n.width,0,0,r.height/n.height,-n.x/n.width,-n.y/n.height),this.mapCoord.append(Sr));var o=e.baseTexture,s=this.uClampFrame,a=this.clampMargin/o.resolution,h=this.clampOffset;return s[0]=(e._frame.x+a+h)/o.width,s[1]=(e._frame.y+a+h)/o.height,s[2]=(e._frame.x+e._frame.width-a+h)/o.width,s[3]=(e._frame.y+e._frame.height-a+h)/o.height,this.uClampOffset[0]=h/o.realWidth,this.uClampOffset[1]=h/o.realHeight,this.isSimple=e._frame.width===o.width&&e._frame.height===o.height&&0===e.rotate,!0},Object.defineProperties(Ir.prototype,Pr);var Ar=function(t){function e(e){var i=new ye;t.call(this,wr,Er),e.renderable=!1,this.maskSprite=e,this.maskMatrix=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.apply=function(t,e,i,r){var n=this.maskSprite,o=this.maskSprite.texture;o.valid&&(o.transform||(o.transform=new Ir(o,0)),o.transform.update(),this.uniforms.npmAlpha=o.baseTexture.premultiplyAlpha?0:1,this.uniforms.mask=o,this.uniforms.otherMatrix=t.calculateSpriteMatrix(this.maskMatrix,n).prepend(o.transform.mapCoord),this.uniforms.alpha=n.worldAlpha,this.uniforms.maskClamp=o.transform.uClampFrame,t.applyFilter(this,e,i,r))},e}(Tr),Or=function(t){function e(e){t.call(this,e),this.scissor=!1,this.scissorData=null,this.scissorRenderTarget=null,this.enableScissor=!1,this.alphaMaskPool=[],this.alphaMaskIndex=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.push=function(t,e){if(e.isSprite)this.pushSpriteMask(t,e);else if(this.enableScissor&&!this.scissor&&this.renderer._activeRenderTarget.root&&!this.renderer.stencil.stencilMaskStack.length&&e.isFastRect()){var i=e.worldTransform,r=Math.atan2(i.b,i.a);(r=Math.round(r*(180/Math.PI)))%90?this.pushStencilMask(e):this.pushScissorMask(t,e)}else this.pushStencilMask(e)},e.prototype.pop=function(t,e){e.isSprite?this.popSpriteMask(t,e):this.enableScissor&&!this.renderer.stencil.stencilMaskStack.length?this.popScissorMask(t,e):this.popStencilMask(t,e)},e.prototype.pushSpriteMask=function(t,e){var i=this.alphaMaskPool[this.alphaMaskIndex];i||(i=this.alphaMaskPool[this.alphaMaskIndex]=[new Ar(e)]),i[0].resolution=this.renderer.resolution,i[0].maskSprite=e;var r=t.filterArea;t.filterArea=e.getBounds(!0),this.renderer.filter.push(t,i),t.filterArea=r,this.alphaMaskIndex++},e.prototype.popSpriteMask=function(){this.renderer.filter.pop(),this.alphaMaskIndex--},e.prototype.pushStencilMask=function(t){this.renderer.batch.flush(),this.renderer.stencil.pushStencil(t)},e.prototype.popStencilMask=function(){this.renderer.stencil.popStencil()},e.prototype.pushScissorMask=function(t,e){e.renderable=!0;var i=this.renderer._activeRenderTarget,r=e.getBounds();r.fit(i.size),e.renderable=!1,this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST);var n=this.renderer.resolution;this.renderer.gl.scissor(r.x*n,(i.root?i.size.height-r.y-r.height:r.y)*n,r.width*n,r.height*n),this.scissorRenderTarget=i,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}(fi),Cr=function(t){function e(e){t.call(this,e),this.stencilMaskStack=[]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setMaskStack=function(t){var e=this.renderer.gl,i=this.stencilMaskStack.length;this.stencilMaskStack=t,t.length!==i&&(0===t.length?e.disable(e.STENCIL_TEST):(e.enable(e.STENCIL_TEST),this._useCurrent()))},e.prototype.pushStencil=function(t){var e=this.renderer.gl,i=this.stencilMaskStack.length;0===i&&(this.renderer.framebuffer.forceStencil(),e.enable(e.STENCIL_TEST)),this.stencilMaskStack.push(t),e.colorMask(!1,!1,!1,!1),e.stencilFunc(e.EQUAL,i,this._getBitwiseMask()),e.stencilOp(e.KEEP,e.KEEP,e.INCR),t.renderable=!0,t.render(this.renderer),this.renderer.batch.flush(),t.renderable=!1,this._useCurrent()},e.prototype.popStencil=function(){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),e.renderable=!0,e.render(this.renderer),this.renderer.batch.flush(),e.renderable=!1,this._useCurrent())},e.prototype._useCurrent=function(){var t=this.renderer.gl;t.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(){t.prototype.destroy.call(this,this),this.stencilMaskStack=null},e}(fi),Mr=function(t){function e(e){t.call(this,e),this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new ye,this.transform=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.update=function(t,e,i,r){this.destinationFrame=t||this.destinationFrame||this.defaultFrame,this.sourceFrame=e||this.sourceFrame||t,this.calculateProjection(this.destinationFrame,this.sourceFrame,i,r),this.transform&&this.projectionMatrix.append(this.transform);var n=this.renderer;n.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,n.globalUniforms.update(),n.shader.shader&&n.shader.syncUniformGroup(n.shader.shader.uniforms.globals)},e.prototype.calculateProjection=function(t,e,i,r){var n=this.projectionMatrix;r?(n.a=1/t.width*2*i,n.d=-1/t.height*2*i,n.tx=-1-e.x*n.a,n.ty=1-e.y*n.d):(n.a=1/t.width*2*i,n.d=1/t.height*2*i,n.tx=-1-e.x*n.a,n.ty=-1-e.y*n.d)},e.prototype.setTransform=function(){},e}(fi),Dr=new Ce,Rr=function(t){function e(e){t.call(this,e),this.clearColor=e._backgroundColorRgba,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new Ce,this.destinationFrame=new Ce}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.bind=function(t,e,i){void 0===t&&(t=null),this.current=t;var r,n=this.renderer;if(t){var o=t.baseTexture;r=o.resolution,i||(Dr.width=o.realWidth,Dr.height=o.realHeight,i=Dr),e||(e=i),this.renderer.framebuffer.bind(o.framebuffer,i),this.renderer.projection.update(i,e,r,!1),this.renderer.stencil.setMaskStack(o.stencilMaskStack)}else r=this.renderer.resolution,i||(Dr.width=n.width,Dr.height=n.height,i=Dr),e||(e=i),n.framebuffer.bind(null,i),this.renderer.projection.update(i,e,r,!0),this.renderer.stencil.setMaskStack(this.defaultMaskStack);this.sourceFrame.copyFrom(e),this.destinationFrame.x=i.x/r,this.destinationFrame.y=i.y/r,this.destinationFrame.width=i.width/r,this.destinationFrame.height=i.height/r,e===i&&this.sourceFrame.copyFrom(this.destinationFrame)},e.prototype.clear=function(t){t=this.current?t||this.current.baseTexture.clearColor:t||this.clearColor,this.renderer.framebuffer.clear(t[0],t[1],t[2],t[3])},e.prototype.resize=function(){this.bind(null)},e.prototype.reset=function(){this.bind(null)},e}(fi),Fr=function(t,e){this.program=t,this.uniformData=e,this.uniformGroups={}};Fr.prototype.destroy=function(){this.uniformData=null,this.uniformGroups=null,this.program=null};var Lr=0,Nr=function(t){function e(e){t.call(this,e),this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this.id=Lr++}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.systemCheck=function(){if(!function(){if("boolean"==typeof lr)return lr;try{var t=new Function("param1","param2","param3","return param1[param2] === param3;");lr=!0===t({a:"b"},"a","b")}catch(t){lr=!1}return lr}())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")},e.prototype.contextChange=function(t){this.gl=t,this.reset()},e.prototype.bind=function(t,e){t.uniforms.globals=this.renderer.globalUniforms;var i=t.program,r=i.glPrograms[this.renderer.CONTEXT_UID]||this.generateShader(t);return this.shader=t,this.program!==i&&(this.program=i,this.gl.useProgram(r.program)),e||this.syncUniformGroup(t.uniformGroup),r},e.prototype.setUniforms=function(t){var e=this.shader.program,i=e.glPrograms[this.renderer.CONTEXT_UID];e.syncUniforms(i.uniformData,t,this.renderer)},e.prototype.syncUniformGroup=function(t){var e=this.getglProgram();t.static&&t.dirtyId===e.uniformGroups[t.id]||(e.uniformGroups[t.id]=t.dirtyId,this.syncUniforms(t,e))},e.prototype.syncUniforms=function(t,e){(t.syncUniforms[this.shader.program.id]||this.createSyncGroups(t))(e.uniformData,t.uniforms,this.renderer)},e.prototype.createSyncGroups=function(t){var e=this.getSignature(t,this.shader.program.uniformData);return this.cache[e]||(this.cache[e]=function(t,e){var i=0,r="var v = null;\n    var cv = null\n    var gl = renderer.gl";for(var n in t.uniforms){var o=e[n];o?"float"===o.type&&1===o.size?r+="\n            if(uv."+n+" !== ud."+n+".value)\n            {\n                ud."+n+".value = uv."+n+"\n                gl.uniform1f(ud."+n+".location, uv."+n+")\n            }\n":"sampler2D"!==o.type&&"samplerCube"!==o.type&&"sampler2DArray"!==o.type||1!==o.size||o.isArray?"mat3"===o.type&&1===o.size?void 0!==t.uniforms[n].a?r+="\n                gl.uniformMatrix3fv(ud."+n+".location, false, uv."+n+".toArray(true));\n                \n":r+="\n                gl.uniformMatrix3fv(ud."+n+".location, false, uv."+n+");\n                \n":"vec2"===o.type&&1===o.size?void 0!==t.uniforms[n].x?r+="\n                cv = ud."+n+".value;\n                v = uv."+n+";\n\n                if(cv[0] !== v.x || cv[1] !== v.y)\n                {\n                    cv[0] = v.x;\n                    cv[1] = v.y;\n                    gl.uniform2f(ud."+n+".location, v.x, v.y);\n                }\n":r+="\n                cv = ud."+n+".value;\n                v = uv."+n+";\n\n                if(cv[0] !== v[0] || cv[1] !== v[1])\n                {\n                    cv[0] = v[0];\n                    cv[1] = v[1];\n                    gl.uniform2f(ud."+n+".location, v[0], v[1]);\n                }\n                \n":"vec4"===o.type&&1===o.size?void 0!==t.uniforms[n].width?r+="\n                cv = ud."+n+".value;\n                v = uv."+n+";\n\n                if(cv[0] !== v.x || cv[1] !== v.y || cv[2] !== v.width || cv[3] !== v.height)\n                {\n                    cv[0] = v.x;\n                    cv[1] = v.y;\n                    cv[2] = v.width;\n                    cv[3] = v.height;\n                    gl.uniform4f(ud."+n+".location, v.x, v.y, v.width, v.height)\n                }\n":r+="\n                cv = ud."+n+".value;\n                v = uv."+n+";\n\n                if(cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])\n                {\n                    cv[0] = v[0];\n                    cv[1] = v[1];\n                    cv[2] = v[2];\n                    cv[3] = v[3];\n\n                    gl.uniform4f(ud."+n+".location, v[0], v[1], v[2], v[3])\n                }\n                \n":r+="\n            cv = ud."+n+".value;\n            v = uv."+n+";\n            "+(1===o.size?hr:ur)[o.type].replace("location","ud."+n+".location")+";\n":(r+="\n            renderer.texture.bind(uv."+n+", "+i+");\n\n            if(ud."+n+".value !== "+i+")\n            {\n                ud."+n+".value = "+i+";\n                gl.uniform1i(ud."+n+".location, "+i+");\n; // eslint-disable-line max-len\n            }\n",i++):t.uniforms[n].group&&(r+="\n                    renderer.shader.syncUniformGroup(uv."+n+");\n                ")}return new Function("ud","uv","renderer",r)}(t,this.shader.program.uniformData)),t.syncUniforms[this.shader.program.id]=this.cache[e],t.syncUniforms[this.shader.program.id]},e.prototype.getSignature=function(t,e){var i=t.uniforms,r=[];for(var n in i)r.push(n),e[n]&&r.push(e[n].type);return r.join("-")},e.prototype.getglProgram=function(){return this.shader?this.shader.program.glPrograms[this.renderer.CONTEXT_UID]:null},e.prototype.generateShader=function(t){var e=this.gl,i=t.program,r={};for(var n in i.attributeData)r[n]=i.attributeData[n].location;var o=qi(e,i.vertexSrc,i.fragmentSrc,r),s={};for(var a in i.uniformData){var h=i.uniformData[a];s[a]={location:e.getUniformLocation(o,a),value:Ki(h.type,h.size)}}var u=new Fr(o,s);return i.glPrograms[this.renderer.CONTEXT_UID]=u,u},e.prototype.reset=function(){this.program=null,this.shader=null},e.prototype.destroy=function(){this.destroyed=!0},e}(fi);var Br=0,Ur=1,kr=2,Xr=3,jr=4,Gr=function(t){function e(e){t.call(this,e),this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=bt.NONE,this._blendEq=!1,this.map=[],this.map[Br]=this.setBlend,this.map[Ur]=this.setOffset,this.map[kr]=this.setCullFace,this.map[Xr]=this.setDepthTest,this.map[jr]=this.setFrontFace,this.checks=[],this.defaultState=new xr,this.defaultState.blend=!0,this.defaultState.depth=!0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.contextChange=function(t){this.gl=t,this.blendModes=function(t,e){return void 0===e&&(e=[]),e[bt.NORMAL]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[bt.ADD]=[t.ONE,t.ONE],e[bt.MULTIPLY]=[t.DST_COLOR,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[bt.SCREEN]=[t.ONE,t.ONE_MINUS_SRC_COLOR,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[bt.OVERLAY]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[bt.DARKEN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[bt.LIGHTEN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[bt.COLOR_DODGE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[bt.COLOR_BURN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[bt.HARD_LIGHT]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[bt.SOFT_LIGHT]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[bt.DIFFERENCE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[bt.EXCLUSION]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[bt.HUE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[bt.SATURATION]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[bt.COLOR]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[bt.LUMINOSITY]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[bt.NONE]=[0,0],e[bt.NORMAL_NPM]=[t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[bt.ADD_NPM]=[t.SRC_ALPHA,t.ONE,t.ONE,t.ONE],e[bt.SCREEN_NPM]=[t.SRC_ALPHA,t.ONE_MINUS_SRC_COLOR,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[bt.SRC_IN]=[t.DST_ALPHA,t.ZERO],e[bt.SRC_OUT]=[t.ONE_MINUS_DST_ALPHA,t.ZERO],e[bt.SRC_ATOP]=[t.DST_ALPHA,t.ONE_MINUS_SRC_ALPHA],e[bt.DST_OVER]=[t.ONE_MINUS_DST_ALPHA,t.ONE],e[bt.DST_IN]=[t.ZERO,t.SRC_ALPHA],e[bt.DST_OUT]=[t.ZERO,t.ONE_MINUS_SRC_ALPHA],e[bt.DST_ATOP]=[t.ONE_MINUS_DST_ALPHA,t.SRC_ALPHA],e[bt.SUBTRACT]=[t.ONE,t.ONE,t.ONE,t.ONE,t.FUNC_REVERSE_SUBTRACT,t.FUNC_ADD],e}(t),this.set(this.defaultState),this.reset()},e.prototype.set=function(t){if(t=t||this.defaultState,this.stateId!==t.data){for(var e=this.stateId^t.data,i=0;e;)1&e&&this.map[i].call(this,!!(t.data&1<<i)),e>>=1,i++;this.stateId=t.data}for(var r=0;r<this.checks.length;r++)this.checks[r](this,t)},e.prototype.forceState=function(t){t=t||this.defaultState;for(var e=0;e<this.map.length;e++)this.map[e].call(this,!!(t.data&1<<e));for(var i=0;i<this.checks.length;i++)this.checks[i](this,t);this.stateId=t.data},e.prototype.setBlend=function(t){this.updateCheck(e.checkBlendMode,t),this.gl[t?"enable":"disable"](this.gl.BLEND)},e.prototype.setOffset=function(t){this.updateCheck(e.checkPolygonOffset,t),this.gl[t?"enable":"disable"](this.gl.POLYGON_OFFSET_FILL)},e.prototype.setDepthTest=function(t){this.gl[t?"enable":"disable"](this.gl.DEPTH_TEST)},e.prototype.setCullFace=function(t){this.gl[t?"enable":"disable"](this.gl.CULL_FACE)},e.prototype.setFrontFace=function(t){this.gl.frontFace(this.gl[t?"CW":"CCW"])},e.prototype.setBlendMode=function(t){if(t!==this.blendMode){this.blendMode=t;var e=this.blendModes[t],i=this.gl;2===e.length?i.blendFunc(e[0],e[1]):i.blendFuncSeparate(e[0],e[1],e[2],e[3]),6===e.length?(this._blendEq=!0,i.blendEquationSeparate(e[4],e[5])):this._blendEq&&(this._blendEq=!1,i.blendEquationSeparate(i.FUNC_ADD,i.FUNC_ADD))}},e.prototype.setPolygonOffset=function(t,e){this.gl.polygonOffset(t,e)},e.prototype.reset=function(){this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL,!1),this.forceState(0),this._blendEq=!0,this.blendMode=-1,this.setBlendMode(0)},e.prototype.updateCheck=function(t,e){var i=this.checks.indexOf(t);e&&-1===i?this.checks.push(t):e||-1===i||this.checks.splice(i,1)},e.checkBlendMode=function(t,e){t.setBlendMode(e.blendMode)},e.checkPolygonOffset=function(t,e){t.setPolygonOffset(e.polygonOffset,0)},e}(fi),Hr=function(t){function e(e){t.call(this,e),this.count=0,this.checkCount=0,this.maxIdle=g.GC_MAX_IDLE,this.checkCountMax=g.GC_MAX_CHECK_COUNT,this.mode=g.GC_MODE}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.postrender=function(){this.count++,this.mode!==Ot.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run()))},e.prototype.run=function(){for(var t=this.renderer.texture,e=t.managedTextures,i=!1,r=0;r<e.length;r++){var n=e[r];!n.framebuffer&&this.count-n.touched>this.maxIdle&&(t.destroyTexture(n,!0),e[r]=null,i=!0)}if(i){for(var o=0,s=0;s<e.length;s++)null!==e[s]&&(e[o++]=e[s]);e.length=o}},e.prototype.unload=function(t){var e=this.renderer.textureSystem;t._texture&&t._texture._glRenderTargets&&e.destroyTexture(t._texture);for(var i=t.children.length-1;i>=0;i--)this.unload(t.children[i])},e}(fi),zr=function(t){this.texture=t,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=6408,this.internalFormat=5121},Vr=function(t){function e(e){t.call(this,e),this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new si}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.contextChange=function(){var t=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion;var e=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=e;for(var i=0;i<e;i++)this.boundTextures[i]=null;this.emptyTextures={};var r=new zr(t.createTexture());t.bindTexture(t.TEXTURE_2D,r.texture),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,new Uint8Array(4)),this.emptyTextures[t.TEXTURE_2D]=r,this.emptyTextures[t.TEXTURE_CUBE_MAP]=new zr(t.createTexture()),t.bindTexture(t.TEXTURE_CUBE_MAP,this.emptyTextures[t.TEXTURE_CUBE_MAP].texture);for(var n=0;n<6;n++)t.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+n,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,null);t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MIN_FILTER,t.LINEAR);for(var o=0;o<this.boundTextures.length;o++)this.bind(null,o)},e.prototype.bind=function(t,e){void 0===e&&(e=0);var i=this.gl;if(t){if((t=t.baseTexture||t).valid){t.touched=this.renderer.textureGC.count;var r=t._glTextures[this.CONTEXT_UID]||this.initTexture(t);this.currentLocation!==e&&(this.currentLocation=e,i.activeTexture(i.TEXTURE0+e)),this.boundTextures[e]!==t&&i.bindTexture(t.target,r.texture),r.dirtyId!==t.dirtyId&&this.updateTexture(t),this.boundTextures[e]=t}}else this.currentLocation!==e&&(this.currentLocation=e,i.activeTexture(i.TEXTURE0+e)),i.bindTexture(i.TEXTURE_2D,this.emptyTextures[i.TEXTURE_2D].texture),this.boundTextures[e]=null},e.prototype.reset=function(){this._unknownBoundTextures=!0,this.currentLocation=-1;for(var t=0;t<this.boundTextures.length;t++)this.boundTextures[t]=this.unknownTexture},e.prototype.unbind=function(t){var e=this.gl,i=this.boundTextures;if(this._unknownBoundTextures){this._unknownBoundTextures=!1;for(var r=0;r<i.length;r++)i[r]===this.unknownTexture&&this.bind(null,r)}for(var n=0;n<i.length;n++)i[n]===t&&(this.currentLocation!==n&&(e.activeTexture(e.TEXTURE0+n),this.currentLocation=n),e.bindTexture(e.TEXTURE_2D,this.emptyTextures[t.target].texture),i[n]=null)},e.prototype.initTexture=function(t){var e=new zr(this.gl.createTexture());return e.dirtyId=-1,t._glTextures[this.CONTEXT_UID]=e,this.managedTextures.push(t),t.on("dispose",this.destroyTexture,this),e},e.prototype.initTextureType=function(t,e){if(e.internalFormat=t.format,e.type=t.type,2===this.webGLVersion){var i=this.renderer.gl;t.type===i.FLOAT&&t.format===i.RGBA&&(e.internalFormat=i.RGBA32F),t.type===St.HALF_FLOAT&&(e.type=i.HALF_FLOAT),e.type===i.HALF_FLOAT&&t.format===i.RGBA&&(e.internalFormat=i.RGBA16F)}},e.prototype.updateTexture=function(t){var e=t._glTextures[this.CONTEXT_UID];if(e){var i=this.renderer;if(this.initTextureType(t,e),t.resource&&t.resource.upload(i,t,e));else{var r=t.realWidth,n=t.realHeight,o=i.gl;(e.width!==r||e.height!==n||e.dirtyId<0)&&(e.width=r,e.height=n,o.texImage2D(t.target,0,e.internalFormat,r,n,0,t.format,e.type,null))}t.dirtyStyleId!==e.dirtyStyleId&&this.updateTextureStyle(t),e.dirtyId=t.dirtyId}},e.prototype.destroyTexture=function(t,e){var i=this.gl;if((t=t.baseTexture||t)._glTextures[this.CONTEXT_UID]&&(this.unbind(t),i.deleteTexture(t._glTextures[this.CONTEXT_UID].texture),t.off("dispose",this.destroyTexture,this),delete t._glTextures[this.CONTEXT_UID],!e)){var r=this.managedTextures.indexOf(t);-1!==r&&Vt(this.managedTextures,r,1)}},e.prototype.updateTextureStyle=function(t){var e=t._glTextures[this.CONTEXT_UID];e&&(t.mipmap!==At.POW2&&2===this.webGLVersion||t.isPowerOfTwo?(e.mipmap=t.mipmap>=1,e.wrapMode=t.wrapMode):(e.mipmap=0,e.wrapMode=Pt.CLAMP),t.resource&&t.resource.style(this.renderer,t,e)||this.setStyle(t,e),e.dirtyStyleId=t.dirtyStyleId)},e.prototype.setStyle=function(t,e){var i=this.gl;if(e.mipmap&&i.generateMipmap(t.target),i.texParameteri(t.target,i.TEXTURE_WRAP_S,e.wrapMode),i.texParameteri(t.target,i.TEXTURE_WRAP_T,e.wrapMode),e.mipmap){i.texParameteri(t.target,i.TEXTURE_MIN_FILTER,t.scaleMode?i.LINEAR_MIPMAP_LINEAR:i.NEAREST_MIPMAP_NEAREST);var r=this.renderer.context.extensions.anisotropicFiltering;if(r&&t.anisotropicLevel>0&&t.scaleMode===It.LINEAR){var n=Math.min(t.anisotropicLevel,i.getParameter(r.MAX_TEXTURE_MAX_ANISOTROPY_EXT));i.texParameterf(t.target,r.TEXTURE_MAX_ANISOTROPY_EXT,n)}}else i.texParameteri(t.target,i.TEXTURE_MIN_FILTER,t.scaleMode?i.LINEAR:i.NEAREST);i.texParameteri(t.target,i.TEXTURE_MAG_FILTER,t.scaleMode?i.LINEAR:i.NEAREST)},e}(fi),Yr={FilterSystem:ki,BatchSystem:ji,ContextSystem:Hi,FramebufferSystem:zi,GeometrySystem:Wi,MaskSystem:Or,StencilSystem:Cr,ProjectionSystem:Mr,RenderTextureSystem:Rr,ShaderSystem:Nr,StateSystem:Gr,TextureGCSystem:Hr,TextureSystem:Vr},Wr=new ye,qr=function(t){function e(e,i){t.call(this),(i=Object.assign({},g.RENDER_OPTIONS,i)).roundPixels&&(g.ROUND_PIXELS=i.roundPixels,ue("5.0.0","Renderer roundPixels option is deprecated, please use PIXI.settings.ROUND_PIXELS",2)),this.options=i,this.type=xt.UNKNOWN,this.screen=new Ce(0,0,i.width,i.height),this.view=i.view||document.createElement("canvas"),this.resolution=i.resolution||g.RESOLUTION,this.transparent=i.transparent,this.autoDensity=i.autoDensity||i.autoResize||!1,this.preserveDrawingBuffer=i.preserveDrawingBuffer,this.clearBeforeRender=i.clearBeforeRender,this._backgroundColor=0,this._backgroundColorRgba=[0,0,0,0],this._backgroundColorString="#000000",this.backgroundColor=i.backgroundColor||this._backgroundColor,this._tempDisplayObjectParent=new Xe,this._lastObjectRendered=this._tempDisplayObjectParent,this.plugins={}}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={width:{configurable:!0},height:{configurable:!0},backgroundColor:{configurable:!0}};return e.prototype.initPlugins=function(t){for(var e in t)this.plugins[e]=new t[e](this)},i.width.get=function(){return this.view.width},i.height.get=function(){return this.view.height},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.autoDensity&&(this.view.style.width=t+"px",this.view.style.height=e+"px")},e.prototype.generateTexture=function(t,e,i,r){0===(r=r||t.getLocalBounds()).width&&(r.width=1),0===r.height&&(r.height=1);var n=wi.create(0|r.width,0|r.height,e,i);return Wr.tx=-r.x,Wr.ty=-r.y,this.render(t,n,!1,Wr,!!t.parent),n},e.prototype.destroy=function(t){for(var e in this.plugins)this.plugins[e].destroy(),this.plugins[e]=null;t&&this.view.parentNode&&this.view.parentNode.removeChild(this.view),this.plugins=null,this.type=xt.UNKNOWN,this.view=null,this.screen=null,this.resolution=0,this.transparent=!1,this.autoDensity=!1,this.blendModes=null,this.options=null,this.preserveDrawingBuffer=!1,this.clearBeforeRender=!1,this._backgroundColor=0,this._backgroundColorRgba=null,this._backgroundColorString=null,this._tempDisplayObjectParent=null,this._lastObjectRendered=null},i.backgroundColor.get=function(){return this._backgroundColor},i.backgroundColor.set=function(t){this._backgroundColor=t,this._backgroundColorString=Bt(t),Nt(t,this._backgroundColorRgba)},Object.defineProperties(e.prototype,i),e}(m),Zr=function(t){function e(i){void 0===i&&(i={}),t.call(this,"WebGL",i),i=this.options,this.type=xt.WEBGL,this.gl=null,this.CONTEXT_UID=0,this.runners={destroy:new ze("destroy"),contextChange:new ze("contextChange",1),reset:new ze("reset"),update:new ze("update"),postrender:new ze("postrender"),prerender:new ze("prerender"),resize:new ze("resize",2)},this.globalUniforms=new Bi({projectionMatrix:new ye},!0),this.addSystem(Or,"mask").addSystem(Hi,"context").addSystem(Gr,"state").addSystem(Nr,"shader").addSystem(Vr,"texture").addSystem(Wi,"geometry").addSystem(zi,"framebuffer").addSystem(Cr,"stencil").addSystem(Mr,"projection").addSystem(Hr,"textureGC").addSystem(ki,"filter").addSystem(Rr,"renderTexture").addSystem(ji,"batch"),this.initPlugins(e.__plugins),i.context?this.context.initFromContext(i.context):this.context.initFromOptions({alpha:this.transparent,antialias:i.antialias,premultipliedAlpha:this.transparent&&"notMultiplied"!==this.transparent,stencil:!0,preserveDrawingBuffer:i.preserveDrawingBuffer,powerPreference:this.options.powerPreference}),this.renderingToScreen=!0,Ft(2===this.context.webGLVersion?"WebGL 2":"WebGL 1"),this.resize(this.options.width,this.options.height)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.create=function(t){if(Lt())return new e(t);throw new Error('WebGL unsupported in this browser, use "pixi.js-legacy" for fallback canvas2d support.')},e.prototype.addSystem=function(t,e){e||(e=t.name);var i=new t(this);if(this[e])throw new Error('Whoops! The name "'+e+'" is already in use');for(var r in this[e]=i,this.runners)this.runners[r].add(i);return this},e.prototype.render=function(t,e,i,r,n){if(this.renderingToScreen=!e,this.runners.prerender.run(),this.emit("prerender"),this.projection.transform=r,!this.context.isLost){if(e||(this._lastObjectRendered=t),!n){var o=t.parent;t.parent=this._tempDisplayObjectParent,t.updateTransform(),t.parent=o}this.renderTexture.bind(e),this.batch.currentRenderer.start(),(void 0!==i?i:this.clearBeforeRender)&&this.renderTexture.clear(),t.render(this),this.batch.currentRenderer.flush(),e&&e.baseTexture.update(),this.runners.postrender.run(),this.projection.transform=null,this.emit("postrender")}},e.prototype.resize=function(e,i){t.prototype.resize.call(this,e,i),this.runners.resize.run(e,i)},e.prototype.reset=function(){return this.runners.reset.run(),this},e.prototype.clear=function(){this.framebuffer.bind(),this.framebuffer.clear()},e.prototype.destroy=function(e){for(var i in this.runners.destroy.run(),this.runners)this.runners[i].destroy();t.prototype.destroy.call(this,e),this.gl=null},e.registerPlugin=function(t,i){e.__plugins=e.__plugins||{},e.__plugins[t]=i},e}(qr);function Kr(t){return Zr.create(t)}var Jr="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n    gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n    vTextureCoord = aTextureCoord;\n}",Qr="attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n    vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n    return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n    return aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\n\nvoid main(void)\n{\n    gl_Position = filterVertexPosition();\n    vTextureCoord = filterTextureCoord();\n}\n",$r=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.from=function(t,i){return new e(new ui(t,i))},e}(si),tn=function(){this.textures=[],this.ids=[],this.blend=0,this.textureCount=0,this.start=0,this.size=0,this.type=4},en=function(t){this.rawBinaryData=new ArrayBuffer(t),this.uint32View=new Uint32Array(this.rawBinaryData),this.float32View=new Float32Array(this.rawBinaryData)},rn={int8View:{configurable:!0},uint8View:{configurable:!0},int16View:{configurable:!0},uint16View:{configurable:!0},int32View:{configurable:!0}};rn.int8View.get=function(){return this._int8View||(this._int8View=new Int8Array(this.rawBinaryData)),this._int8View},rn.uint8View.get=function(){return this._uint8View||(this._uint8View=new Uint8Array(this.rawBinaryData)),this._uint8View},rn.int16View.get=function(){return this._int16View||(this._int16View=new Int16Array(this.rawBinaryData)),this._int16View},rn.uint16View.get=function(){return this._uint16View||(this._uint16View=new Uint16Array(this.rawBinaryData)),this._uint16View},rn.int32View.get=function(){return this._int32View||(this._int32View=new Int32Array(this.rawBinaryData)),this._int32View},en.prototype.view=function(t){return this[t+"View"]},en.prototype.destroy=function(){this.rawBinaryData=null,this._int8View=null,this._uint8View=null,this._int16View=null,this._uint16View=null,this._int32View=null,this.uint32View=null,this.float32View=null},en.sizeOf=function(t){switch(t){case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;default:throw new Error(t+" isn't a valid view type")}},Object.defineProperties(en.prototype,rn);var nn=function(t){function e(e){t.call(this,e),this.shaderGenerator=null,this.geometryClass=null,this.vertexSize=null,this.state=xr.for2d(),this.size=8e3,this._vertexCount=0,this._indexCount=0,this._bufferedElements=[],this._bufferSize=0,this._shader=null,this._packedGeometries=[],this._packedGeometryPoolSize=2,this._flushId=0,this._drawCalls=[];for(var i=0;i<this.size/4;i++)this._drawCalls[i]=new tn;this._aBuffers={},this._iBuffers={},this.MAX_TEXTURES=1,this.renderer.on("prerender",this.onPrerender,this),e.runners.contextChange.add(this)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.contextChange=function(){var t=this.renderer.gl;g.PREFER_ENV===_t.WEBGL_LEGACY?this.MAX_TEXTURES=1:(this.MAX_TEXTURES=Math.min(t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),g.SPRITE_MAX_TEXTURES),this.MAX_TEXTURES=dr(this.MAX_TEXTURES,t)),this._shader=this.shaderGenerator.generateShader(this.MAX_TEXTURES);for(var e=0;e<this._packedGeometryPoolSize;e++)this._packedGeometries[e]=new this.geometryClass},e.prototype.onPrerender=function(){this._flushId=0},e.prototype.render=function(t){t._texture.valid&&(this._vertexCount+t.vertexData.length/2>this.size&&this.flush(),this._vertexCount+=t.vertexData.length/2,this._indexCount+=t.indices.length,this._bufferedElements[this._bufferSize++]=t)},e.prototype.flush=function(){if(0!==this._vertexCount){var t,e,i=this.getAttributeBuffer(this._vertexCount),r=this.getIndexBuffer(this._indexCount),n=this.renderer.gl,o=this._bufferedElements,s=this._drawCalls,a=this.MAX_TEXTURES,h=this._packedGeometries,u=this.vertexSize,l=this.renderer.textureGC.count,c=0,d=0,p=0,f=s[0],v=0,m=-1;f.textureCount=0,f.start=0,f.blend=m;var y,_=++si._globalBatch;for(y=0;y<this._bufferSize;++y){var x=o[y];o[y]=null,t=x._texture.baseTexture;var b=kt[t.premultiplyAlpha?1:0][x.blendMode];m!==b&&(m=b,e=null,p=a,_++),e!==t&&(e=t,t._batchEnabled!==_&&(p===a&&(_++,p=0,f.size=d-f.start,(f=s[v++]).textureCount=0,f.blend=m,f.start=d),t.touched=l,t._batchEnabled=_,t._id=p,f.textures[f.textureCount++]=t,p++)),this.packInterleavedGeometry(x,i,r,c,d),c+=x.vertexData.length/2*u,d+=x.indices.length}si._globalBatch=_,f.size=d-f.start,g.CAN_UPLOAD_SAME_BUFFER?(h[this._flushId]._buffer.update(i.rawBinaryData,0),h[this._flushId]._indexBuffer.update(r,0),this.renderer.geometry.updateBuffers()):(this._packedGeometryPoolSize<=this._flushId&&(this._packedGeometryPoolSize++,h[this._flushId]=new this.geometryClass),h[this._flushId]._buffer.update(i.rawBinaryData,0),h[this._flushId]._indexBuffer.update(r,0),this.renderer.geometry.bind(h[this._flushId]),this.renderer.geometry.updateBuffers(),this._flushId++);var T=this.renderer.texture,w=this.renderer.state;for(y=0;y<v;y++){for(var E=s[y],S=E.textureCount,I=0;I<S;I++)T.bind(E.textures[I],I),E.textures[I]=null;w.setBlendMode(E.blend),n.drawElements(E.type,E.size,n.UNSIGNED_SHORT,2*E.start)}this._bufferSize=0,this._vertexCount=0,this._indexCount=0}},e.prototype.start=function(){this.renderer.state.set(this.state),this.renderer.shader.bind(this._shader),g.CAN_UPLOAD_SAME_BUFFER&&this.renderer.geometry.bind(this._packedGeometries[this._flushId])},e.prototype.stop=function(){this.flush()},e.prototype.destroy=function(){for(var e=0;e<this._packedGeometryPoolSize;e++)this._packedGeometries[e]&&this._packedGeometries[e].destroy();this.renderer.off("prerender",this.onPrerender,this),this._aBuffers=null,this._iBuffers=null,this._packedGeometries=null,this._drawCalls=null,this._shader&&(this._shader.destroy(),this._shader=null),t.prototype.destroy.call(this)},e.prototype.getAttributeBuffer=function(t){var e=Zt(Math.ceil(t/8)),i=Jt(e),r=8*e;this._aBuffers.length<=i&&(this._iBuffers.length=i+1);var n=this._aBuffers[r];return n||(this._aBuffers[r]=n=new en(r*this.vertexSize*4)),n},e.prototype.getIndexBuffer=function(t){var e=Zt(Math.ceil(t/12)),i=Jt(e),r=12*e;this._iBuffers.length<=i&&(this._iBuffers.length=i+1);var n=this._iBuffers[i];return n||(this._iBuffers[i]=n=new Uint16Array(r)),n},e.prototype.packInterleavedGeometry=function(t,e,i,r,n){for(var o=e.uint32View,s=e.float32View,a=r/this.vertexSize,h=t.uvs,u=t.indices,l=t.vertexData,c=t._texture.baseTexture._id,d=Math.min(t.worldAlpha,1),p=d<1&&t._texture.baseTexture.premultiplyAlpha?Gt(t._tintRGB,d):t._tintRGB+(255*d<<24),f=0;f<l.length;f+=2)s[r++]=l[f],s[r++]=l[f+1],s[r++]=h[f],s[r++]=h[f+1],o[r++]=p,s[r++]=c;for(var v=0;v<u.length;v++)i[n++]=a+u[v]},e}(Xi),on=function(t,e){if(this.vertexSrc=t,this.fragTemplate=e,this.programCache={},this.defaultGroupCache={},e.indexOf("%count%")<0)throw new Error('Fragment template must contain "%count%".');if(e.indexOf("%forloop%")<0)throw new Error('Fragment template must contain "%forloop%".')};on.prototype.generateShader=function(t){if(!this.programCache[t]){for(var e=new Int32Array(t),i=0;i<t;i++)e[i]=i;this.defaultGroupCache[t]=Bi.from({uSamplers:e},!0);var r=this.fragTemplate;r=(r=r.replace(/%count%/gi,""+t)).replace(/%forloop%/gi,this.generateSampleSrc(t)),this.programCache[t]=new gr(this.vertexSrc,r)}var n={tint:new Float32Array([1,1,1,1]),translationMatrix:new ye,default:this.defaultGroupCache[t]};return new yr(this.programCache[t],n)},on.prototype.generateSampleSrc=function(t){var e="";e+="\n",e+="\n";for(var i=0;i<t;i++)i>0&&(e+="\nelse "),i<t-1&&(e+="if(vTextureId < "+i+".5)"),e+="\n{",e+="\n\tcolor = texture2D(uSamplers["+i+"], vTextureCoord);",e+="\n}";return e+="\n",e+="\n"};var sn=function(t){function e(e){void 0===e&&(e=!1),t.call(this),this._buffer=new Pi(null,e,!1),this._indexBuffer=new Pi(null,e,!0),this.addAttribute("aVertexPosition",this._buffer,2,!1,St.FLOAT).addAttribute("aTextureCoord",this._buffer,2,!1,St.FLOAT).addAttribute("aColor",this._buffer,4,!0,St.UNSIGNED_BYTE).addAttribute("aTextureId",this._buffer,1,!0,St.FLOAT).addIndex(this._indexBuffer)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Ri),an="precision highp float;\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec4 aColor;\nattribute float aTextureId;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform vec4 tint;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\nvarying float vTextureId;\n\nvoid main(void){\n    gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n    vTextureCoord = aTextureCoord;\n    vTextureId = aTextureId;\n    vColor = aColor * tint;\n}\n",hn="varying vec2 vTextureCoord;\nvarying vec4 vColor;\nvarying float vTextureId;\nuniform sampler2D uSamplers[%count%];\n\nvoid main(void){\n    vec4 color;\n    %forloop%\n    gl_FragColor = color * vColor;\n}\n",un=function(){},ln={defaultVertexSrc:{configurable:!0},defaultFragmentTemplate:{configurable:!0}};un.create=function(t){var e=Object.assign({vertex:an,fragment:hn,geometryClass:sn,vertexSize:6},t),i=e.vertex,r=e.fragment,n=e.vertexSize,o=e.geometryClass;return function(t){function e(e){t.call(this,e),this.shaderGenerator=new on(i,r),this.geometryClass=o,this.vertexSize=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(nn)},ln.defaultVertexSrc.get=function(){return an},ln.defaultFragmentTemplate.get=function(){return hn},Object.defineProperties(un,ln);var cn=un.create(),dn=new Ce,pn=function(t){this.renderer=t,t.extract=this};pn.prototype.image=function(t,e,i){var r=new Image;return r.src=this.base64(t,e,i),r},pn.prototype.base64=function(t,e,i){return this.canvas(t).toDataURL(e,i)},pn.prototype.canvas=function(t){var e,i,r,n=this.renderer,o=!1,s=!1;t&&(t instanceof wi?r=t:(r=this.renderer.generateTexture(t),s=!0)),r?(e=r.baseTexture.resolution,i=r.frame,o=!1,n.renderTexture.bind(r)):(e=this.renderer.resolution,o=!0,(i=dn).width=this.renderer.width,i.height=this.renderer.height,n.renderTexture.bind(null));var a=Math.floor(i.width*e),h=Math.floor(i.height*e),u=new ie(a,h,1),l=new Uint8Array(4*a*h),c=n.gl;c.readPixels(i.x*e,i.y*e,a,h,c.RGBA,c.UNSIGNED_BYTE,l);var d=u.context.getImageData(0,0,a,h);return pn.arrayPostDivide(l,d.data),u.context.putImageData(d,0,0),o&&(u.context.scale(1,-1),u.context.drawImage(u.canvas,0,-h)),s&&r.destroy(!0),u.canvas},pn.prototype.pixels=function(t){var e,i,r,n=this.renderer,o=!1;t&&(t instanceof wi?r=t:(r=this.renderer.generateTexture(t),o=!0)),r?(e=r.baseTexture.resolution,i=r.frame,n.renderTexture.bind(r)):(e=n.resolution,(i=dn).width=n.width,i.height=n.height,n.renderTexture.bind(null));var s=i.width*e,a=i.height*e,h=new Uint8Array(4*s*a),u=n.gl;return u.readPixels(i.x*e,i.y*e,s,a,u.RGBA,u.UNSIGNED_BYTE,h),o&&r.destroy(!0),pn.arrayPostDivide(h,h),h},pn.prototype.destroy=function(){this.renderer.extract=null,this.renderer=null},pn.arrayPostDivide=function(t,e){for(var i=0;i<t.length;i+=4){var r=e[i+3]=t[i+3];0!==r?(e[i]=Math.round(Math.min(255*t[i]/r,255)),e[i+1]=Math.round(Math.min(255*t[i+1]/r,255)),e[i+2]=Math.round(Math.min(255*t[i+2]/r,255))):(e[i]=t[i],e[i+1]=t[i+1],e[i+2]=t[i+2])}};var fn={Extract:pn},vn=function(){this.global=new ce,this.target=null,this.originalEvent=null,this.identifier=null,this.isPrimary=!1,this.button=0,this.buttons=0,this.width=0,this.height=0,this.tiltX=0,this.tiltY=0,this.pointerType=null,this.pressure=0,this.rotationAngle=0,this.twist=0,this.tangentialPressure=0},gn={pointerId:{configurable:!0}};gn.pointerId.get=function(){return this.identifier},vn.prototype.getLocalPosition=function(t,e,i){return t.worldTransform.applyInverse(i||this.global,e)},vn.prototype.copyEvent=function(t){t.isPrimary&&(this.isPrimary=!0),this.button=t.button,this.buttons=Number.isInteger(t.buttons)?t.buttons:t.which,this.width=t.width,this.height=t.height,this.tiltX=t.tiltX,this.tiltY=t.tiltY,this.pointerType=t.pointerType,this.pressure=t.pressure,this.rotationAngle=t.rotationAngle,this.twist=t.twist||0,this.tangentialPressure=t.tangentialPressure||0},vn.prototype.reset=function(){this.isPrimary=!1},Object.defineProperties(vn.prototype,gn);var mn=function(){this.stopped=!1,this.stopsPropagatingAt=null,this.stopPropagationHint=!1,this.target=null,this.currentTarget=null,this.type=null,this.data=null};mn.prototype.stopPropagation=function(){this.stopped=!0,this.stopPropagationHint=!0,this.stopsPropagatingAt=this.currentTarget},mn.prototype.reset=function(){this.stopped=!1,this.stopsPropagatingAt=null,this.stopPropagationHint=!1,this.currentTarget=null,this.target=null};var yn=function t(e){this._pointerId=e,this._flags=t.FLAGS.NONE},_n={pointerId:{configurable:!0},flags:{configurable:!0},none:{configurable:!0},over:{configurable:!0},rightDown:{configurable:!0},leftDown:{configurable:!0}};yn.prototype._doSet=function(t,e){this._flags=e?this._flags|t:this._flags&~t},_n.pointerId.get=function(){return this._pointerId},_n.flags.get=function(){return this._flags},_n.flags.set=function(t){this._flags=t},_n.none.get=function(){return this._flags===this.constructor.FLAGS.NONE},_n.over.get=function(){return 0!=(this._flags&this.constructor.FLAGS.OVER)},_n.over.set=function(t){this._doSet(this.constructor.FLAGS.OVER,t)},_n.rightDown.get=function(){return 0!=(this._flags&this.constructor.FLAGS.RIGHT_DOWN)},_n.rightDown.set=function(t){this._doSet(this.constructor.FLAGS.RIGHT_DOWN,t)},_n.leftDown.get=function(){return 0!=(this._flags&this.constructor.FLAGS.LEFT_DOWN)},_n.leftDown.set=function(t){this._doSet(this.constructor.FLAGS.LEFT_DOWN,t)},Object.defineProperties(yn.prototype,_n),yn.FLAGS=Object.freeze({NONE:0,OVER:1,LEFT_DOWN:2,RIGHT_DOWN:4});var xn={interactive:!1,interactiveChildren:!0,hitArea:null,get buttonMode(){return"pointer"===this.cursor},set buttonMode(t){t?this.cursor="pointer":"pointer"===this.cursor&&(this.cursor=null)},cursor:null,get trackedPointers(){return void 0===this._trackedPointers&&(this._trackedPointers={}),this._trackedPointers},_trackedPointers:void 0};Ue.mixin(xn);var bn=1,Tn={target:null,data:{global:null}},wn=function(t){function e(e,i){t.call(this),i=i||{},this.renderer=e,this.autoPreventDefault=void 0===i.autoPreventDefault||i.autoPreventDefault,this.interactionFrequency=i.interactionFrequency||10,this.mouse=new vn,this.mouse.identifier=bn,this.mouse.global.set(-999999),this.activeInteractionData={},this.activeInteractionData[bn]=this.mouse,this.interactionDataPool=[],this.eventData=new mn,this.interactionDOMElement=null,this.moveWhenInside=!1,this.eventsAdded=!1,this.mouseOverRenderer=!1,this.supportsTouchEvents="ontouchstart"in window,this.supportsPointerEvents=!!window.PointerEvent,this.onPointerUp=this.onPointerUp.bind(this),this.processPointerUp=this.processPointerUp.bind(this),this.onPointerCancel=this.onPointerCancel.bind(this),this.processPointerCancel=this.processPointerCancel.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.processPointerDown=this.processPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.processPointerMove=this.processPointerMove.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.processPointerOverOut=this.processPointerOverOut.bind(this),this.onPointerOver=this.onPointerOver.bind(this),this.cursorStyles={default:"inherit",pointer:"pointer"},this.currentCursorMode=null,this.cursor=null,this._tempPoint=new ce,this.resolution=1,this.delayedEvents=[],this.setTargetElement(this.renderer.view,this.renderer.resolution)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.hitTest=function(t,e){return Tn.target=null,Tn.data.global=t,e||(e=this.renderer._lastObjectRendered),this.processInteractive(Tn,e,null,!0),Tn.target},e.prototype.setTargetElement=function(t,e){void 0===e&&(e=1),this.removeEvents(),this.interactionDOMElement=t,this.resolution=e,this.addEvents()},e.prototype.addEvents=function(){this.interactionDOMElement&&(qe.system.add(this.update,this,Ye.INTERACTION),window.navigator.msPointerEnabled?(this.interactionDOMElement.style["-ms-content-zooming"]="none",this.interactionDOMElement.style["-ms-touch-action"]="none"):this.supportsPointerEvents&&(this.interactionDOMElement.style["touch-action"]="none"),this.supportsPointerEvents?(window.document.addEventListener("pointermove",this.onPointerMove,!0),this.interactionDOMElement.addEventListener("pointerdown",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("pointerleave",this.onPointerOut,!0),this.interactionDOMElement.addEventListener("pointerover",this.onPointerOver,!0),window.addEventListener("pointercancel",this.onPointerCancel,!0),window.addEventListener("pointerup",this.onPointerUp,!0)):(window.document.addEventListener("mousemove",this.onPointerMove,!0),this.interactionDOMElement.addEventListener("mousedown",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("mouseout",this.onPointerOut,!0),this.interactionDOMElement.addEventListener("mouseover",this.onPointerOver,!0),window.addEventListener("mouseup",this.onPointerUp,!0)),this.supportsTouchEvents&&(this.interactionDOMElement.addEventListener("touchstart",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("touchcancel",this.onPointerCancel,!0),this.interactionDOMElement.addEventListener("touchend",this.onPointerUp,!0),this.interactionDOMElement.addEventListener("touchmove",this.onPointerMove,!0)),this.eventsAdded=!0)},e.prototype.removeEvents=function(){this.interactionDOMElement&&(qe.system.remove(this.update,this),window.navigator.msPointerEnabled?(this.interactionDOMElement.style["-ms-content-zooming"]="",this.interactionDOMElement.style["-ms-touch-action"]=""):this.supportsPointerEvents&&(this.interactionDOMElement.style["touch-action"]=""),this.supportsPointerEvents?(window.document.removeEventListener("pointermove",this.onPointerMove,!0),this.interactionDOMElement.removeEventListener("pointerdown",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("pointerleave",this.onPointerOut,!0),this.interactionDOMElement.removeEventListener("pointerover",this.onPointerOver,!0),window.removeEventListener("pointercancel",this.onPointerCancel,!0),window.removeEventListener("pointerup",this.onPointerUp,!0)):(window.document.removeEventListener("mousemove",this.onPointerMove,!0),this.interactionDOMElement.removeEventListener("mousedown",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("mouseout",this.onPointerOut,!0),this.interactionDOMElement.removeEventListener("mouseover",this.onPointerOver,!0),window.removeEventListener("mouseup",this.onPointerUp,!0)),this.supportsTouchEvents&&(this.interactionDOMElement.removeEventListener("touchstart",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("touchcancel",this.onPointerCancel,!0),this.interactionDOMElement.removeEventListener("touchend",this.onPointerUp,!0),this.interactionDOMElement.removeEventListener("touchmove",this.onPointerMove,!0)),this.interactionDOMElement=null,this.eventsAdded=!1)},e.prototype.update=function(t){if(this._deltaTime+=t,!(this._deltaTime<this.interactionFrequency)&&(this._deltaTime=0,this.interactionDOMElement))if(this.didMove)this.didMove=!1;else{for(var e in this.cursor=null,this.activeInteractionData)if(this.activeInteractionData.hasOwnProperty(e)){var i=this.activeInteractionData[e];if(i.originalEvent&&"touch"!==i.pointerType){var r=this.configureInteractionEventForDOMEvent(this.eventData,i.originalEvent,i);this.processInteractive(r,this.renderer._lastObjectRendered,this.processPointerOverOut,!0)}}this.setCursorMode(this.cursor)}},e.prototype.setCursorMode=function(t){if(t=t||"default",this.currentCursorMode!==t){this.currentCursorMode=t;var e=this.cursorStyles[t];if(e)switch(typeof e){case"string":this.interactionDOMElement.style.cursor=e;break;case"function":e(t);break;case"object":Object.assign(this.interactionDOMElement.style,e)}else"string"!=typeof t||Object.prototype.hasOwnProperty.call(this.cursorStyles,t)||(this.interactionDOMElement.style.cursor=t)}},e.prototype.dispatchEvent=function(t,e,i){i.stopPropagationHint&&t!==i.stopsPropagatingAt||(i.currentTarget=t,i.type=e,t.emit(e,i),t[e]&&t[e](i))},e.prototype.delayDispatchEvent=function(t,e,i){this.delayedEvents.push({displayObject:t,eventString:e,eventData:i})},e.prototype.mapPositionToPoint=function(t,e,i){var r;r=this.interactionDOMElement.parentElement?this.interactionDOMElement.getBoundingClientRect():{x:0,y:0,width:0,height:0};var n=1/this.resolution;t.x=(e-r.left)*(this.interactionDOMElement.width/r.width)*n,t.y=(i-r.top)*(this.interactionDOMElement.height/r.height)*n},e.prototype.processInteractive=function(t,e,i,r,n,o){if(!e||!e.visible)return!1;var s=t.data.global,a=!1,h=n=e.interactive||n,u=!0;if(e.hitArea?(r&&(e.worldTransform.applyInverse(s,this._tempPoint),e.hitArea.contains(this._tempPoint.x,this._tempPoint.y)?a=!0:(r=!1,u=!1)),h=!1):e._mask&&r&&(e._mask.containsPoint&&e._mask.containsPoint(s)||(r=!1)),u&&e.interactiveChildren&&e.children)for(var l=e.children,c=l.length-1;c>=0;c--){var d=l[c],p=this.processInteractive(t,d,i,r,h,!0);if(p){if(!d.parent)continue;h=!1,p&&(t.target&&(r=!1),a=!0)}}n&&(r&&!t.target&&!e.hitArea&&e.containsPoint&&e.containsPoint(s)&&(a=!0),e.interactive&&(a&&!t.target&&(t.target=e),i&&i(t,e,!!a)));var f=this.delayedEvents;if(f.length&&!o){t.stopPropagationHint=!1;var v=f.length;this.delayedEvents=[];for(var g=0;g<v;g++){var m=f[g],y=m.displayObject,_=m.eventString,x=m.eventData;x.stopsPropagatingAt===y&&(x.stopPropagationHint=!0),this.dispatchEvent(y,_,x)}}return a},e.prototype.onPointerDown=function(t){if(!this.supportsTouchEvents||"touch"!==t.pointerType){var e=this.normalizeToPointerData(t);if(this.autoPreventDefault&&e[0].isNormalized)(t.cancelable||!("cancelable"in t))&&t.preventDefault();for(var i=e.length,r=0;r<i;r++){var n=e[r],o=this.getInteractionDataForPointerId(n),s=this.configureInteractionEventForDOMEvent(this.eventData,n,o);if(s.data.originalEvent=t,this.processInteractive(s,this.renderer._lastObjectRendered,this.processPointerDown,!0),this.emit("pointerdown",s),"touch"===n.pointerType)this.emit("touchstart",s);else if("mouse"===n.pointerType||"pen"===n.pointerType){var a=2===n.button;this.emit(a?"rightdown":"mousedown",this.eventData)}}}},e.prototype.processPointerDown=function(t,e,i){var r=t.data,n=t.data.identifier;if(i)if(e.trackedPointers[n]||(e.trackedPointers[n]=new yn(n)),this.dispatchEvent(e,"pointerdown",t),"touch"===r.pointerType)this.dispatchEvent(e,"touchstart",t);else if("mouse"===r.pointerType||"pen"===r.pointerType){var o=2===r.button;o?e.trackedPointers[n].rightDown=!0:e.trackedPointers[n].leftDown=!0,this.dispatchEvent(e,o?"rightdown":"mousedown",t)}},e.prototype.onPointerComplete=function(t,e,i){for(var r=this.normalizeToPointerData(t),n=r.length,o=t.target!==this.interactionDOMElement?"outside":"",s=0;s<n;s++){var a=r[s],h=this.getInteractionDataForPointerId(a),u=this.configureInteractionEventForDOMEvent(this.eventData,a,h);if(u.data.originalEvent=t,this.processInteractive(u,this.renderer._lastObjectRendered,i,e||!o),this.emit(e?"pointercancel":"pointerup"+o,u),"mouse"===a.pointerType||"pen"===a.pointerType){var l=2===a.button;this.emit(l?"rightup"+o:"mouseup"+o,u)}else"touch"===a.pointerType&&(this.emit(e?"touchcancel":"touchend"+o,u),this.releaseInteractionDataForPointerId(a.pointerId,h))}},e.prototype.onPointerCancel=function(t){this.supportsTouchEvents&&"touch"===t.pointerType||this.onPointerComplete(t,!0,this.processPointerCancel)},e.prototype.processPointerCancel=function(t,e){var i=t.data,r=t.data.identifier;void 0!==e.trackedPointers[r]&&(delete e.trackedPointers[r],this.dispatchEvent(e,"pointercancel",t),"touch"===i.pointerType&&this.dispatchEvent(e,"touchcancel",t))},e.prototype.onPointerUp=function(t){this.supportsTouchEvents&&"touch"===t.pointerType||this.onPointerComplete(t,!1,this.processPointerUp)},e.prototype.processPointerUp=function(t,e,i){var r=t.data,n=t.data.identifier,o=e.trackedPointers[n],s="touch"===r.pointerType,a="mouse"===r.pointerType||"pen"===r.pointerType,h=!1;if(a){var u=2===r.button,l=yn.FLAGS,c=u?l.RIGHT_DOWN:l.LEFT_DOWN,d=void 0!==o&&o.flags&c;i?(this.dispatchEvent(e,u?"rightup":"mouseup",t),d&&(this.dispatchEvent(e,u?"rightclick":"click",t),h=!0)):d&&this.dispatchEvent(e,u?"rightupoutside":"mouseupoutside",t),o&&(u?o.rightDown=!1:o.leftDown=!1)}i?(this.dispatchEvent(e,"pointerup",t),s&&this.dispatchEvent(e,"touchend",t),o&&(a&&!h||this.dispatchEvent(e,"pointertap",t),s&&(this.dispatchEvent(e,"tap",t),o.over=!1))):o&&(this.dispatchEvent(e,"pointerupoutside",t),s&&this.dispatchEvent(e,"touchendoutside",t)),o&&o.none&&delete e.trackedPointers[n]},e.prototype.onPointerMove=function(t){if(!this.supportsTouchEvents||"touch"!==t.pointerType){var e=this.normalizeToPointerData(t);"mouse"!==e[0].pointerType&&"pen"!==e[0].pointerType||(this.didMove=!0,this.cursor=null);for(var i=e.length,r=0;r<i;r++){var n=e[r],o=this.getInteractionDataForPointerId(n),s=this.configureInteractionEventForDOMEvent(this.eventData,n,o);s.data.originalEvent=t,this.processInteractive(s,this.renderer._lastObjectRendered,this.processPointerMove,!0),this.emit("pointermove",s),"touch"===n.pointerType&&this.emit("touchmove",s),"mouse"!==n.pointerType&&"pen"!==n.pointerType||this.emit("mousemove",s)}"mouse"===e[0].pointerType&&this.setCursorMode(this.cursor)}},e.prototype.processPointerMove=function(t,e,i){var r=t.data,n="touch"===r.pointerType,o="mouse"===r.pointerType||"pen"===r.pointerType;o&&this.processPointerOverOut(t,e,i),this.moveWhenInside&&!i||(this.dispatchEvent(e,"pointermove",t),n&&this.dispatchEvent(e,"touchmove",t),o&&this.dispatchEvent(e,"mousemove",t))},e.prototype.onPointerOut=function(t){if(!this.supportsTouchEvents||"touch"!==t.pointerType){var e=this.normalizeToPointerData(t)[0];"mouse"===e.pointerType&&(this.mouseOverRenderer=!1,this.setCursorMode(null));var i=this.getInteractionDataForPointerId(e),r=this.configureInteractionEventForDOMEvent(this.eventData,e,i);r.data.originalEvent=e,this.processInteractive(r,this.renderer._lastObjectRendered,this.processPointerOverOut,!1),this.emit("pointerout",r),"mouse"===e.pointerType||"pen"===e.pointerType?this.emit("mouseout",r):this.releaseInteractionDataForPointerId(i.identifier)}},e.prototype.processPointerOverOut=function(t,e,i){var r=t.data,n=t.data.identifier,o="mouse"===r.pointerType||"pen"===r.pointerType,s=e.trackedPointers[n];i&&!s&&(s=e.trackedPointers[n]=new yn(n)),void 0!==s&&(i&&this.mouseOverRenderer?(s.over||(s.over=!0,this.delayDispatchEvent(e,"pointerover",t),o&&this.delayDispatchEvent(e,"mouseover",t)),o&&null===this.cursor&&(this.cursor=e.cursor)):s.over&&(s.over=!1,this.dispatchEvent(e,"pointerout",this.eventData),o&&this.dispatchEvent(e,"mouseout",t),s.none&&delete e.trackedPointers[n]))},e.prototype.onPointerOver=function(t){var e=this.normalizeToPointerData(t)[0],i=this.getInteractionDataForPointerId(e),r=this.configureInteractionEventForDOMEvent(this.eventData,e,i);r.data.originalEvent=e,"mouse"===e.pointerType&&(this.mouseOverRenderer=!0),this.emit("pointerover",r),"mouse"!==e.pointerType&&"pen"!==e.pointerType||this.emit("mouseover",r)},e.prototype.getInteractionDataForPointerId=function(t){var e,i=t.pointerId;return i===bn||"mouse"===t.pointerType?e=this.mouse:this.activeInteractionData[i]?e=this.activeInteractionData[i]:((e=this.interactionDataPool.pop()||new vn).identifier=i,this.activeInteractionData[i]=e),e.copyEvent(t),e},e.prototype.releaseInteractionDataForPointerId=function(t){var e=this.activeInteractionData[t];e&&(delete this.activeInteractionData[t],e.reset(),this.interactionDataPool.push(e))},e.prototype.configureInteractionEventForDOMEvent=function(t,e,i){return t.data=i,this.mapPositionToPoint(i.global,e.clientX,e.clientY),"touch"===e.pointerType&&(e.globalX=i.global.x,e.globalY=i.global.y),i.originalEvent=e,t.reset(),t},e.prototype.normalizeToPointerData=function(t){var e=[];if(this.supportsTouchEvents&&t instanceof TouchEvent)for(var i=0,r=t.changedTouches.length;i<r;i++){var n=t.changedTouches[i];void 0===n.button&&(n.button=t.touches.length?1:0),void 0===n.buttons&&(n.buttons=t.touches.length?1:0),void 0===n.isPrimary&&(n.isPrimary=1===t.touches.length&&"touchstart"===t.type),void 0===n.width&&(n.width=n.radiusX||1),void 0===n.height&&(n.height=n.radiusY||1),void 0===n.tiltX&&(n.tiltX=0),void 0===n.tiltY&&(n.tiltY=0),void 0===n.pointerType&&(n.pointerType="touch"),void 0===n.pointerId&&(n.pointerId=n.identifier||0),void 0===n.pressure&&(n.pressure=n.force||.5),void 0===n.twist&&(n.twist=0),void 0===n.tangentialPressure&&(n.tangentialPressure=0),void 0===n.layerX&&(n.layerX=n.offsetX=n.clientX),void 0===n.layerY&&(n.layerY=n.offsetY=n.clientY),n.isNormalized=!0,e.push(n)}else!(t instanceof MouseEvent)||this.supportsPointerEvents&&t instanceof window.PointerEvent?e.push(t):(void 0===t.isPrimary&&(t.isPrimary=!0),void 0===t.width&&(t.width=1),void 0===t.height&&(t.height=1),void 0===t.tiltX&&(t.tiltX=0),void 0===t.tiltY&&(t.tiltY=0),void 0===t.pointerType&&(t.pointerType="mouse"),void 0===t.pointerId&&(t.pointerId=bn),void 0===t.pressure&&(t.pressure=.5),void 0===t.twist&&(t.twist=0),void 0===t.tangentialPressure&&(t.tangentialPressure=0),t.isNormalized=!0,e.push(t));return e},e.prototype.destroy=function(){this.removeEvents(),this.removeAllListeners(),this.renderer=null,this.mouse=null,this.eventData=null,this.interactionDOMElement=null,this.onPointerDown=null,this.processPointerDown=null,this.onPointerUp=null,this.processPointerUp=null,this.onPointerCancel=null,this.processPointerCancel=null,this.onPointerMove=null,this.processPointerMove=null,this.onPointerOut=null,this.processPointerOverOut=null,this.onPointerOver=null,this._tempPoint=null},e}(m),En={InteractionData:vn,InteractionEvent:mn,InteractionManager:wn,InteractionTrackingData:yn,interactiveTarget:xn},Sn={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,_segmentsCount:function(t,e){if(void 0===e&&(e=20),!this.adaptive)return e;var i=Math.ceil(t/this.maxLength);return i<this.minSegments?i=this.minSegments:i>this.maxSegments&&(i=this.maxSegments),i}},In=function(){this.reset()};In.prototype.clone=function(){var t=new In;return t.color=this.color,t.alpha=this.alpha,t.texture=this.texture,t.matrix=this.matrix,t.visible=this.visible,t},In.prototype.reset=function(){this.color=16777215,this.alpha=1,this.texture=bi.WHITE,this.matrix=null,this.visible=!1},In.prototype.destroy=function(){this.texture=null,this.matrix=null};var Pn=function(t,e,i,r){void 0===e&&(e=null),void 0===i&&(i=null),void 0===r&&(r=null),this.shape=t,this.lineStyle=i,this.fillStyle=e,this.matrix=r,this.type=t.type,this.points=[],this.holes=[]};Pn.prototype.clone=function(){return new Pn(this.shape,this.fillStyle,this.lineStyle,this.matrix)},Pn.prototype.destroy=function(){this.shape=null,this.holes.length=0,this.holes=null,this.points.length=0,this.points=null,this.lineStyle=null,this.fillStyle=null};var An={build:function(t){var e,i,r=t.shape,n=t.points,o=r.x,s=r.y;if(n.length=0,t.type===me.CIRC?(e=r.radius,i=r.radius):(e=r.width,i=r.height),0!==e&&0!==i){var a=Math.floor(30*Math.sqrt(r.radius))||Math.floor(15*Math.sqrt(r.width+r.height));a/=2.3;for(var h=2*Math.PI/a,u=0;u<a;u++)n.push(o+Math.sin(-h*u)*e,s+Math.cos(-h*u)*i);n.push(n[0],n[1])}},triangulate:function(t,e){var i=t.points,r=e.points,n=e.indices,o=r.length/2,s=o;r.push(t.shape.x,t.shape.y);for(var a=0;a<i.length;a+=2)r.push(i[a],i[a+1]),n.push(o++,s,o)}};function On(t,e){t.lineStyle.native?function(t,e){var i=0,r=t.shape,n=t.points||r.points,o=r.type!==me.POLY||r.closeStroke;if(0===n.length)return;var s=e.points,a=e.indices,h=n.length/2,u=s.length/2,l=u;for(s.push(n[0],n[1]),i=1;i<h;i++)s.push(n[2*i],n[2*i+1]),a.push(l,l+1),l++;o&&a.push(l,u)}(t,e):function(t,e){var i=t.shape,r=t.points||i.points.slice(),n=e.closePointEps;if(0===r.length)return;var o=t.lineStyle,s=new ce(r[0],r[1]),a=new ce(r[r.length-2],r[r.length-1]),h=i.type!==me.POLY||i.closeStroke,u=Math.abs(s.x-a.x)<n&&Math.abs(s.y-a.y)<n;if(h){r=r.slice(),u&&(r.pop(),r.pop(),a.set(r[r.length-2],r[r.length-1]));var l=a.x+.5*(s.x-a.x),c=a.y+.5*(s.y-a.y);r.unshift(l,c),r.push(l,c)}var d=e.points,p=r.length/2,f=r.length,v=d.length/2,g=o.width/2,m=r[0],y=r[1],_=r[2],x=r[3],b=0,T=0,w=-(y-x),E=m-_,S=0,I=0,P=0,A=0,O=Math.sqrt(w*w+E*E);w/=O,E/=O,w*=g,E*=g;var C=o.alignment,M=2*(1-C),D=2*C;d.push(m-w*M,y-E*M),d.push(m+w*D,y+E*D);for(var R=1;R<p-1;++R){m=r[2*(R-1)],y=r[2*(R-1)+1],_=r[2*R],x=r[2*R+1],b=r[2*(R+1)],T=r[2*(R+1)+1],w=-(y-x),E=m-_,O=Math.sqrt(w*w+E*E),w/=O,E/=O,w*=g,E*=g,S=-(x-T),I=_-b,O=Math.sqrt(S*S+I*I),S/=O,I/=O;var F=-E+y-(-E+x),L=-w+_-(-w+m),N=(-w+m)*(-E+x)-(-w+_)*(-E+y),B=-(I*=g)+T-(-I+x),U=-(S*=g)+_-(-S+b),k=(-S+b)*(-I+x)-(-S+_)*(-I+T),X=F*U-B*L;if(Math.abs(X)<.1)X+=10.1,d.push(_-w*M,x-E*M),d.push(_+w*D,x+E*D);else{var j=(L*k-U*N)/X,G=(B*N-F*k)/X,H=(j-_)*(j-_)+(G-x)*(G-x);H>196*g*g?(P=w-S,A=E-I,O=Math.sqrt(P*P+A*A),P/=O,A/=O,P*=g,A*=g,d.push(_-P*M,x-A*M),d.push(_+P*D,x+A*D),d.push(_-P*D*M,x-A*M),f++):(d.push(_+(j-_)*M,x+(G-x)*M),d.push(_-(j-_)*D,x-(G-x)*D))}}m=r[2*(p-2)],y=r[2*(p-2)+1],_=r[2*(p-1)],x=r[2*(p-1)+1],w=-(y-x),E=m-_,O=Math.sqrt(w*w+E*E),w/=O,E/=O,w*=g,E*=g,d.push(_-w*M,x-E*M),d.push(_+w*D,x+E*D);for(var z=e.indices,V=0;V<f-2;++V)z.push(v,v+1,v+2),v++}(t,e)}var Cn={build:function(t){t.points=t.shape.points.slice()},triangulate:function(t,e){var i=t.points,r=t.holes,n=e.points,o=e.indices;if(i.length>=6){for(var s=[],a=0;a<r.length;a++){var h=r[a];s.push(i.length/2),i=i.concat(h.points)}var u=y(i,s,2);if(!u)return;for(var l=n.length/2,c=0;c<u.length;c+=3)o.push(u[c]+l),o.push(u[c+1]+l),o.push(u[c+2]+l);for(var d=0;d<i.length;d++)n.push(i[d])}}},Mn={build:function(t){var e=t.shape,i=t.points,r=e.x,n=e.y,o=e.width,s=e.height,a=e.radius;i.length=0,Rn(r,n+a,r,n,r+a,n,i),Rn(r+o-a,n,r+o,n,r+o,n+a,i),Rn(r+o,n+s-a,r+o,n+s,r+o-a,n+s,i),Rn(r+a,n+s,r,n+s,r,n+s-a,i)},triangulate:function(t,e){for(var i=t.points,r=e.points,n=e.indices,o=r.length/2,s=y(i,null,2),a=0,h=s.length;a<h;a+=3)n.push(s[a]+o),n.push(s[a+1]+o),n.push(s[a+2]+o);for(var u=0,l=i.length;u<l;u++)r.push(i[u],i[++u])}};function Dn(t,e,i){return t+(e-t)*i}function Rn(t,e,i,r,n,o,s){void 0===s&&(s=[]);for(var a=s,h=0,u=0,l=0,c=0,d=0,p=0,f=0,v=0;f<=20;++f)h=Dn(t,i,v=f/20),u=Dn(e,r,v),l=Dn(i,n,v),c=Dn(r,o,v),d=Dn(h,l,v),p=Dn(u,c,v),a.push(d,p);return a}var Fn=[],Ln=[],Nn=new ce,Bn={};Bn[me.POLY]=Cn,Bn[me.CIRC]=An,Bn[me.ELIP]=An,Bn[me.RECT]={build:function(t){var e=t.shape,i=e.x,r=e.y,n=e.width,o=e.height,s=t.points;s.length=0,s.push(i,r,i+n,r,i+n,r+o,i,r+o)},triangulate:function(t,e){var i=t.points,r=e.points,n=r.length/2;r.push(i[0],i[1],i[2],i[3],i[6],i[7],i[4],i[5]),e.indices.push(n,n+1,n+2,n+1,n+2,n+3)}},Bn[me.RREC]=Mn;var Un=function(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0},kn=function(t){function e(){t.call(this),this.points=[],this.colors=[],this.uvs=[],this.indices=[],this.textureIds=[],this.graphicsData=[],this.dirty=0,this.batchDirty=-1,this.cacheDirty=-1,this.clearDirty=0,this.drawCalls=[],this.batches=[],this.shapeIndex=0,this._bounds=new Be,this.boundsDirty=-1,this.boundsPadding=0,this.batchable=!1,this.indicesUint16=null,this.uvsFloat32=null,this.closePointEps=1e-4}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={bounds:{configurable:!0}};return i.bounds.get=function(){return this.boundsDirty!==this.dirty&&(this.boundsDirty=this.dirty,this.calculateBounds()),this._bounds},e.prototype.invalidate=function(){this.boundsDirty=-1,this.dirty++,this.batchDirty++,this.shapeIndex=0,this.points.length=0,this.colors.length=0,this.uvs.length=0,this.indices.length=0,this.textureIds.length=0;for(var t=0;t<this.drawCalls.length;t++)this.drawCalls[t].textures.length=0,Ln.push(this.drawCalls[t]);this.drawCalls.length=0;for(var e=0;e<this.batches.length;e++){var i=this.batches[e];i.start=0,i.attribStart=0,i.style=null,Fn.push(i)}this.batches.length=0},e.prototype.clear=function(){return this.graphicsData.length>0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this},e.prototype.drawShape=function(t,e,i,r){var n=new Pn(t,e,i,r);return this.graphicsData.push(n),this.dirty++,this},e.prototype.drawHole=function(t,e){if(!this.graphicsData.length)return null;var i=new Pn(t,null,null,e),r=this.graphicsData[this.graphicsData.length-1];return i.lineStyle=r.lineStyle,r.holes.push(i),this.dirty++,this},e.prototype.destroy=function(e){t.prototype.destroy.call(this,e);for(var i=0;i<this.graphicsData.length;++i)this.graphicsData[i].destroy();this.points.length=0,this.points=null,this.colors.length=0,this.colors=null,this.uvs.length=0,this.uvs=null,this.indices.length=0,this.indices=null,this.indexBuffer.destroy(),this.indexBuffer=null,this.graphicsData.length=0,this.graphicsData=null,this.drawCalls.length=0,this.drawCalls=null,this.batches.length=0,this.batches=null,this._bounds=null},e.prototype.containsPoint=function(t){for(var e=this.graphicsData,i=0;i<e.length;++i){var r=e[i];if(r.fillStyle.visible&&(r.shape&&(r.matrix?r.matrix.applyInverse(t,Nn):Nn.copyFrom(t),r.shape.contains(Nn.x,Nn.y)))){if(r.holes)for(var n=0;n<r.holes.length;n++){if(r.holes[n].shape.contains(Nn.x,Nn.y))return!1}return!0}}return!1},e.prototype.updateBatches=function(){if(this.dirty!==this.cacheDirty)if(0!==this.graphicsData.length){if(this.dirty!==this.cacheDirty)for(var t=0;t<this.graphicsData.length;t++){var e=this.graphicsData[t];if(e.fillStyle&&!e.fillStyle.texture.baseTexture.valid)return;if(e.lineStyle&&!e.lineStyle.texture.baseTexture.valid)return}this.cacheDirty=this.dirty;var i=this.uvs,r=null,n=null,o=0,s=!1;if(this.batches.length>0){var a=(r=this.batches[this.batches.length-1]).style;n=a.texture.baseTexture,o=a.color+a.alpha,s=!!a.native}for(var h=this.shapeIndex;h<this.graphicsData.length;h++){this.shapeIndex++;var u=this.graphicsData[h],l=Bn[u.type],c=u.fillStyle,d=u.lineStyle;l.build(u),u.matrix&&this.transformPoints(u.points,u.matrix);for(var p=0;p<2;p++){var f=0===p?c:d;if(f.visible){var v=f.texture.baseTexture,g=this.indices.length,m=this.points.length/2;!r||n===v&&o===f.color+f.alpha&&s===!!f.native||(r.size=g-r.start,r.attribSize=m-r.attribStart,r.size>0&&(r=null)),r||(r=Fn.pop()||new Un,this.batches.push(r),v.wrapMode=Pt.REPEAT,n=v,o=f.color+f.alpha,s=f.native,r.style=f,r.start=g,r.attribStart=m);var y=this.points.length/2;if(0===p)u.holes.length?(this.processHoles(u.holes),Cn.triangulate(u,this)):l.triangulate(u,this);else{On(u,this);for(var _=0;_<u.holes.length;_++)On(u.holes[_],this)}var x=this.points.length/2-y;this.addUvs(this.points,i,f.texture,y,x,f.matrix)}}}var b=this.indices.length,T=this.points.length/2;if(r)if(r.size=b-r.start,r.attribSize=T-r.attribStart,this.indicesUint16=new Uint16Array(this.indices),this.batchable=this.isBatchable(),this.batchable){this.batchDirty++,this.uvsFloat32=new Float32Array(this.uvs);for(var w=0;w<this.batches.length;w++)for(var E=this.batches[w],S=0;S<E.size;S++){var I=E.start+S;this.indicesUint16[I]=this.indicesUint16[I]-E.attribStart}}else this.buildDrawCalls();else this.batchable=!0}else this.batchable=!0},e.prototype.isBatchable=function(){for(var t=this.batches,i=0;i<t.length;i++)if(t[i].style.native)return!1;return this.points.length<2*e.BATCHABLE_SIZE},e.prototype.buildDrawCalls=function(){for(var t=++si._globalBatch,e=0;e<this.drawCalls.length;e++)this.drawCalls[e].textures.length=0,Ln.push(this.drawCalls[e]);this.drawCalls.length=0;var i=this.uvs,r=this.colors,n=this.textureIds,o=Ln.pop()||new tn;o.textureCount=0,o.start=0,o.size=0,o.type=Tt.TRIANGLES;var s=0,a=null,h=0,u=!1,l=Tt.TRIANGLES,c=0;this.drawCalls.push(o);for(var d=0;d<this.batches.length;d++){var p=this.batches[d],f=p.style,v=f.texture.baseTexture;u!==!!f.native&&(l=(u=f.native)?Tt.LINES:Tt.TRIANGLES,a=null,s=8,t++),a!==v&&(a=v,v._batchEnabled!==t&&(8===s&&(t++,s=0,o.size>0&&(o=Ln.pop()||new tn,this.drawCalls.push(o)),o.start=c,o.size=0,o.textureCount=0,o.type=l),v.touched=1,v._batchEnabled=t,v._id=s,v.wrapMode=10497,o.textures[o.textureCount++]=v,s++)),o.size+=p.size,c+=p.size,h=v._id,this.addColors(r,f.color,f.alpha,p.attribSize),this.addTextureIds(n,h,p.attribSize)}si._globalBatch=t;for(var g=this.points,m=new ArrayBuffer(3*g.length*4),y=new Float32Array(m),_=new Uint32Array(m),x=0,b=0;b<g.length/2;b++)y[x++]=g[2*b],y[x++]=g[2*b+1],y[x++]=i[2*b],y[x++]=i[2*b+1],_[x++]=r[b],y[x++]=n[b];this._buffer.update(m),this._indexBuffer.update(this.indicesUint16)},e.prototype.processHoles=function(t){for(var e=0;e<t.length;e++){var i=t[e];Bn[i.type].build(i),i.matrix&&this.transformPoints(i.points,i.matrix)}},e.prototype.calculateBounds=function(){var t=1/0,e=-1/0,i=1/0,r=-1/0;if(this.graphicsData.length)for(var n=null,o=0,s=0,a=0,h=0,u=0;u<this.graphicsData.length;u++){var l=this.graphicsData[u],c=l.type,d=l.lineStyle?l.lineStyle.width:0;if(n=l.shape,c===me.RECT||c===me.RREC)o=n.x-d/2,s=n.y-d/2,t=o<t?o:t,e=o+(a=n.width+d)>e?o+a:e,i=s<i?s:i,r=s+(h=n.height+d)>r?s+h:r;else if(c===me.CIRC)o=n.x,s=n.y,t=o-(a=n.radius+d/2)<t?o-a:t,e=o+a>e?o+a:e,i=s-(h=n.radius+d/2)<i?s-h:i,r=s+h>r?s+h:r;else if(c===me.ELIP)o=n.x,s=n.y,t=o-(a=n.width+d/2)<t?o-a:t,e=o+a>e?o+a:e,i=s-(h=n.height+d/2)<i?s-h:i,r=s+h>r?s+h:r;else for(var p=n.points,f=0,v=0,g=0,m=0,y=0,_=0,x=0,b=0,T=0;T+2<p.length;T+=2)o=p[T],s=p[T+1],f=p[T+2],v=p[T+3],g=Math.abs(f-o),m=Math.abs(v-s),h=d,(a=Math.sqrt(g*g+m*m))<1e-9||(t=(x=(f+o)/2)-(y=(h/a*m+g)/2)<t?x-y:t,e=x+y>e?x+y:e,i=(b=(v+s)/2)-(_=(h/a*g+m)/2)<i?b-_:i,r=b+_>r?b+_:r)}else t=0,e=0,i=0,r=0;var w=this.boundsPadding;this._bounds.minX=t-w,this._bounds.maxX=e+w,this._bounds.minY=i-w,this._bounds.maxY=r+w},e.prototype.transformPoints=function(t,e){for(var i=0;i<t.length/2;i++){var r=t[2*i],n=t[2*i+1];t[2*i]=e.a*r+e.c*n+e.tx,t[2*i+1]=e.b*r+e.d*n+e.ty}},e.prototype.addColors=function(t,e,i,r){for(var n=Gt((e>>16)+(65280&e)+((255&e)<<16),i);r-- >0;)t.push(n)},e.prototype.addTextureIds=function(t,e,i){for(;i-- >0;)t.push(e)},e.prototype.addUvs=function(t,e,i,r,n,o){for(var s=0,a=e.length,h=i.frame;s<n;){var u=t[2*(r+s)],l=t[2*(r+s)+1];if(o){var c=o.a*u+o.c*l+o.tx;l=o.b*u+o.d*l+o.ty,u=c}s++,e.push(u/h.width,l/h.height)}var d=i.baseTexture;(h.width<d.width||h.height<d.height)&&this.adjustUvs(e,i,a,n)},e.prototype.adjustUvs=function(t,e,i,r){for(var n=e.baseTexture,o=i+2*r,s=e.frame,a=s.width/n.width,h=s.height/n.height,u=s.x/s.width,l=s.y/s.height,c=Math.floor(t[i]+1e-6),d=Math.floor(t[i+1]+1e-6),p=i+2;p<o;p+=2)c=Math.min(c,Math.floor(t[p]+1e-6)),d=Math.min(d,Math.floor(t[p+1]+1e-6));u-=c,l-=d;for(var f=i;f<o;f+=2)t[f]=(t[f]+u)*a,t[f+1]=(t[f+1]+l)*h},Object.defineProperties(e.prototype,i),e}(sn);kn.BATCHABLE_SIZE=100;var Xn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){var t=new e;return t.color=this.color,t.alpha=this.alpha,t.texture=this.texture,t.matrix=this.matrix,t.visible=this.visible,t.width=this.width,t.alignment=this.alignment,t.native=this.native,t},e.prototype.reset=function(){t.prototype.reset.call(this),this.color=0,this.width=0,this.alignment=.5,this.native=!1},e}(In),jn=function(){};jn.curveLength=function(t,e,i,r,n,o,s,a){for(var h=0,u=0,l=0,c=0,d=0,p=0,f=0,v=0,g=0,m=0,y=0,_=t,x=e,b=1;b<=10;++b)m=_-(v=(f=(p=(d=1-(u=b/10))*d)*d)*t+3*p*u*i+3*d*(l=u*u)*n+(c=l*u)*s),y=x-(g=f*e+3*p*u*r+3*d*l*o+c*a),_=v,x=g,h+=Math.sqrt(m*m+y*y);return h},jn.curveTo=function(t,e,i,r,n,o,s){var a=s[s.length-2],h=s[s.length-1];s.length-=2;var u=Sn._segmentsCount(jn.curveLength(a,h,t,e,i,r,n,o)),l=0,c=0,d=0,p=0,f=0;s.push(a,h);for(var v=1,g=0;v<=u;++v)d=(c=(l=1-(g=v/u))*l)*l,f=(p=g*g)*g,s.push(d*a+3*c*g*t+3*l*p*i+f*n,d*h+3*c*g*e+3*l*p*r+f*o)};var Gn=function(){};Gn.curveLength=function(t,e,i,r,n,o){var s=t-2*i+n,a=e-2*r+o,h=2*i-2*t,u=2*r-2*e,l=4*(s*s+a*a),c=4*(s*h+a*u),d=h*h+u*u,p=2*Math.sqrt(l+c+d),f=Math.sqrt(l),v=2*l*f,g=2*Math.sqrt(d),m=c/f;return(v*p+f*c*(p-g)+(4*d*l-c*c)*Math.log((2*f+m+p)/(m+g)))/(4*v)},Gn.curveTo=function(t,e,i,r,n){for(var o=n[n.length-2],s=n[n.length-1],a=Sn._segmentsCount(Gn.curveLength(o,s,t,e,i,r)),h=0,u=0,l=1;l<=a;++l){var c=l/a;h=o+(t-o)*c,u=s+(e-s)*c,n.push(h+(t+(i-t)*c-h)*c,u+(e+(r-e)*c-u)*c)}};var Hn=function(){};Hn.curveTo=function(t,e,i,r,n,o){var s=o[o.length-2],a=o[o.length-1]-e,h=s-t,u=r-e,l=i-t,c=Math.abs(a*l-h*u);if(c<1e-8||0===n)return o[o.length-2]===t&&o[o.length-1]===e||o.push(t,e),null;var d=a*a+h*h,p=u*u+l*l,f=a*u+h*l,v=n*Math.sqrt(d)/c,g=n*Math.sqrt(p)/c,m=v*f/d,y=g*f/p,_=v*l+g*h,x=v*u+g*a,b=h*(g+m),T=a*(g+m),w=l*(v+y),E=u*(v+y);return{cx:_+t,cy:x+e,radius:n,startAngle:Math.atan2(T-x,b-_),endAngle:Math.atan2(E-x,w-_),anticlockwise:h*u>l*a}},Hn.arc=function(t,e,i,r,n,o,s,a,h){for(var u=s-o,l=Sn._segmentsCount(Math.abs(u)*n,40*Math.ceil(Math.abs(u)/fe)),c=u/(2*l),d=2*c,p=Math.cos(c),f=Math.sin(c),v=l-1,g=v%1/v,m=0;m<=v;++m){var y=c+o+d*(m+g*m),_=Math.cos(y),x=-Math.sin(y);h.push((p*_+f*x)*n+i,(p*-x+f*_)*n+r)}};var zn=function(t){function e(e,i,r,n,o,s){o=o||n/2;for(var a=-1*Math.PI/2+s,h=2*r,u=fe/h,l=[],c=0;c<h;c++){var d=c%2?o:n,p=c*u+a;l.push(e+d*Math.cos(p),i+d*Math.sin(p))}t.call(this,l)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Le),Vn=new Float32Array(3),Yn={},Wn=function(t){function e(e){void 0===e&&(e=null),t.call(this),this.geometry=e||new kn,this.geometry.refCount++,this.shader=null,this.state=xr.for2d(),this._fillStyle=new In,this._lineStyle=new Xn,this._matrix=null,this._holeMode=!1,this.currentPath=null,this.batches=[],this.batchTint=-1,this.vertexData=null,this._transformID=-1,this.batchDirty=-1,this.pluginName="batch",this.tint=16777215,this.blendMode=bt.NORMAL}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={blendMode:{configurable:!0},tint:{configurable:!0},fill:{configurable:!0},line:{configurable:!0}};return e.prototype.clone=function(){return this.finishPoly(),new e(this.geometry)},i.blendMode.set=function(t){this.state.blendMode=t},i.blendMode.get=function(){return this.state.blendMode},i.tint.get=function(){return this._tint},i.tint.set=function(t){this._tint=t},i.fill.get=function(){return this._fillStyle},i.line.get=function(){return this._lineStyle},e.prototype.lineStyle=function(t,e,i,r,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=1),void 0===r&&(r=.5),void 0===n&&(n=!1),this.lineTextureStyle(t,bi.WHITE,e,i,null,r,n),this},e.prototype.lineTextureStyle=function(t,e,i,r,n,o,s){void 0===t&&(t=0),void 0===e&&(e=bi.WHITE),void 0===i&&(i=16777215),void 0===r&&(r=1),void 0===n&&(n=null),void 0===o&&(o=.5),void 0===s&&(s=!1),this.currentPath&&this.startPoly();var a=t>0&&r>0;return a?(n&&(n=n.clone()).invert(),Object.assign(this._lineStyle,{color:i,width:t,alpha:r,matrix:n,texture:e,alignment:o,native:s,visible:a})):this._lineStyle.reset(),this},e.prototype.startPoly=function(){if(this.currentPath){var t=this.currentPath.points,e=this.currentPath.points.length;e>2&&(this.drawShape(this.currentPath),this.currentPath=new Le,this.currentPath.closeStroke=!1,this.currentPath.points.push(t[e-2],t[e-1]))}else this.currentPath=new Le,this.currentPath.closeStroke=!1},e.prototype.finishPoly=function(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)},e.prototype.moveTo=function(t,e){return this.startPoly(),this.currentPath.points[0]=t,this.currentPath.points[1]=e,this},e.prototype.lineTo=function(t,e){this.currentPath||this.moveTo(0,0);var i=this.currentPath.points,r=i[i.length-2],n=i[i.length-1];return r===t&&n===e||i.push(t,e),this},e.prototype._initCurve=function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.currentPath?0===this.currentPath.points.length&&(this.currentPath.points=[t,e]):this.moveTo(t,e)},e.prototype.quadraticCurveTo=function(t,e,i,r){this._initCurve();var n=this.currentPath.points;return 0===n.length&&this.moveTo(0,0),Gn.curveTo(t,e,i,r,n),this},e.prototype.bezierCurveTo=function(t,e,i,r,n,o){return this._initCurve(),jn.curveTo(t,e,i,r,n,o,this.currentPath.points),this},e.prototype.arcTo=function(t,e,i,r,n){this._initCurve(t,e);var o=this.currentPath.points,s=Hn.curveTo(t,e,i,r,n,o);if(s){var a=s.cx,h=s.cy,u=s.radius,l=s.startAngle,c=s.endAngle,d=s.anticlockwise;this.arc(a,h,u,l,c,d)}return this},e.prototype.arc=function(t,e,i,r,n,o){if(void 0===o&&(o=!1),r===n)return this;if(!o&&n<=r?n+=fe:o&&r<=n&&(r+=fe),0===n-r)return this;var s=t+Math.cos(r)*i,a=e+Math.sin(r)*i,h=this.geometry.closePointEps,u=this.currentPath?this.currentPath.points:null;if(u){var l=Math.abs(u[u.length-2]-s),c=Math.abs(u[u.length-1]-a);l<h&&c<h||u.push(s,a)}else this.moveTo(s,a),u=this.currentPath.points;return Hn.arc(s,a,t,e,i,r,n,o,u),this},e.prototype.beginFill=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=1),this.beginTextureFill(bi.WHITE,t,e)},e.prototype.beginTextureFill=function(t,e,i,r){void 0===t&&(t=bi.WHITE),void 0===e&&(e=16777215),void 0===i&&(i=1),void 0===r&&(r=null),this.currentPath&&this.startPoly();var n=i>0;return n?(r&&(r=r.clone()).invert(),Object.assign(this._fillStyle,{color:e,alpha:i,texture:t,matrix:r,visible:n})):this._fillStyle.reset(),this},e.prototype.endFill=function(){return this.finishPoly(),this._fillStyle.reset(),this},e.prototype.drawRect=function(t,e,i,r){return this.drawShape(new Ce(t,e,i,r))},e.prototype.drawRoundedRect=function(t,e,i,r,n){return this.drawShape(new Ne(t,e,i,r,n))},e.prototype.drawCircle=function(t,e,i){return this.drawShape(new Re(t,e,i))},e.prototype.drawEllipse=function(t,e,i,r){return this.drawShape(new Fe(t,e,i,r))},e.prototype.drawPolygon=function(t){var e=arguments,i=t,r=!0;if(i.points&&(r=i.closeStroke,i=i.points),!Array.isArray(i)){i=new Array(arguments.length);for(var n=0;n<i.length;++n)i[n]=e[n]}var o=new Le(i);return o.closeStroke=r,this.drawShape(o),this},e.prototype.drawShape=function(t){return this._holeMode?this.geometry.drawHole(t,this._matrix):this.geometry.drawShape(t,this._fillStyle.clone(),this._lineStyle.clone(),this._matrix),this},e.prototype.drawStar=function(t,e,i,r,n,o){return void 0===o&&(o=0),this.drawPolygon(new zn(t,e,i,r,n,o))},e.prototype.clear=function(){return this.geometry.clear(),this._lineStyle.reset(),this._fillStyle.reset(),this._matrix=null,this._holeMode=!1,this.currentPath=null,this},e.prototype.isFastRect=function(){return!1},e.prototype._render=function(t){this.finishPoly();var e=this.geometry;e.updateBatches(),e.batchable?(this.batchDirty!==e.batchDirty&&this._populateBatches(),this._renderBatched(t)):(t.batch.flush(),this._renderDirect(t))},e.prototype._populateBatches=function(){var t=this.geometry,e=this.blendMode;this.batches=[],this.batchTint=-1,this._transformID=-1,this.batchDirty=t.batchDirty,this.vertexData=new Float32Array(t.points);for(var i=0,r=t.batches.length;i<r;i++){var n=t.batches[i],o=n.style.color,s=new Float32Array(this.vertexData.buffer,4*n.attribStart*2,2*n.attribSize),a=new Float32Array(t.uvsFloat32.buffer,4*n.attribStart*2,2*n.attribSize),h={vertexData:s,blendMode:e,indices:new Uint16Array(t.indicesUint16.buffer,2*n.start,n.size),uvs:a,_batchRGB:Nt(o),_tintRGB:o,_texture:n.style.texture,alpha:n.style.alpha,worldAlpha:1};this.batches[i]=h}},e.prototype._renderBatched=function(t){if(this.batches.length){t.batch.setObjectRenderer(t.plugins[this.pluginName]),this.calculateVertices(),this.calculateTints();for(var e=0,i=this.batches.length;e<i;e++){var r=this.batches[e];r.worldAlpha=this.worldAlpha*r.alpha,t.plugins[this.pluginName].render(r)}}},e.prototype._renderDirect=function(t){var e=this._resolveDirectShader(t),i=this.geometry,r=this.tint,n=this.worldAlpha,o=e.uniforms,s=i.drawCalls;o.translationMatrix=this.transform.worldTransform,o.tint[0]=(r>>16&255)/255*n,o.tint[1]=(r>>8&255)/255*n,o.tint[2]=(255&r)/255*n,o.tint[3]=n,t.shader.bind(e),t.geometry.bind(i,e),t.state.set(this.state);for(var a=0,h=s.length;a<h;a++)this._renderDrawCallDirect(t,i.drawCalls[a])},e.prototype._renderDrawCallDirect=function(t,e){for(var i=e.textureCount,r=0;r<i;r++)t.texture.bind(e.textures[r],r);t.geometry.draw(e.type,e.size,e.start)},e.prototype._resolveDirectShader=function(t){var e=this.shader,i=this.pluginName;if(!e){if(!Yn[i]){for(var r=new Int32Array(16),n=0;n<16;n++)r[n]=n;var o={tint:new Float32Array([1,1,1,1]),translationMatrix:new ye,default:Bi.from({uSamplers:r},!0)},s=t.plugins[i]._shader.program;Yn[i]=new yr(s,o)}e=Yn[i]}return e},e.prototype._calculateBounds=function(){this.finishPoly();var t=this.geometry.bounds;this._bounds.addFrame(this.transform,t.minX,t.minY,t.maxX,t.maxY)},e.prototype.containsPoint=function(t){return this.worldTransform.applyInverse(t,e._TEMP_POINT),this.geometry.containsPoint(e._TEMP_POINT)},e.prototype.calculateTints=function(){if(this.batchTint!==this.tint){this.batchTint=this.tint;for(var t=Nt(this.tint,Vn),e=0;e<this.batches.length;e++){var i=this.batches[e],r=i._batchRGB,n=(t[0]*r[0]*255<<16)+(t[1]*r[1]*255<<8)+(0|t[2]*r[2]*255);i._tintRGB=(n>>16)+(65280&n)+((255&n)<<16)}}},e.prototype.calculateVertices=function(){if(this._transformID!==this.transform._worldID){this._transformID=this.transform._worldID;for(var t=this.transform.worldTransform,e=t.a,i=t.b,r=t.c,n=t.d,o=t.tx,s=t.ty,a=this.geometry.points,h=this.vertexData,u=0,l=0;l<a.length;l+=2){var c=a[l],d=a[l+1];h[u++]=e*c+r*d+o,h[u++]=n*d+i*c+s}}},e.prototype.closePath=function(){var t=this.currentPath;return t&&(t.closeStroke=!0),this},e.prototype.setMatrix=function(t){return this._matrix=t,this},e.prototype.beginHole=function(){return this.finishPoly(),this._holeMode=!0,this},e.prototype.endHole=function(){return this.finishPoly(),this._holeMode=!1,this},e.prototype.destroy=function(e){t.prototype.destroy.call(this,e),this.geometry.refCount--,0===this.geometry.refCount&&this.geometry.dispose(),this._matrix=null,this.currentPath=null,this._lineStyle.destroy(),this._lineStyle=null,this._fillStyle.destroy(),this._fillStyle=null,this.geometry=null,this.shader=null,this.vertexData=null,this.batches.length=0,this.batches=null,t.prototype.destroy.call(this,e)},Object.defineProperties(e.prototype,i),e}(Xe);Wn._TEMP_POINT=new ce;var qn=new ce,Zn=new Uint16Array([0,1,2,0,2,3]),Kn=function(t){function e(e){t.call(this),this._anchor=new de(this._onAnchorUpdate,this,e?e.defaultAnchor.x:0,e?e.defaultAnchor.y:0),this._texture=null,this._width=0,this._height=0,this._tint=null,this._tintRGB=null,this.tint=16777215,this.blendMode=bt.NORMAL,this.shader=null,this._cachedTint=16777215,this.uvs=null,this.texture=e||bi.EMPTY,this.vertexData=new Float32Array(8),this.vertexTrimmedData=null,this._transformID=-1,this._textureID=-1,this._transformTrimmedID=-1,this._textureTrimmedID=-1,this.indices=Zn,this.size=4,this.start=0,this.pluginName="batch",this.isSprite=!0,this._roundPixels=g.ROUND_PIXELS}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={roundPixels:{configurable:!0},width:{configurable:!0},height:{configurable:!0},anchor:{configurable:!0},tint:{configurable:!0},texture:{configurable:!0}};return e.prototype._onTextureUpdate=function(){this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this._width&&(this.scale.x=qt(this.scale.x)*this._width/this._texture.orig.width),this._height&&(this.scale.y=qt(this.scale.y)*this._height/this._texture.orig.height)},e.prototype._onAnchorUpdate=function(){this._transformID=-1,this._transformTrimmedID=-1},e.prototype.calculateVertices=function(){var t=this._texture;if(this._transformID!==this.transform._worldID||this._textureID!==t._updateID){this._textureID!==t._updateID&&(this.uvs=this._texture._uvs.uvsFloat32),this._transformID=this.transform._worldID,this._textureID=t._updateID;var e=this.transform.worldTransform,i=e.a,r=e.b,n=e.c,o=e.d,s=e.tx,a=e.ty,h=this.vertexData,u=t.trim,l=t.orig,c=this._anchor,d=0,p=0,f=0,v=0;if(u?(d=(p=u.x-c._x*l.width)+u.width,f=(v=u.y-c._y*l.height)+u.height):(d=(p=-c._x*l.width)+l.width,f=(v=-c._y*l.height)+l.height),h[0]=i*p+n*v+s,h[1]=o*v+r*p+a,h[2]=i*d+n*v+s,h[3]=o*v+r*d+a,h[4]=i*d+n*f+s,h[5]=o*f+r*d+a,h[6]=i*p+n*f+s,h[7]=o*f+r*p+a,this._roundPixels)for(var g=0;g<8;g++)h[g]=Math.round(h[g])}},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,i=t.orig,r=this._anchor,n=this.transform.worldTransform,o=n.a,s=n.b,a=n.c,h=n.d,u=n.tx,l=n.ty,c=-r._x*i.width,d=c+i.width,p=-r._y*i.height,f=p+i.height;e[0]=o*c+a*p+u,e[1]=h*p+s*c+l,e[2]=o*d+a*p+u,e[3]=h*p+s*d+l,e[4]=o*d+a*f+u,e[5]=h*f+s*d+l,e[6]=o*c+a*f+u,e[7]=h*f+s*c+l},e.prototype._render=function(t){this.calculateVertices(),t.batch.setObjectRenderer(t.plugins[this.pluginName]),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 Ce),e=this._localBoundsRect),this._bounds.getRectangle(e)):t.prototype.getLocalBounds.call(this,e)},e.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,qn);var e=this._texture.orig.width,i=this._texture.orig.height,r=-e*this.anchor.x,n=0;return qn.x>=r&&qn.x<r+e&&(n=-i*this.anchor.y,qn.y>=n&&qn.y<n+i)},e.prototype.destroy=function(e){if(t.prototype.destroy.call(this,e),this._texture.off("update",this._onTextureUpdate,this),this._anchor=null,"boolean"==typeof e?e:e&&e.texture){var i="boolean"==typeof e?e:e&&e.baseTexture;this._texture.destroy(!!i)}this._texture=null,this.shader=null},e.from=function(t,i){return new e(t instanceof bi?t:bi.from(t,i))},i.roundPixels.set=function(t){this._roundPixels!==t&&(this._transformID=-1),this._roundPixels=t},i.roundPixels.get=function(){return this._roundPixels},i.width.get=function(){return Math.abs(this.scale.x)*this._texture.orig.width},i.width.set=function(t){var e=qt(this.scale.x)||1;this.scale.x=e*t/this._texture.orig.width,this._width=t},i.height.get=function(){return Math.abs(this.scale.y)*this._texture.orig.height},i.height.set=function(t){var e=qt(this.scale.y)||1;this.scale.y=e*t/this._texture.orig.height,this._height=t},i.anchor.get=function(){return this._anchor},i.anchor.set=function(t){this._anchor.copyFrom(t)},i.tint.get=function(){return this._tint},i.tint.set=function(t){this._tint=t,this._tintRGB=(t>>16)+(65280&t)+((255&t)<<16)},i.texture.get=function(){return this._texture},i.texture.set=function(t){this._texture!==t&&(this._texture=t||bi.EMPTY,this._cachedTint=16777215,this._textureID=-1,this._textureTrimmedID=-1,t&&(t.baseTexture.valid?this._onTextureUpdate():t.once("update",this._onTextureUpdate,this)))},Object.defineProperties(e.prototype,i),e}(Xe),Jn={LINEAR_VERTICAL:0,LINEAR_HORIZONTAL:1},Qn={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fillGradientType:Jn.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,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:100,leading:0},$n=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],to=function(t){this.styleID=0,this.reset(),no(this,t,t)},eo={align:{configurable:!0},breakWords:{configurable:!0},dropShadow:{configurable:!0},dropShadowAlpha:{configurable:!0},dropShadowAngle:{configurable:!0},dropShadowBlur:{configurable:!0},dropShadowColor:{configurable:!0},dropShadowDistance:{configurable:!0},fill:{configurable:!0},fillGradientType:{configurable:!0},fillGradientStops:{configurable:!0},fontFamily:{configurable:!0},fontSize:{configurable:!0},fontStyle:{configurable:!0},fontVariant:{configurable:!0},fontWeight:{configurable:!0},letterSpacing:{configurable:!0},lineHeight:{configurable:!0},leading:{configurable:!0},lineJoin:{configurable:!0},miterLimit:{configurable:!0},padding:{configurable:!0},stroke:{configurable:!0},strokeThickness:{configurable:!0},textBaseline:{configurable:!0},trim:{configurable:!0},whiteSpace:{configurable:!0},wordWrap:{configurable:!0},wordWrapWidth:{configurable:!0}};function io(t){return"number"==typeof t?Bt(t):("string"==typeof t&&0===t.indexOf("0x")&&(t=t.replace("0x","#")),t)}function ro(t){if(Array.isArray(t)){for(var e=0;e<t.length;++e)t[e]=io(t[e]);return t}return io(t)}function no(t,e,i){for(var r in i)Array.isArray(e[r])?t[r]=e[r].slice():t[r]=e[r]}to.prototype.clone=function(){var t={};return no(t,this,Qn),new to(t)},to.prototype.reset=function(){no(this,Qn,Qn)},eo.align.get=function(){return this._align},eo.align.set=function(t){this._align!==t&&(this._align=t,this.styleID++)},eo.breakWords.get=function(){return this._breakWords},eo.breakWords.set=function(t){this._breakWords!==t&&(this._breakWords=t,this.styleID++)},eo.dropShadow.get=function(){return this._dropShadow},eo.dropShadow.set=function(t){this._dropShadow!==t&&(this._dropShadow=t,this.styleID++)},eo.dropShadowAlpha.get=function(){return this._dropShadowAlpha},eo.dropShadowAlpha.set=function(t){this._dropShadowAlpha!==t&&(this._dropShadowAlpha=t,this.styleID++)},eo.dropShadowAngle.get=function(){return this._dropShadowAngle},eo.dropShadowAngle.set=function(t){this._dropShadowAngle!==t&&(this._dropShadowAngle=t,this.styleID++)},eo.dropShadowBlur.get=function(){return this._dropShadowBlur},eo.dropShadowBlur.set=function(t){this._dropShadowBlur!==t&&(this._dropShadowBlur=t,this.styleID++)},eo.dropShadowColor.get=function(){return this._dropShadowColor},eo.dropShadowColor.set=function(t){var e=ro(t);this._dropShadowColor!==e&&(this._dropShadowColor=e,this.styleID++)},eo.dropShadowDistance.get=function(){return this._dropShadowDistance},eo.dropShadowDistance.set=function(t){this._dropShadowDistance!==t&&(this._dropShadowDistance=t,this.styleID++)},eo.fill.get=function(){return this._fill},eo.fill.set=function(t){var e=ro(t);this._fill!==e&&(this._fill=e,this.styleID++)},eo.fillGradientType.get=function(){return this._fillGradientType},eo.fillGradientType.set=function(t){this._fillGradientType!==t&&(this._fillGradientType=t,this.styleID++)},eo.fillGradientStops.get=function(){return this._fillGradientStops},eo.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 i=0;i<t.length;++i)if(t[i]!==e[i])return!1;return!0})(this._fillGradientStops,t)||(this._fillGradientStops=t,this.styleID++)},eo.fontFamily.get=function(){return this._fontFamily},eo.fontFamily.set=function(t){this.fontFamily!==t&&(this._fontFamily=t,this.styleID++)},eo.fontSize.get=function(){return this._fontSize},eo.fontSize.set=function(t){this._fontSize!==t&&(this._fontSize=t,this.styleID++)},eo.fontStyle.get=function(){return this._fontStyle},eo.fontStyle.set=function(t){this._fontStyle!==t&&(this._fontStyle=t,this.styleID++)},eo.fontVariant.get=function(){return this._fontVariant},eo.fontVariant.set=function(t){this._fontVariant!==t&&(this._fontVariant=t,this.styleID++)},eo.fontWeight.get=function(){return this._fontWeight},eo.fontWeight.set=function(t){this._fontWeight!==t&&(this._fontWeight=t,this.styleID++)},eo.letterSpacing.get=function(){return this._letterSpacing},eo.letterSpacing.set=function(t){this._letterSpacing!==t&&(this._letterSpacing=t,this.styleID++)},eo.lineHeight.get=function(){return this._lineHeight},eo.lineHeight.set=function(t){this._lineHeight!==t&&(this._lineHeight=t,this.styleID++)},eo.leading.get=function(){return this._leading},eo.leading.set=function(t){this._leading!==t&&(this._leading=t,this.styleID++)},eo.lineJoin.get=function(){return this._lineJoin},eo.lineJoin.set=function(t){this._lineJoin!==t&&(this._lineJoin=t,this.styleID++)},eo.miterLimit.get=function(){return this._miterLimit},eo.miterLimit.set=function(t){this._miterLimit!==t&&(this._miterLimit=t,this.styleID++)},eo.padding.get=function(){return this._padding},eo.padding.set=function(t){this._padding!==t&&(this._padding=t,this.styleID++)},eo.stroke.get=function(){return this._stroke},eo.stroke.set=function(t){var e=ro(t);this._stroke!==e&&(this._stroke=e,this.styleID++)},eo.strokeThickness.get=function(){return this._strokeThickness},eo.strokeThickness.set=function(t){this._strokeThickness!==t&&(this._strokeThickness=t,this.styleID++)},eo.textBaseline.get=function(){return this._textBaseline},eo.textBaseline.set=function(t){this._textBaseline!==t&&(this._textBaseline=t,this.styleID++)},eo.trim.get=function(){return this._trim},eo.trim.set=function(t){this._trim!==t&&(this._trim=t,this.styleID++)},eo.whiteSpace.get=function(){return this._whiteSpace},eo.whiteSpace.set=function(t){this._whiteSpace!==t&&(this._whiteSpace=t,this.styleID++)},eo.wordWrap.get=function(){return this._wordWrap},eo.wordWrap.set=function(t){this._wordWrap!==t&&(this._wordWrap=t,this.styleID++)},eo.wordWrapWidth.get=function(){return this._wordWrapWidth},eo.wordWrapWidth.set=function(t){this._wordWrapWidth!==t&&(this._wordWrapWidth=t,this.styleID++)},to.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 i=e.length-1;i>=0;i--){var r=e[i].trim();!/([\"\'])[^\'\"]+\1/.test(r)&&$n.indexOf(r)<0&&(r='"'+r+'"'),e[i]=r}return this.fontStyle+" "+this.fontVariant+" "+this.fontWeight+" "+t+" "+e.join(",")},Object.defineProperties(to.prototype,eo);var oo=function(t,e,i,r,n,o,s,a,h){this.text=t,this.style=e,this.width=i,this.height=r,this.lines=n,this.lineWidths=o,this.lineHeight=s,this.maxLineWidth=a,this.fontProperties=h};oo.measureText=function(t,e,i,r){void 0===r&&(r=oo._canvas),i=null==i?e.wordWrap:i;var n=e.toFontString(),o=oo.measureFont(n);0===o.fontSize&&(o.fontSize=e.fontSize,o.ascent=e.fontSize);var s=r.getContext("2d");s.font=n;for(var a=(i?oo.wordWrap(t,e,r):t).split(/(?:\r\n|\r|\n)/),h=new Array(a.length),u=0,l=0;l<a.length;l++){var c=s.measureText(a[l]).width+(a[l].length-1)*e.letterSpacing;h[l]=c,u=Math.max(u,c)}var d=u+e.strokeThickness;e.dropShadow&&(d+=e.dropShadowDistance);var p=e.lineHeight||o.fontSize+e.strokeThickness,f=Math.max(p,o.fontSize+e.strokeThickness)+(a.length-1)*(p+e.leading);return e.dropShadow&&(f+=e.dropShadowDistance),new oo(t,e,d,f,a,h,p+e.leading,u,o)},oo.wordWrap=function(t,e,i){void 0===i&&(i=oo._canvas);for(var r=i.getContext("2d"),n=0,o="",s="",a={},h=e.letterSpacing,u=e.whiteSpace,l=oo.collapseSpaces(u),c=oo.collapseNewlines(u),d=!l,p=e.wordWrapWidth+h,f=oo.tokenize(t),v=0;v<f.length;v++){var g=f[v];if(oo.isNewline(g)){if(!c){s+=oo.addLine(o),d=!l,o="",n=0;continue}g=" "}if(l){var m=oo.isBreakingSpace(g),y=oo.isBreakingSpace(o[o.length-1]);if(m&&y)continue}var _=oo.getFromCache(g,h,a,r);if(_>p)if(""!==o&&(s+=oo.addLine(o),o="",n=0),oo.canBreakWords(g,e.breakWords))for(var x=g.split(""),b=0;b<x.length;b++){for(var T=x[b],w=1;x[b+w];){var E=x[b+w],S=T[T.length-1];if(oo.canBreakChars(S,E,g,b,e.breakWords))break;T+=E,w++}b+=T.length-1;var I=oo.getFromCache(T,h,a,r);I+n>p&&(s+=oo.addLine(o),d=!1,o="",n=0),o+=T,n+=I}else{o.length>0&&(s+=oo.addLine(o),o="",n=0);var P=v===f.length-1;s+=oo.addLine(g,!P),d=!1,o="",n=0}else _+n>p&&(d=!1,s+=oo.addLine(o),o="",n=0),(o.length>0||!oo.isBreakingSpace(g)||d)&&(o+=g,n+=_)}return s+=oo.addLine(o,!1)},oo.addLine=function(t,e){return void 0===e&&(e=!0),t=oo.trimRight(t),t=e?t+"\n":t},oo.getFromCache=function(t,e,i,r){var n=i[t];if(void 0===n){var o=t.length*e;n=r.measureText(t).width+o,i[t]=n}return n},oo.collapseSpaces=function(t){return"normal"===t||"pre-line"===t},oo.collapseNewlines=function(t){return"normal"===t},oo.trimRight=function(t){if("string"!=typeof t)return"";for(var e=t.length-1;e>=0;e--){var i=t[e];if(!oo.isBreakingSpace(i))break;t=t.slice(0,-1)}return t},oo.isNewline=function(t){return"string"==typeof t&&oo._newlines.indexOf(t.charCodeAt(0))>=0},oo.isBreakingSpace=function(t){return"string"==typeof t&&oo._breakingSpaces.indexOf(t.charCodeAt(0))>=0},oo.tokenize=function(t){var e=[],i="";if("string"!=typeof t)return e;for(var r=0;r<t.length;r++){var n=t[r];oo.isBreakingSpace(n)||oo.isNewline(n)?(""!==i&&(e.push(i),i=""),e.push(n)):i+=n}return""!==i&&e.push(i),e},oo.canBreakWords=function(t,e){return e},oo.canBreakChars=function(t,e,i,r,n){return!0},oo.measureFont=function(t){if(oo._fonts[t])return oo._fonts[t];var e={},i=oo._canvas,r=oo._context;r.font=t;var n=oo.METRICS_STRING+oo.BASELINE_SYMBOL,o=Math.ceil(r.measureText(n).width),s=Math.ceil(r.measureText(oo.BASELINE_SYMBOL).width),a=2*s;s=s*oo.BASELINE_MULTIPLIER|0,i.width=o,i.height=a,r.fillStyle="#f00",r.fillRect(0,0,o,a),r.font=t,r.textBaseline="alphabetic",r.fillStyle="#000",r.fillText(n,0,s);var h=r.getImageData(0,0,o,a).data,u=h.length,l=4*o,c=0,d=0,p=!1;for(c=0;c<s;++c){for(var f=0;f<l;f+=4)if(255!==h[d+f]){p=!0;break}if(p)break;d+=l}for(e.ascent=s-c,d=u-l,p=!1,c=a;c>s;--c){for(var v=0;v<l;v+=4)if(255!==h[d+v]){p=!0;break}if(p)break;d-=l}return e.descent=c-s,e.fontSize=e.ascent+e.descent,oo._fonts[t]=e,e},oo.clearMetrics=function(t){void 0===t&&(t=""),t?delete oo._fonts[t]:oo._fonts={}};var so=function(){try{var t=new OffscreenCanvas(0,0);return t.getContext("2d")?t:document.createElement("canvas")}catch(t){return document.createElement("canvas")}}();so.width=so.height=10,oo._canvas=so,oo._context=so.getContext("2d"),oo._fonts={},oo.METRICS_STRING="|ÉqÅ",oo.BASELINE_SYMBOL="M",oo.BASELINE_MULTIPLIER=1.4,oo._newlines=[10,13],oo._breakingSpaces=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288];var ao={texture:!0,children:!1,baseTexture:!0},ho=function(t){function e(e,i,r){(r=r||document.createElement("canvas")).width=3,r.height=3;var n=bi.from(r);n.orig=new Ce,n.trim=new Ce,t.call(this,n),this.canvas=r,this.context=this.canvas.getContext("2d"),this._resolution=g.RESOLUTION,this._autoResolution=!0,this._text=null,this._style=null,this._styleListener=null,this._font="",this.text=e,this.style=i,this.localStyleID=-1}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={width:{configurable:!0},height:{configurable:!0},style:{configurable:!0},text:{configurable:!0},resolution:{configurable:!0}};return 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 i,r,n=this.context,o=oo.measureText(this._text||" ",this._style,this._style.wordWrap,this.canvas),s=o.width,a=o.height,h=o.lines,u=o.lineHeight,l=o.lineWidths,c=o.maxLineWidth,d=o.fontProperties;this.canvas.width=Math.ceil((Math.max(1,s)+2*e.padding)*this._resolution),this.canvas.height=Math.ceil((Math.max(1,a)+2*e.padding)*this._resolution),n.scale(this._resolution,this._resolution),n.clearRect(0,0,this.canvas.width,this.canvas.height),n.font=this._font,n.lineWidth=e.strokeThickness,n.textBaseline=e.textBaseline,n.lineJoin=e.lineJoin,n.miterLimit=e.miterLimit;for(var p=e.dropShadow?2:1,f=0;f<p;++f){var v=e.dropShadow&&0===f,g=v?2*a:0,m=g*this.resolution;if(v){n.fillStyle="black",n.strokeStyle="black";var y=e.dropShadowColor,_=Nt("number"==typeof y?y:Ut(y));n.shadowColor="rgba("+255*_[0]+","+255*_[1]+","+255*_[2]+","+e.dropShadowAlpha+")",n.shadowBlur=e.dropShadowBlur,n.shadowOffsetX=Math.cos(e.dropShadowAngle)*e.dropShadowDistance,n.shadowOffsetY=Math.sin(e.dropShadowAngle)*e.dropShadowDistance+m}else n.fillStyle=this._generateFillStyle(e,h),n.strokeStyle=e.stroke,n.shadowColor=0,n.shadowBlur=0,n.shadowOffsetX=0,n.shadowOffsetY=0;for(var x=0;x<h.length;x++)i=e.strokeThickness/2,r=e.strokeThickness/2+x*u+d.ascent,"right"===e.align?i+=c-l[x]:"center"===e.align&&(i+=(c-l[x])/2),e.stroke&&e.strokeThickness&&this.drawLetterSpacing(h[x],i+e.padding,r+e.padding-g,!0),e.fill&&this.drawLetterSpacing(h[x],i+e.padding,r+e.padding-g)}this.updateTexture()}},e.prototype.drawLetterSpacing=function(t,e,i,r){void 0===r&&(r=!1);var n=this._style.letterSpacing;if(0!==n)for(var o=e,s=Array.from?Array.from(t):t.split(""),a=this.context.measureText(t).width,h=0,u=0;u<s.length;++u){var l=s[u];r?this.context.strokeText(l,o,i):this.context.fillText(l,o,i),o+=a-(h=this.context.measureText(t.substring(u+1)).width)+n,a=h}else r?this.context.strokeText(t,e,i):this.context.fillText(t,e,i)},e.prototype.updateTexture=function(){var t=this.canvas;if(this._style.trim){var e=ee(t);e.data&&(t.width=e.width,t.height=e.height,this.context.putImageData(e.data,0,0))}var i=this._texture,r=this._style,n=r.trim?0:r.padding,o=i.baseTexture;i.trim.width=i._frame.width=Math.ceil(t.width/this._resolution),i.trim.height=i._frame.height=Math.ceil(t.height/this._resolution),i.trim.x=-n,i.trim.y=-n,i.orig.width=i._frame.width-2*n,i.orig.height=i._frame.height-2*n,this._onTextureUpdate(),o.setRealSize(t.width,t.height,this._resolution),this.dirty=!1},e.prototype._render=function(e){this._autoResolution&&this._resolution!==e.resolution&&(this._resolution=e.resolution,this.dirty=!0),this.updateText(!0),t.prototype._render.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(1===t.fill.length)return t.fill[0];var i,r,n,o,s=Math.ceil(this.canvas.width/this._resolution),a=Math.ceil(this.canvas.height/this._resolution),h=t.fill.slice(),u=t.fillGradientStops.slice();if(!u.length)for(var l=h.length+1,c=1;c<l;++c)u.push(c/l);if(h.unshift(t.fill[0]),u.unshift(0),h.push(t.fill[t.fill.length-1]),u.push(1),t.fillGradientType===Jn.LINEAR_VERTICAL){i=this.context.createLinearGradient(s/2,0,s/2,a),r=(h.length+1)*e.length,n=0;for(var d=0;d<e.length;d++){n+=1;for(var p=0;p<h.length;p++)o="number"==typeof u[p]?u[p]/e.length+d/e.length:n/r,i.addColorStop(o,h[p]),n++}}else{i=this.context.createLinearGradient(0,a/2,s,a/2),r=h.length+1,n=1;for(var f=0;f<h.length;f++)o="number"==typeof u[f]?u[f]:n/r,i.addColorStop(o,h[f]),n++}return i},e.prototype.destroy=function(e){"boolean"==typeof e&&(e={children:e}),e=Object.assign({},ao,e),t.prototype.destroy.call(this,e),this.context=null,this.canvas=null,this._style=null},i.width.get=function(){return this.updateText(!0),Math.abs(this.scale.x)*this._texture.orig.width},i.width.set=function(t){this.updateText(!0);var e=qt(this.scale.x)||1;this.scale.x=e*t/this._texture.orig.width,this._width=t},i.height.get=function(){return this.updateText(!0),Math.abs(this.scale.y)*this._texture.orig.height},i.height.set=function(t){this.updateText(!0);var e=qt(this.scale.y)||1;this.scale.y=e*t/this._texture.orig.height,this._height=t},i.style.get=function(){return this._style},i.style.set=function(t){t=t||{},this._style=t instanceof to?t:new to(t),this.localStyleID=-1,this.dirty=!0},i.text.get=function(){return this._text},i.text.set=function(t){t=String(null==t?"":t),this._text!==t&&(this._text=t,this.dirty=!0)},i.resolution.get=function(){return this._resolution},i.resolution.set=function(t){this._autoResolution=!1,this._resolution!==t&&(this._resolution=t,this.dirty=!0)},Object.defineProperties(e.prototype,i),e}(Kn);g.UPLOADS_PER_FRAME=4;var uo=function(t){this.maxItemsPerFrame=t,this.itemsLeft=0};uo.prototype.beginFrame=function(){this.itemsLeft=this.maxItemsPerFrame},uo.prototype.allowedToUpload=function(){return this.itemsLeft-- >0};var lo=function(t){var e=this;this.limiter=new uo(g.UPLOADS_PER_FRAME),this.renderer=t,this.uploadHookHelper=null,this.queue=[],this.addHooks=[],this.uploadHooks=[],this.completes=[],this.ticking=!1,this.delayedTick=function(){e.queue&&e.prepareItems()},this.registerFindHook(mo),this.registerFindHook(yo),this.registerFindHook(co),this.registerFindHook(po),this.registerFindHook(fo),this.registerUploadHook(vo),this.registerUploadHook(go)};function co(t,e){var i=!1;if(t&&t._textures&&t._textures.length)for(var r=0;r<t._textures.length;r++)if(t._textures[r]instanceof bi){var n=t._textures[r].baseTexture;-1===e.indexOf(n)&&(e.push(n),i=!0)}return i}function po(t,e){return t instanceof si&&(-1===e.indexOf(t)&&e.push(t),!0)}function fo(t,e){if(t._texture&&t._texture instanceof bi){var i=t._texture.baseTexture;return-1===e.indexOf(i)&&e.push(i),!0}return!1}function vo(t,e){return e instanceof ho&&(e.updateText(!0),!0)}function go(t,e){if(e instanceof to){var i=e.toFontString();return oo.measureFont(i),!0}return!1}function mo(t,e){if(t instanceof ho){-1===e.indexOf(t.style)&&e.push(t.style),-1===e.indexOf(t)&&e.push(t);var i=t._texture.baseTexture;return-1===e.indexOf(i)&&e.push(i),!0}return!1}function yo(t,e){return t instanceof to&&(-1===e.indexOf(t)&&e.push(t),!0)}lo.prototype.upload=function(t,e){"function"==typeof t&&(e=t,t=null),t&&this.add(t),this.queue.length?(e&&this.completes.push(e),this.ticking||(this.ticking=!0,qe.system.addOnce(this.tick,this,Ye.UTILITY))):e&&e()},lo.prototype.tick=function(){setTimeout(this.delayedTick,0)},lo.prototype.prepareItems=function(){for(this.limiter.beginFrame();this.queue.length&&this.limiter.allowedToUpload();){var t=this.queue[0],e=!1;if(t&&!t._destroyed)for(var i=0,r=this.uploadHooks.length;i<r;i++)if(this.uploadHooks[i](this.uploadHookHelper,t)){this.queue.shift(),e=!0;break}e||this.queue.shift()}if(this.queue.length)qe.system.addOnce(this.tick,this,Ye.UTILITY);else{this.ticking=!1;var n=this.completes.slice(0);this.completes.length=0;for(var o=0,s=n.length;o<s;o++)n[o]()}},lo.prototype.registerFindHook=function(t){return t&&this.addHooks.push(t),this},lo.prototype.registerUploadHook=function(t){return t&&this.uploadHooks.push(t),this},lo.prototype.add=function(t){for(var e=0,i=this.addHooks.length;e<i&&!this.addHooks[e](t,this.queue);e++);if(t instanceof Xe)for(var r=t.children.length-1;r>=0;r--)this.add(t.children[r]);return this},lo.prototype.destroy=function(){this.ticking&&qe.system.remove(this.tick,this),this.ticking=!1,this.addHooks=null,this.uploadHooks=null,this.renderer=null,this.completes=null,this.queue=null,this.limiter=null,this.uploadHookHelper=null};var _o=function(t){function e(e){t.call(this,e),this.uploadHookHelper=this.renderer,this.registerFindHook(To),this.registerUploadHook(xo),this.registerUploadHook(bo)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(lo);function xo(t,e){return e instanceof si&&(e._glTextures[t.CONTEXT_UID]||t.texture.bind(e),!0)}function bo(t,e){return e instanceof Wn&&((e.dirty||e.clearDirty||!e._webGL[t.plugins.graphics.CONTEXT_UID])&&t.plugins.graphics.updateGraphics(e),!0)}function To(t,e){return t instanceof Wn&&(e.push(t),!0)}var wo=function(t){this.maxMilliseconds=t,this.frameStart=0};wo.prototype.beginFrame=function(){this.frameStart=Date.now()},wo.prototype.allowedToUpload=function(){return Date.now()-this.frameStart<this.maxMilliseconds};var Eo={BasePrepare:lo,CountLimiter:uo,Prepare:_o,TimeLimiter:wo},So=function t(e){var i=this;e=Object.assign({forceCanvas:!1},e),this.renderer=Kr(e),this.stage=new Xe,t._plugins.forEach(function(t){t.init.call(i,e)})},Io={view:{configurable:!0},screen:{configurable:!0}};So.registerPlugin=function(t){So._plugins.push(t)},So.prototype.render=function(){this.renderer.render(this.stage)},Io.view.get=function(){return this.renderer.view},Io.screen.get=function(){return this.renderer.screen},So.prototype.destroy=function(t,e){var i=this,r=So._plugins.slice(0);r.reverse(),r.forEach(function(t){t.destroy.call(i)}),this.stage.destroy(e),this.stage=null,this.renderer.destroy(t),this.renderer=null,this._options=null},Object.defineProperties(So.prototype,Io),So._plugins=[];var Po=function(){};Po.init=function(t){var e=this;Object.defineProperty(this,"resizeTo",{set:function(t){window.removeEventListener("resize",this.resize),this._resizeTo=t,t&&(window.addEventListener("resize",this.resize),this.resize())},get:function(){return this._resizeTo}}),this.resize=function(){e._resizeTo&&(e._resizeTo===window?e.renderer.resize(window.innerWidth,window.innerHeight):e.renderer.resize(e._resizeTo.clientWidth,e._resizeTo.clientHeight))},this._resizeTo=null,this.resizeTo=t.resizeTo||null},Po.destroy=function(){this.resizeTo=null,this.resize=null},So.registerPlugin(Po);var Ao=function(t,e){e=e||{};for(var i={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*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}},r=i.parser[e.strictMode?"strict":"loose"].exec(t),n={},o=14;o--;)n[i.key[o]]=r[o]||"";return n[i.q.name]={},n[i.key[12]].replace(i.q.parser,function(t,e,r){e&&(n[i.q.name][e]=r)}),n},Oo=function(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}(i(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,i,r){return i&&t(e.prototype,i),r&&t(e,r),e}}();function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var n=function(){function t(e,i,n){void 0===i&&(i=!1),r(this,t),this._fn=e,this._once=i,this._thisArg=n,this._next=this._prev=this._owner=null}return i(t,[{key:"detach",value:function(){return null!==this._owner&&(this._owner.detach(this),!0)}}]),t}();function o(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}var s=function(){function t(){r(this,t),this._head=this._tail=void 0}return i(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 i=[];e;)i.push(e),e=e._next;return i}},{key:"has",value:function(t){if(!(t instanceof n))throw new Error("MiniSignal#has(): First arg must be a MiniSignalBinding object.");return t._owner===this}},{key:"dispatch",value:function(){var t=arguments,e=this._head;if(!e)return!1;for(;e;)e._once&&this.detach(e),e._fn.apply(e._thisArg,t),e=e._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 o(this,new n(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 o(this,new n(t,!0,e))}},{key:"detach",value:function(t){if(!(t instanceof n))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}();s.MiniSignalBinding=n,e.default=s,t.exports=e.default}));function Co(){}function Mo(t,e,i,r){var n=0,o=t.length;!function s(a){a||n===o?i&&i(a):r?setTimeout(function(){e(t[n++],s)},1):e(t[n++],s)}()}function Do(t){return function(){if(null===t)throw new Error("Callback was already called.");var e=t;t=null,e.apply(this,arguments)}}function Ro(t,e){if(null==e)e=1;else if(0===e)throw new Error("Concurrency must not be zero");var i=0,r={_tasks:[],concurrency:e,saturated:Co,unsaturated:Co,buffer:e/4,empty:Co,drain:Co,error:Co,started:!1,paused:!1,push:function(t,e){n(t,!1,e)},kill:function(){i=0,r.drain=Co,r.started=!1,r._tasks=[]},unshift:function(t,e){n(t,!0,e)},process:function(){for(;!r.paused&&i<r.concurrency&&r._tasks.length;){var e=r._tasks.shift();0===r._tasks.length&&r.empty(),(i+=1)===r.concurrency&&r.saturated(),t(e.data,Do(o(e)))}},length:function(){return r._tasks.length},running:function(){return i},idle:function(){return r._tasks.length+i===0},pause:function(){!0!==r.paused&&(r.paused=!0)},resume:function(){if(!1!==r.paused){r.paused=!1;for(var t=1;t<=r.concurrency;t++)r.process()}}};function n(t,e,i){if(null!=i&&"function"!=typeof i)throw new Error("task callback must be a function");if(r.started=!0,null==t&&r.idle())setTimeout(function(){return r.drain()},1);else{var n={data:t,callback:"function"==typeof i?i:Co};e?r._tasks.unshift(n):r._tasks.push(n),setTimeout(function(){return r.process()},1)}}function o(t){return function(){i-=1,t.callback.apply(t,arguments),null!=arguments[0]&&r.error(arguments[0],t.data),i<=r.concurrency-r.buffer&&r.unsaturated(),r.idle()&&r.drain(),r.process()}}return r}var Fo={};function Lo(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function No(t,e,i){return e&&Lo(t.prototype,e),i&&Lo(t,i),t}var Bo=!(!window.XDomainRequest||"withCredentials"in new XMLHttpRequest),Uo=null;function ko(){}var Xo=function(){function t(e,i,r){if("string"!=typeof e||"string"!=typeof i)throw new Error("Both name and url are required for constructing a resource.");r=r||{},this._flags=0,this._setFlag(t.STATUS_FLAGS.DATA_URL,0===i.indexOf("data:")),this.name=e,this.url=i,this.extension=this._getExtension(),this.data=null,this.crossOrigin=!0===r.crossOrigin?"anonymous":r.crossOrigin,this.timeout=r.timeout||0,this.loadType=r.loadType||this._determineLoadType(),this.xhrType=r.xhrType,this.metadata=r.metadata||{},this.error=null,this.xhr=null,this.children=[],this.type=t.TYPE.UNKNOWN,this.progressChunk=0,this._dequeue=ko,this._onLoadBinding=null,this._elementTimer=0,this._boundComplete=this.complete.bind(this),this._boundOnError=this._onError.bind(this),this._boundOnProgress=this._onProgress.bind(this),this._boundOnTimeout=this._onTimeout.bind(this),this._boundXhrOnError=this._xhrOnError.bind(this),this._boundXhrOnTimeout=this._xhrOnTimeout.bind(this),this._boundXhrOnAbort=this._xhrOnAbort.bind(this),this._boundXhrOnLoad=this._xhrOnLoad.bind(this),this.onStart=new Oo,this.onProgress=new Oo,this.onComplete=new Oo,this.onAfterMiddleware=new Oo}t.setExtensionLoadType=function(e,i){jo(t._loadTypeMap,e,i)},t.setExtensionXhrType=function(e,i){jo(t._xhrTypeMap,e,i)};var e=t.prototype;return e.complete=function(){this._clearEvents(),this._finish()},e.abort=function(e){if(!this.error){if(this.error=new Error(e),this._clearEvents(),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._finish()}},e.load=function(e){var i=this;if(!this.isLoading)if(this.isComplete)e&&setTimeout(function(){return e(i)},1);else 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:Bo&&this.crossOrigin?this._loadXdr():this._loadXhr()}},e._hasFlag=function(t){return 0!=(this._flags&t)},e._setFlag=function(t,e){this._flags=e?this._flags|t:this._flags&~t},e._clearEvents=function(){clearTimeout(this._elementTimer),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("timeout",this._boundXhrOnTimeout,!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))},e._finish=function(){if(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)},e._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),this.timeout&&(this._elementTimer=setTimeout(this._boundOnTimeout,this.timeout))},e._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.crossOrigin&&(this.data.crossOrigin=this.crossOrigin),!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,i=0;i<this.url.length;++i)this.data.appendChild(this._createSource(t,this.url[i],Array.isArray(e)?e[i]:e));else{var r=this.metadata.mimeType;this.data.appendChild(this._createSource(t,this.url,Array.isArray(r)?r[0]:r))}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(),this.timeout&&(this._elementTimer=setTimeout(this._boundOnTimeout,this.timeout))}else this.abort("Unsupported element: "+t)},e._loadXhr=function(){"string"!=typeof this.xhrType&&(this.xhrType=this._determineXhrType());var e=this.xhr=new XMLHttpRequest;e.open("GET",this.url,!0),e.timeout=this.timeout,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("timeout",this._boundXhrOnTimeout,!1),e.addEventListener("abort",this._boundXhrOnAbort,!1),e.addEventListener("progress",this._boundOnProgress,!1),e.addEventListener("load",this._boundXhrOnLoad,!1),e.send()},e._loadXdr=function(){"string"!=typeof this.xhrType&&(this.xhrType=this._determineXhrType());var t=this.xhr=new XDomainRequest;t.timeout=this.timeout||5e3,t.onerror=this._boundXhrOnError,t.ontimeout=this._boundXhrOnTimeout,t.onprogress=this._boundOnProgress,t.onload=this._boundXhrOnLoad,t.open("GET",this.url,!0),setTimeout(function(){return t.send()},1)},e._createSource=function(t,e,i){i||(i=t+"/"+this._getExtension(e));var r=document.createElement("source");return r.src=e,r.type=i,r},e._onError=function(t){this.abort("Failed to load element using: "+t.target.nodeName)},e._onProgress=function(t){t&&t.lengthComputable&&this.onProgress.dispatch(this,t.loaded/t.total)},e._onTimeout=function(){this.abort("Load timed out.")},e._xhrOnError=function(){var t=this.xhr;this.abort(Go(t)+" Request failed. Status: "+t.status+', text: "'+t.statusText+'"')},e._xhrOnTimeout=function(){var t=this.xhr;this.abort(Go(t)+" Request timed out.")},e._xhrOnAbort=function(){var t=this.xhr;this.abort(Go(t)+" Request was aborted by the user.")},e._xhrOnLoad=function(){var e=this.xhr,i="",r=void 0===e.status?200:e.status;if(""!==e.responseType&&"text"!==e.responseType&&void 0!==e.responseType||(i=e.responseText),0===r&&(i.length>0||e.responseType===t.XHR_RESPONSE_TYPE.BUFFER)?r=200:1223===r&&(r=204),2===(r/100|0)){if(this.xhrType===t.XHR_RESPONSE_TYPE.TEXT)this.data=i,this.type=t.TYPE.TEXT;else if(this.xhrType===t.XHR_RESPONSE_TYPE.JSON)try{this.data=JSON.parse(i),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(i,"text/xml")}else{var o=document.createElement("div");o.innerHTML=i,this.data=o}this.type=t.TYPE.XML}catch(t){return void this.abort("Error trying to parse loaded xml: "+t)}else this.data=e.response||i;this.complete()}else this.abort("["+e.status+"] "+e.statusText+": "+e.responseURL)},e._determineCrossOrigin=function(t,e){if(0===t.indexOf("data:"))return"";if(window.origin!==window.location.origin)return"anonymous";e=e||window.location,Uo||(Uo=document.createElement("a")),Uo.href=t;var i=!(t=Ao(Uo.href,{strictMode:!0})).port&&""===e.port||t.port===e.port,r=t.protocol?t.protocol+":":"";return t.host===e.hostname&&i&&r===e.protocol?"":"anonymous"},e._determineXhrType=function(){return t._xhrTypeMap[this.extension]||t.XHR_RESPONSE_TYPE.TEXT},e._determineLoadType=function(){return t._loadTypeMap[this.extension]||t.LOAD_TYPE.XHR},e._getExtension=function(){var t=this.url,e="";if(this.isDataUrl){var i=t.indexOf("/");e=t.substring(i+1,t.indexOf(";",i))}else{var r=t.indexOf("?"),n=t.indexOf("#"),o=Math.min(r>-1?r:t.length,n>-1?n:t.length);e=(t=t.substring(0,o)).substring(t.lastIndexOf(".")+1)}return e.toLowerCase()},e._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"}},No(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}();function jo(t,e,i){e&&0===e.indexOf(".")&&(e=e.substring(1)),e&&(t[e]=i)}function Go(t){return t.toString().replace("object ","")}Xo.STATUS_FLAGS={NONE:0,DATA_URL:1,COMPLETE:2,LOADING:4},Xo.TYPE={UNKNOWN:0,JSON:1,XML:2,IMAGE:3,AUDIO:4,VIDEO:5,TEXT:6},Xo.LOAD_TYPE={XHR:1,IMAGE:2,AUDIO:3,VIDEO:4},Xo.XHR_RESPONSE_TYPE={DEFAULT:"text",BUFFER:"arraybuffer",BLOB:"blob",DOCUMENT:"document",JSON:"json",TEXT:"text"},Xo._loadTypeMap={gif:Xo.LOAD_TYPE.IMAGE,png:Xo.LOAD_TYPE.IMAGE,bmp:Xo.LOAD_TYPE.IMAGE,jpg:Xo.LOAD_TYPE.IMAGE,jpeg:Xo.LOAD_TYPE.IMAGE,tif:Xo.LOAD_TYPE.IMAGE,tiff:Xo.LOAD_TYPE.IMAGE,webp:Xo.LOAD_TYPE.IMAGE,tga:Xo.LOAD_TYPE.IMAGE,svg:Xo.LOAD_TYPE.IMAGE,"svg+xml":Xo.LOAD_TYPE.IMAGE,mp3:Xo.LOAD_TYPE.AUDIO,ogg:Xo.LOAD_TYPE.AUDIO,wav:Xo.LOAD_TYPE.AUDIO,mp4:Xo.LOAD_TYPE.VIDEO,webm:Xo.LOAD_TYPE.VIDEO},Xo._xhrTypeMap={xhtml:Xo.XHR_RESPONSE_TYPE.DOCUMENT,html:Xo.XHR_RESPONSE_TYPE.DOCUMENT,htm:Xo.XHR_RESPONSE_TYPE.DOCUMENT,xml:Xo.XHR_RESPONSE_TYPE.DOCUMENT,tmx:Xo.XHR_RESPONSE_TYPE.DOCUMENT,svg:Xo.XHR_RESPONSE_TYPE.DOCUMENT,tsx:Xo.XHR_RESPONSE_TYPE.DOCUMENT,gif:Xo.XHR_RESPONSE_TYPE.BLOB,png:Xo.XHR_RESPONSE_TYPE.BLOB,bmp:Xo.XHR_RESPONSE_TYPE.BLOB,jpg:Xo.XHR_RESPONSE_TYPE.BLOB,jpeg:Xo.XHR_RESPONSE_TYPE.BLOB,tif:Xo.XHR_RESPONSE_TYPE.BLOB,tiff:Xo.XHR_RESPONSE_TYPE.BLOB,webp:Xo.XHR_RESPONSE_TYPE.BLOB,tga:Xo.XHR_RESPONSE_TYPE.BLOB,json:Xo.XHR_RESPONSE_TYPE.JSON,text:Xo.XHR_RESPONSE_TYPE.TEXT,txt:Xo.XHR_RESPONSE_TYPE.TEXT,ttf:Xo.XHR_RESPONSE_TYPE.BUFFER,otf:Xo.XHR_RESPONSE_TYPE.BUFFER},Xo.EMPTY_GIF="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==";var Ho="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var zo=window.URL||window.webkitURL;var Vo={caching:function(t,e){var i=this;Fo[t.url]?(t.data=Fo[t.url],t.complete()):t.onComplete.once(function(){return Fo[i.url]=i.data}),e()},parsing:function(t,e){if(t.data){if(t.xhr&&t.xhrType===Xo.XHR_RESPONSE_TYPE.BLOB)if(window.Blob&&"string"!=typeof t.data){if(0===t.data.type.indexOf("image")){var i=zo.createObjectURL(t.data);return t.blob=t.data,t.data=new Image,t.data.src=i,t.type=Xo.TYPE.IMAGE,void(t.data.onload=function(){zo.revokeObjectURL(i),t.data.onload=null,e()})}}else{var r=t.xhr.getResponseHeader("content-type");if(r&&0===r.indexOf("image"))return t.data=new Image,t.data.src="data:"+r+";base64,"+function(t){for(var e="",i=0;i<t.length;){for(var r=[0,0,0],n=[0,0,0,0],o=0;o<r.length;++o)i<t.length?r[o]=255&t.charCodeAt(i++):r[o]=0;switch(n[0]=r[0]>>2,n[1]=(3&r[0])<<4|r[1]>>4,n[2]=(15&r[1])<<2|r[2]>>6,n[3]=63&r[2],i-(t.length-1)){case 2:n[3]=64,n[2]=64;break;case 1:n[3]=64}for(var s=0;s<n.length;++s)e+=Ho.charAt(n[s])}return e}(t.xhr.responseText),t.type=Xo.TYPE.IMAGE,void(t.data.onload=function(){t.data.onload=null,e()})}e()}else e()}},Yo=/(#[\w-]+)?$/,Wo=function(){function t(e,i){var r=this;void 0===e&&(e=""),void 0===i&&(i=10),this.baseUrl=e,this.progress=0,this.loading=!1,this.defaultQueryString="",this._beforeMiddleware=[],this._afterMiddleware=[],this._resourcesParsing=[],this._boundLoadResource=function(t,e){return r._loadResource(t,e)},this._queue=Ro(this._boundLoadResource,i),this._queue.pause(),this.resources={},this.onProgress=new Oo,this.onError=new Oo,this.onLoad=new Oo,this.onStart=new Oo,this.onComplete=new Oo;for(var n=0;n<t._defaultBeforeMiddleware.length;++n)this.pre(t._defaultBeforeMiddleware[n]);for(var o=0;o<t._defaultAfterMiddleware.length;++o)this.use(t._defaultAfterMiddleware[o])}var e=t.prototype;return e.add=function(t,e,i,r){if(Array.isArray(t)){for(var n=0;n<t.length;++n)this.add(t[n]);return this}if("object"==typeof t&&(r=e||t.callback||t.onComplete,i=t,e=t.url,t=t.name||t.key||t.url),"string"!=typeof e&&(r=i,i=e,e=t),"string"!=typeof e)throw new Error("No url passed to add resource to loader.");if("function"==typeof i&&(r=i,i=null),this.loading&&(!i||!i.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 Xo(t,e,i),"function"==typeof r&&this.resources[t].onAfterMiddleware.once(r),this.loading){for(var o=i.parentResource,s=[],a=0;a<o.children.length;++a)o.children[a].isComplete||s.push(o.children[a]);var h=o.progressChunk*(s.length+1)/(s.length+2);o.children.push(this.resources[t]),o.progressChunk=h;for(var u=0;u<s.length;++u)s[u].progressChunk=h;this.resources[t].progressChunk=h}return this._queue.push(this.resources[t]),this},e.pre=function(t){return this._beforeMiddleware.push(t),this},e.use=function(t){return this._afterMiddleware.push(t),this},e.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},e.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,i=0;i<this._queue._tasks.length;++i)this._queue._tasks[i].data.progressChunk=e;this._onStart(),this._queue.resume()}return this},e._prepareUrl=function(t){var e,i=Ao(t,{strictMode:!0});if(e=i.protocol||!i.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 r=Yo.exec(e)[0];-1!==(e=e.substr(0,e.length-r.length)).indexOf("?")?e+="&"+this.defaultQueryString:e+="?"+this.defaultQueryString,e+=r}return e},e._loadResource=function(t,e){var i=this;t._dequeue=e,Mo(this._beforeMiddleware,function(e,r){e.call(i,t,function(){r(t.isComplete?{}:null)})},function(){t.isComplete?i._onLoad(t):(t._onLoadBinding=t.onComplete.once(i._onLoad,i),t.load())},!0)},e._onStart=function(){this.progress=0,this.loading=!0,this.onStart.dispatch(this)},e._onComplete=function(){this.progress=100,this.loading=!1,this.onComplete.dispatch(this,this.resources)},e._onLoad=function(t){var e=this;t._onLoadBinding=null,this._resourcesParsing.push(t),t._dequeue(),Mo(this._afterMiddleware,function(i,r){i.call(e,t,r)},function(){t.onAfterMiddleware.dispatch(t),e.progress=Math.min(100,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)},No(t,[{key:"concurrency",get:function(){return this._queue.concurrency},set:function(t){this._queue.concurrency=t}}]),t}();Wo._defaultBeforeMiddleware=[],Wo._defaultAfterMiddleware=[],Wo.pre=function(t){return Wo._defaultBeforeMiddleware.push(t),Wo},Wo.use=function(t){return Wo._defaultAfterMiddleware.push(t),Wo};var qo=function(){};qo.use=function(t,e){t.data&&t.type===Xo.TYPE.IMAGE&&(t.texture=bi.fromLoader(t.data,t.url,t.name)),e()};var Zo=function(t){function e(i,r){var n=this;t.call(this,i,r),m.call(this);for(var o=0;o<e._plugins.length;++o){var s=e._plugins[o],a=s.pre,h=s.use;a&&this.pre(a),h&&this.use(h)}this.onStart.add(function(t){return n.emit("start",t)}),this.onProgress.add(function(t,e){return n.emit("progress",t,e)}),this.onError.add(function(t,e,i){return n.emit("error",t,e,i)}),this.onLoad.add(function(t,e){return n.emit("load",t,e)}),this.onComplete.add(function(t,e){return n.emit("complete",t,e)}),this._protected=!1}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={shared:{configurable:!0}};return e.prototype.destroy=function(){this._protected||(this.removeAllListeners(),this.reset())},i.shared.get=function(){var t=e._shared;return t||((t=new e)._protected=!0,e._shared=t),t},Object.defineProperties(e,i),e}(Wo);Object.assign(Zo.prototype,m.prototype),Zo._plugins=[],Zo.registerPlugin=function(t){return Zo._plugins.push(t),t.add&&t.add(),Zo},Zo.registerPlugin({use:Vo.parsing}),Zo.registerPlugin(qo);var Ko=function(){};Ko.init=function(t){t=Object.assign({sharedLoader:!1},t),this.loader=t.sharedLoader?Zo.shared:new Zo},Ko.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)};var Jo=Xo,Qo=function(t){function e(e,i,r,n){void 0===e&&(e=1500),void 0===r&&(r=16384),void 0===n&&(n=!1),t.call(this);r>16384&&(r=16384),this._properties=[!1,!0,!1,!1,!1],this._maxSize=e,this._batchSize=r,this._buffers=null,this._bufferUpdateIDs=[],this._updateID=0,this.interactiveChildren=!1,this.blendMode=bt.NORMAL,this.autoResize=n,this.roundPixels=!0,this.baseTexture=null,this.setProperties(i),this._tint=0,this.tintRgb=new Float32Array(4),this.tint=16777215}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={tint:{configurable:!0}};return 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()},i.tint.get=function(){return this._tint},i.tint.set=function(t){this._tint=t,Nt(t,this.tintRgb)},e.prototype.render=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.valid||this.baseTexture.once("update",function(){return e.onChildrenChange(0)})),t.batch.setObjectRenderer(t.plugins.particle),t.plugins.particle.render(this))},e.prototype.onChildrenChange=function(t){for(var e=Math.floor(t/this._batchSize);this._bufferUpdateIDs.length<e;)this._bufferUpdateIDs.push(0);this._bufferUpdateIDs[e]=++this._updateID},e.prototype.dispose=function(){if(this._buffers){for(var t=0;t<this._buffers.length;++t)this._buffers[t].destroy();this._buffers=null}},e.prototype.destroy=function(e){t.prototype.destroy.call(this,e),this.dispose(),this._properties=null,this._buffers=null,this._bufferUpdateIDs=null},Object.defineProperties(e.prototype,i),e}(Xe),$o=function(t,e,i){this.geometry=new Ri,this.indexBuffer=null,this.size=i,this.dynamicProperties=[],this.staticProperties=[];for(var r=0;r<t.length;++r){var n=t[r];n={attributeName:n.attributeName,size:n.size,uploadFunction:n.uploadFunction,type:n.type||St.FLOAT,offset:n.offset},e[r]?this.dynamicProperties.push(n):this.staticProperties.push(n)}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._updateID=0,this.initBuffers()};$o.prototype.initBuffers=function(){var t=this.geometry,e=0;this.indexBuffer=new Pi(zt(this.size),!0,!0),t.addIndex(this.indexBuffer),this.dynamicStride=0;for(var i=0;i<this.dynamicProperties.length;++i){var r=this.dynamicProperties[i];r.offset=e,e+=r.size,this.dynamicStride+=r.size}var n=new ArrayBuffer(this.size*this.dynamicStride*4*4);this.dynamicData=new Float32Array(n),this.dynamicDataUint32=new Uint32Array(n),this.dynamicBuffer=new Pi(this.dynamicData,!1,!1);var o=0;this.staticStride=0;for(var s=0;s<this.staticProperties.length;++s){var a=this.staticProperties[s];a.offset=o,o+=a.size,this.staticStride+=a.size}var h=new ArrayBuffer(this.size*this.staticStride*4*4);this.staticData=new Float32Array(h),this.staticDataUint32=new Uint32Array(h),this.staticBuffer=new Pi(this.staticData,!0,!1);for(var u=0;u<this.dynamicProperties.length;++u){var l=this.dynamicProperties[u];t.addAttribute(l.attributeName,this.dynamicBuffer,0,l.type===St.UNSIGNED_BYTE,l.type,4*this.dynamicStride,4*l.offset)}for(var c=0;c<this.staticProperties.length;++c){var d=this.staticProperties[c];t.addAttribute(d.attributeName,this.staticBuffer,0,d.type===St.UNSIGNED_BYTE,d.type,4*this.staticStride,4*d.offset)}},$o.prototype.uploadDynamic=function(t,e,i){for(var r=0;r<this.dynamicProperties.length;r++){var n=this.dynamicProperties[r];n.uploadFunction(t,e,i,n.type===St.UNSIGNED_BYTE?this.dynamicDataUint32:this.dynamicData,this.dynamicStride,n.offset)}this.dynamicBuffer._updateID++},$o.prototype.uploadStatic=function(t,e,i){for(var r=0;r<this.staticProperties.length;r++){var n=this.staticProperties[r];n.uploadFunction(t,e,i,n.type===St.UNSIGNED_BYTE?this.staticDataUint32:this.staticData,this.staticStride,n.offset)}this.staticBuffer._updateID++},$o.prototype.destroy=function(){this.indexBuffer=null,this.dynamicProperties=null,this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this.staticProperties=null,this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null,this.geometry.destroy()};var ts="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec4 aColor;\n\nattribute vec2 aPositionCoord;\nattribute float aRotation;\n\nuniform mat3 translationMatrix;\nuniform vec4 uColor;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nvoid main(void){\n    float x = (aVertexPosition.x) * cos(aRotation) - (aVertexPosition.y) * sin(aRotation);\n    float y = (aVertexPosition.x) * sin(aRotation) + (aVertexPosition.y) * cos(aRotation);\n\n    vec2 v = vec2(x, y);\n    v = v + aPositionCoord;\n\n    gl_Position = vec4((translationMatrix * vec3(v, 1.0)).xy, 0.0, 1.0);\n\n    vTextureCoord = aTextureCoord;\n    vColor = aColor * uColor;\n}\n",es="varying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform sampler2D uSampler;\n\nvoid main(void){\n    vec4 color = texture2D(uSampler, vTextureCoord) * vColor;\n    gl_FragColor = color;\n}",is=function(t){function e(e){t.call(this,e),this.shader=null,this.properties=null,this.tempMatrix=new ye,this.properties=[{attributeName:"aVertexPosition",size:2,uploadFunction:this.uploadVertices,offset:0},{attributeName:"aPositionCoord",size:2,uploadFunction:this.uploadPosition,offset:0},{attributeName:"aRotation",size:1,uploadFunction:this.uploadRotation,offset:0},{attributeName:"aTextureCoord",size:2,uploadFunction:this.uploadUvs,offset:0},{attributeName:"aColor",size:1,type:St.UNSIGNED_BYTE,uploadFunction:this.uploadTint,offset:0}],this.shader=yr.from(ts,es,{})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(t){var e=t.children,i=t._maxSize,r=t._batchSize,n=this.renderer,o=e.length;if(0!==o){o>i&&!t.autoResize&&(o=i);var s=t._buffers;s||(s=t._buffers=this.generateBuffers(t));var a=e[0]._texture.baseTexture;this.renderer.state.setBlendMode(Xt(t.blendMode,a.premultiplyAlpha));var h=n.gl,u=t.worldTransform.copyTo(this.tempMatrix);u.prepend(n.globalUniforms.uniforms.projectionMatrix),this.shader.uniforms.translationMatrix=u.toArray(!0),this.shader.uniforms.uColor=jt(t.tintRgb,t.worldAlpha,this.shader.uniforms.uColor,a.premultiplyAlpha),this.shader.uniforms.uSampler=a,this.renderer.shader.bind(this.shader);for(var l=!1,c=0,d=0;c<o;c+=r,d+=1){var p=o-c;p>r&&(p=r),d>=s.length&&s.push(this._generateOneMoreBuffer(t));var f=s[d];f.uploadDynamic(e,c,p);var v=t._bufferUpdateIDs[d]||0;(l=l||f._updateID<v)&&(f._updateID=t._updateID,f.uploadStatic(e,c,p)),n.geometry.bind(f.geometry),h.drawElements(h.TRIANGLES,6*p,h.UNSIGNED_SHORT,0)}}},e.prototype.generateBuffers=function(t){for(var e=[],i=t._maxSize,r=t._batchSize,n=t._properties,o=0;o<i;o+=r)e.push(new $o(this.properties,n,r));return e},e.prototype._generateOneMoreBuffer=function(t){var e=t._batchSize,i=t._properties;return new $o(this.properties,i,e)},e.prototype.uploadVertices=function(t,e,i,r,n,o){for(var s=0,a=0,h=0,u=0,l=0;l<i;++l){var c=t[e+l],d=c._texture,p=c.scale.x,f=c.scale.y,v=d.trim,g=d.orig;v?(s=(a=v.x-c.anchor.x*g.width)+v.width,h=(u=v.y-c.anchor.y*g.height)+v.height):(s=g.width*(1-c.anchor.x),a=g.width*-c.anchor.x,h=g.height*(1-c.anchor.y),u=g.height*-c.anchor.y),r[o]=a*p,r[o+1]=u*f,r[o+n]=s*p,r[o+n+1]=u*f,r[o+2*n]=s*p,r[o+2*n+1]=h*f,r[o+3*n]=a*p,r[o+3*n+1]=h*f,o+=4*n}},e.prototype.uploadPosition=function(t,e,i,r,n,o){for(var s=0;s<i;s++){var a=t[e+s].position;r[o]=a.x,r[o+1]=a.y,r[o+n]=a.x,r[o+n+1]=a.y,r[o+2*n]=a.x,r[o+2*n+1]=a.y,r[o+3*n]=a.x,r[o+3*n+1]=a.y,o+=4*n}},e.prototype.uploadRotation=function(t,e,i,r,n,o){for(var s=0;s<i;s++){var a=t[e+s].rotation;r[o]=a,r[o+n]=a,r[o+2*n]=a,r[o+3*n]=a,o+=4*n}},e.prototype.uploadUvs=function(t,e,i,r,n,o){for(var s=0;s<i;++s){var a=t[e+s]._texture._uvs;a?(r[o]=a.x0,r[o+1]=a.y0,r[o+n]=a.x1,r[o+n+1]=a.y1,r[o+2*n]=a.x2,r[o+2*n+1]=a.y2,r[o+3*n]=a.x3,r[o+3*n+1]=a.y3,o+=4*n):(r[o]=0,r[o+1]=0,r[o+n]=0,r[o+n+1]=0,r[o+2*n]=0,r[o+2*n+1]=0,r[o+3*n]=0,r[o+3*n+1]=0,o+=4*n)}},e.prototype.uploadTint=function(t,e,i,r,n,o){for(var s=0;s<i;++s){var a=t[e+s],h=a._texture.baseTexture.premultiplyAlpha,u=a.alpha,l=u<1&&h?Gt(a._tintRGB,u):a._tintRGB+(255*u<<24);r[o]=l,r[o+n]=l,r[o+2*n]=l,r[o+3*n]=l,o+=4*n}},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.shader&&(this.shader.destroy(),this.shader=null),this.tempMatrix=null},e}(Xi),rs=function(t,e,i){void 0===i&&(i=null),this.baseTexture=t,this.textures={},this.animations={},this.data=e,this.resolution=this._updateResolution(i||(this.baseTexture.resource?this.baseTexture.resource.url:null)),this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null},ns={BATCH_SIZE:{configurable:!0}};ns.BATCH_SIZE.get=function(){return 1e3},rs.prototype._updateResolution=function(t){var e=this.data.meta.scale,i=ae(t,null);return null===i&&(i=void 0!==e?parseFloat(e):1),1!==i&&this.baseTexture.setResolution(i),i},rs.prototype.parse=function(t){this._batchIndex=0,this._callback=t,this._frameKeys.length<=rs.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()},rs.prototype._processFrames=function(t){for(var e=t,i=rs.BATCH_SIZE;e-t<i&&e<this._frameKeys.length;){var r=this._frameKeys[e],n=this._frames[r],o=n.frame;if(o){var s=null,a=null,h=!1!==n.trimmed&&n.sourceSize?n.sourceSize:n.frame,u=new Ce(0,0,Math.floor(h.w)/this.resolution,Math.floor(h.h)/this.resolution);s=n.rotated?new Ce(Math.floor(o.x)/this.resolution,Math.floor(o.y)/this.resolution,Math.floor(o.h)/this.resolution,Math.floor(o.w)/this.resolution):new Ce(Math.floor(o.x)/this.resolution,Math.floor(o.y)/this.resolution,Math.floor(o.w)/this.resolution,Math.floor(o.h)/this.resolution),!1!==n.trimmed&&n.spriteSourceSize&&(a=new Ce(Math.floor(n.spriteSourceSize.x)/this.resolution,Math.floor(n.spriteSourceSize.y)/this.resolution,Math.floor(o.w)/this.resolution,Math.floor(o.h)/this.resolution)),this.textures[r]=new bi(this.baseTexture,s,u,a,n.rotated?2:0,n.anchor),bi.addToCache(this.textures[r],r)}e++}},rs.prototype._processAnimations=function(){var t=this.data.animations||{};for(var e in t){this.animations[e]=[];for(var i=0;i<t[e].length;i++){var r=t[e][i];this.animations[e].push(this.textures[r])}}},rs.prototype._parseComplete=function(){var t=this._callback;this._callback=null,this._batchIndex=0,t.call(this,this.textures)},rs.prototype._nextBatch=function(){var t=this;this._processFrames(this._batchIndex*rs.BATCH_SIZE),this._batchIndex++,setTimeout(function(){t._batchIndex*rs.BATCH_SIZE<t._frameKeys.length?t._nextBatch():(t._processAnimations(),t._parseComplete())},0)},rs.prototype.destroy=function(t){for(var e in void 0===t&&(t=!1),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},Object.defineProperties(rs,ns);var os=function(){};os.use=function(t,e){var i=t.name+"_image";if(t.data&&t.type===Jo.TYPE.JSON&&t.data.frames&&!this.resources[i]){var r={crossOrigin:t.crossOrigin,metadata:t.metadata.imageMetadata,parentResource:t},n=os.getResourcePath(t,this.baseUrl);this.add(i,n,r,function(i){if(i.error)e(i.error);else{var r=new rs(i.texture.baseTexture,t.data,t.url);r.parse(function(){t.spritesheet=r,t.textures=r.textures,e()})}})}else e()},os.getResourcePath=function(t,e){return t.isDataUrl?t.data.meta.image:yt.resolve(t.url.replace(e,""),t.data.meta.image)};var ss=new ce,as=function(t){function e(e,i,r){void 0===i&&(i=100),void 0===r&&(r=100),t.call(this,e),this.tileTransform=new Ae,this._width=i,this._height=r,this._canvasPattern=null,this.uvMatrix=e.uvMatrix||new Ir(e),this.pluginName="tilingSprite",this.uvRespectAnchor=!1}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={clampMargin:{configurable:!0},tileScale:{configurable:!0},tilePosition:{configurable:!0},width:{configurable:!0},height:{configurable:!0}};return i.clampMargin.get=function(){return this.uvMatrix.clampMargin},i.clampMargin.set=function(t){this.uvMatrix.clampMargin=t,this.uvMatrix.update(!0)},i.tileScale.get=function(){return this.tileTransform.scale},i.tileScale.set=function(t){this.tileTransform.scale.copyFrom(t)},i.tilePosition.get=function(){return this.tileTransform.position},i.tilePosition.set=function(t){this.tileTransform.position.copyFrom(t)},e.prototype._onTextureUpdate=function(){this.uvMatrix&&(this.uvMatrix.texture=this._texture),this._cachedTint=16777215},e.prototype._render=function(t){var e=this._texture;e&&e.valid&&(this.tileTransform.updateLocalTransform(),this.uvMatrix.update(),t.batch.setObjectRenderer(t.plugins[this.pluginName]),t.plugins[this.pluginName].render(this))},e.prototype._calculateBounds=function(){var t=this._width*-this._anchor._x,e=this._height*-this._anchor._y,i=this._width*(1-this._anchor._x),r=this._height*(1-this._anchor._y);this._bounds.addFrame(this.transform,t,e,i,r)},e.prototype.getLocalBounds=function(e){return 0===this.children.length?(this._bounds.minX=this._width*-this._anchor._x,this._bounds.minY=this._height*-this._anchor._y,this._bounds.maxX=this._width*(1-this._anchor._x),this._bounds.maxY=this._height*(1-this._anchor._y),e||(this._localBoundsRect||(this._localBoundsRect=new Ce),e=this._localBoundsRect),this._bounds.getRectangle(e)):t.prototype.getLocalBounds.call(this,e)},e.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,ss);var e=this._width,i=this._height,r=-e*this.anchor._x;if(ss.x>=r&&ss.x<r+e){var n=-i*this.anchor._y;if(ss.y>=n&&ss.y<n+i)return!0}return!1},e.prototype.destroy=function(e){t.prototype.destroy.call(this,e),this.tileTransform=null,this.uvMatrix=null},e.from=function(t,i,r){return new e(bi.from(t),i,r)},e.fromFrame=function(t,i,r){var n=$t[t];if(!n)throw new Error('The frameId "'+t+'" does not exist in the texture cache '+this);return new e(n,i,r)},e.fromImage=function(t,i,r,n){return n&&"object"!=typeof n&&(n={scaleMode:arguments[4],resourceOptions:{crossorigin:arguments[3]}}),new e(bi.from(t,n),i,r)},i.width.get=function(){return this._width},i.width.set=function(t){this._width=t},i.height.get=function(){return this._height},i.height.set=function(t){this._height=t},Object.defineProperties(e.prototype,i),e}(Kn),hs="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTransform;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n    gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n    vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;\n}\n",us="varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 uColor;\nuniform mat3 uMapCoord;\nuniform vec4 uClampFrame;\nuniform vec2 uClampOffset;\n\nvoid main(void)\n{\n    vec2 coord = mod(vTextureCoord - uClampOffset, vec2(1.0, 1.0)) + uClampOffset;\n    coord = (uMapCoord * vec3(coord, 1.0)).xy;\n    coord = clamp(coord, uClampFrame.xy, uClampFrame.zw);\n\n    vec4 sample = texture2D(uSampler, coord);\n    gl_FragColor = sample * uColor;\n}\n",ls="varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 uColor;\n\nvoid main(void)\n{\n    vec4 sample = texture2D(uSampler, vTextureCoord);\n    gl_FragColor = sample * uColor;\n}\n",cs=new ye,ds=function(t){function e(e){t.call(this,e);var i={globals:this.renderer.globalUniforms};this.shader=yr.from(hs,us,i),this.simpleShader=yr.from(hs,ls,i),this.quad=new Li}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(t){var e=this.renderer,i=this.quad,r=i.vertices;r[0]=r[6]=t._width*-t.anchor.x,r[1]=r[3]=t._height*-t.anchor.y,r[2]=r[4]=t._width*(1-t.anchor.x),r[5]=r[7]=t._height*(1-t.anchor.y),t.uvRespectAnchor&&((r=i.uvs)[0]=r[6]=-t.anchor.x,r[1]=r[3]=-t.anchor.y,r[2]=r[4]=1-t.anchor.x,r[5]=r[7]=1-t.anchor.y),i.invalidate();var n=t._texture,o=n.baseTexture,s=t.tileTransform.localTransform,a=t.uvMatrix,h=o.isPowerOfTwo&&n.frame.width===o.width&&n.frame.height===o.height;h&&(o._glTextures[e.CONTEXT_UID]?h=o.wrapMode!==Pt.CLAMP:o.wrapMode===Pt.CLAMP&&(o.wrapMode=Pt.REPEAT));var u=h?this.simpleShader:this.shader,l=n.width,c=n.height,d=t._width,p=t._height;cs.set(s.a*l/d,s.b*l/p,s.c*c/d,s.d*c/p,s.tx/d,s.ty/p),cs.invert(),h?cs.prepend(a.mapCoord):(u.uniforms.uMapCoord=a.mapCoord.toArray(!0),u.uniforms.uClampFrame=a.uClampFrame,u.uniforms.uClampOffset=a.uClampOffset),u.uniforms.uTransform=cs.toArray(!0),u.uniforms.uColor=Ht(t.tint,t.worldAlpha,u.uniforms.uColor,o.premultiplyAlpha),u.uniforms.translationMatrix=t.transform.worldTransform.toArray(!0),u.uniforms.uSampler=n,e.shader.bind(u),e.geometry.bind(i),e.state.setBlendMode(Xt(t.blendMode,o.premultiplyAlpha)),e.geometry.draw(this.renderer.gl.TRIANGLES,6,0)},e}(Xi),ps=function(t){function e(e,i){var r=this;void 0===i&&(i={}),t.call(this),this._textWidth=0,this._textHeight=0,this._glyphs=[],this._font={tint:void 0!==i.tint?i.tint:16777215,align:i.align||"left",name:null,size:0},this.font=i.font,this._text=e,this._maxWidth=0,this._maxLineHeight=0,this._letterSpacing=0,this._anchor=new de(function(){r.dirty=!0},this,0,0),this.dirty=!1,this.roundPixels=g.ROUND_PIXELS,this.updateText()}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={tint:{configurable:!0},align:{configurable:!0},anchor:{configurable:!0},font:{configurable:!0},text:{configurable:!0},maxWidth:{configurable:!0},maxLineHeight:{configurable:!0},textWidth:{configurable:!0},letterSpacing:{configurable:!0},textHeight:{configurable:!0}};return e.prototype.updateText=function(){for(var t=e.fonts[this._font.name],i=this._font.size/t.size,r=new ce,n=[],o=[],s=this._text.replace(/(?:\r\n|\r)/g,"\n")||" ",a=s.length,h=this._maxWidth*t.size/this._font.size,u=null,l=0,c=0,d=0,p=-1,f=0,v=0,g=0,m=0;m<a;m++){var y=s.charCodeAt(m),_=s.charAt(m);if(/(?:\s)/.test(_)&&(p=m,f=l),"\r"!==_&&"\n"!==_){var x=t.chars[y];x&&(u&&x.kerning[u]&&(r.x+=x.kerning[u]),n.push({texture:x.texture,line:d,charCode:y,position:new ce(r.x+x.xOffset+this._letterSpacing/2,r.y+x.yOffset)}),r.x+=x.xAdvance+this._letterSpacing,l=r.x,g=Math.max(g,x.yOffset+x.texture.height),u=y,-1!==p&&h>0&&r.x>h&&(Vt(n,1+p-++v,1+m-p),m=p,p=-1,o.push(f),c=Math.max(c,f),d++,r.x=0,r.y+=t.lineHeight,u=null))}else o.push(l),c=Math.max(c,l),++d,++v,r.x=0,r.y+=t.lineHeight,u=null}var b=s.charAt(s.length-1);"\r"!==b&&"\n"!==b&&(/(?:\s)/.test(b)&&(l=f),o.push(l),c=Math.max(c,l));for(var T=[],w=0;w<=d;w++){var E=0;"right"===this._font.align?E=c-o[w]:"center"===this._font.align&&(E=(c-o[w])/2),T.push(E)}for(var S=n.length,I=this.tint,P=0;P<S;P++){var A=this._glyphs[P];A?A.texture=n[P].texture:((A=new Kn(n[P].texture)).roundPixels=this.roundPixels,this._glyphs.push(A)),A.position.x=(n[P].position.x+T[n[P].line])*i,A.position.y=n[P].position.y*i,A.scale.x=A.scale.y=i,A.tint=I,A.parent||this.addChild(A)}for(var O=S;O<this._glyphs.length;++O)this.removeChild(this._glyphs[O]);if(this._textWidth=c*i,this._textHeight=(r.y+t.lineHeight)*i,0!==this.anchor.x||0!==this.anchor.y)for(var C=0;C<S;C++)this._glyphs[C].x-=this._textWidth*this.anchor.x,this._glyphs[C].y-=this._textHeight*this.anchor.y;this._maxLineHeight=g*i},e.prototype.updateTransform=function(){this.validate(),this.containerUpdateTransform()},e.prototype.getLocalBounds=function(){return this.validate(),t.prototype.getLocalBounds.call(this)},e.prototype.validate=function(){this.dirty&&(this.updateText(),this.dirty=!1)},i.tint.get=function(){return this._font.tint},i.tint.set=function(t){this._font.tint="number"==typeof t&&t>=0?t:16777215,this.dirty=!0},i.align.get=function(){return this._font.align},i.align.set=function(t){this._font.align=t||"left",this.dirty=!0},i.anchor.get=function(){return this._anchor},i.anchor.set=function(t){"number"==typeof t?this._anchor.set(t):this._anchor.copyFrom(t)},i.font.get=function(){return this._font},i.font.set=function(t){t&&("string"==typeof t?(t=t.split(" "),this._font.name=1===t.length?t[0]:t.slice(1).join(" "),this._font.size=t.length>=2?parseInt(t[0],10):e.fonts[this._font.name].size):(this._font.name=t.name,this._font.size="number"==typeof t.size?t.size:parseInt(t.size,10)),this.dirty=!0)},i.text.get=function(){return this._text},i.text.set=function(t){t=String(null==t?"":t),this._text!==t&&(this._text=t,this.dirty=!0)},i.maxWidth.get=function(){return this._maxWidth},i.maxWidth.set=function(t){this._maxWidth!==t&&(this._maxWidth=t,this.dirty=!0)},i.maxLineHeight.get=function(){return this.validate(),this._maxLineHeight},i.textWidth.get=function(){return this.validate(),this._textWidth},i.letterSpacing.get=function(){return this._letterSpacing},i.letterSpacing.set=function(t){this._letterSpacing!==t&&(this._letterSpacing=t,this.dirty=!0)},i.textHeight.get=function(){return this.validate(),this._textHeight},e.registerFont=function(t,i){var r={},n=t.getElementsByTagName("info")[0],o=t.getElementsByTagName("common")[0],s=t.getElementsByTagName("page"),a=ae(s[0].getAttribute("file"),g.RESOLUTION),h={};r.font=n.getAttribute("face"),r.size=parseInt(n.getAttribute("size"),10),r.lineHeight=parseInt(o.getAttribute("lineHeight"),10)/a,r.chars={},i instanceof bi&&(i=[i]);for(var u=0;u<s.length;u++){var l=s[u].getAttribute("id"),c=s[u].getAttribute("file");h[l]=i instanceof Array?i[u]:i[c]}for(var d=t.getElementsByTagName("char"),p=0;p<d.length;p++){var f=d[p],v=parseInt(f.getAttribute("id"),10),m=f.getAttribute("page")||0,y=new Ce(parseInt(f.getAttribute("x"),10)/a+h[m].frame.x/a,parseInt(f.getAttribute("y"),10)/a+h[m].frame.y/a,parseInt(f.getAttribute("width"),10)/a,parseInt(f.getAttribute("height"),10)/a);r.chars[v]={xOffset:parseInt(f.getAttribute("xoffset"),10)/a,yOffset:parseInt(f.getAttribute("yoffset"),10)/a,xAdvance:parseInt(f.getAttribute("xadvance"),10)/a,kerning:{},texture:new bi(h[m].baseTexture,y),page:m}}for(var _=t.getElementsByTagName("kerning"),x=0;x<_.length;x++){var b=_[x],T=parseInt(b.getAttribute("first"),10)/a,w=parseInt(b.getAttribute("second"),10)/a,E=parseInt(b.getAttribute("amount"),10)/a;r.chars[w]&&(r.chars[w].kerning[T]=E)}return e.fonts[r.font]=r,r},Object.defineProperties(e.prototype,i),e}(Xe);ps.fonts={};var fs=function(){};fs.parse=function(t,e){t.bitmapFont=ps.registerFont(t.data,e)},fs.add=function(){Jo.setExtensionXhrType("fnt",Jo.XHR_RESPONSE_TYPE.DOCUMENT)},fs.dirname=function(t){var e=t.replace(/\/$/,"").replace(/\/[^\/]*$/,"");return e===t?".":""===e?"/":e},fs.use=function(t,e){if(t.data&&t.type===Jo.TYPE.XML)if(0!==t.data.getElementsByTagName("page").length&&0!==t.data.getElementsByTagName("info").length&&null!==t.data.getElementsByTagName("info")[0].getAttribute("face")){var i=t.isDataUrl?"":fs.dirname(t.url);t.isDataUrl&&("."===i&&(i=""),this.baseUrl&&i&&"/"===this.baseUrl.charAt(this.baseUrl.length-1)&&(i+="/")),(i=i.replace(this.baseUrl,""))&&"/"!==i.charAt(i.length-1)&&(i+="/");for(var r=t.data.getElementsByTagName("page"),n={},o=function(i){n[i.metadata.pageFile]=i.texture,Object.keys(n).length===r.length&&(fs.parse(t,n),e())},s=0;s<r.length;++s){var a=r[s].getAttribute("file"),h=i+a,u=!1;for(var l in this.resources){var c=this.resources[l];if(c.url===h){c.metadata.pageFile=a,c.texture?o(c):c.onAfterMiddleware.add(o),u=!0;break}}if(!u){var d={crossOrigin:t.crossOrigin,loadType:Jo.LOAD_TYPE.IMAGE,metadata:Object.assign({pageFile:a},t.metadata.imageMetadata),parentResource:t};this.add(h,d,o)}}}else e();else e()};var vs="varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float uAlpha;\n\nvoid main(void)\n{\n   gl_FragColor = texture2D(uSampler, vTextureCoord) * uAlpha;\n}\n",gs=function(t){function e(e){void 0===e&&(e=1),t.call(this,Jr,vs,{uAlpha:1}),this.alpha=e}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={alpha:{configurable:!0}};return i.alpha.get=function(){return this.uniforms.uAlpha},i.alpha.set=function(t){this.uniforms.uAlpha=t},Object.defineProperties(e.prototype,i),e}(Tr),ms="\n    attribute vec2 aVertexPosition;\n\n    uniform mat3 projectionMatrix;\n\n    uniform float strength;\n\n    varying vec2 vBlurTexCoords[%size%];\n\n    uniform vec4 inputSize;\n    uniform vec4 outputFrame;\n    \n    vec4 filterVertexPosition( void )\n    {\n        vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n    \n        return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n    }\n    \n    vec2 filterTextureCoord( void )\n    {\n        return aVertexPosition * (outputFrame.zw * inputSize.zw);\n    }\n\n    void main(void)\n    {\n        gl_Position = filterVertexPosition();\n\n        vec2 textureCoord = filterTextureCoord();\n        %blur%\n    }";var ys={5:[.153388,.221461,.250301],7:[.071303,.131514,.189879,.214607],9:[.028532,.067234,.124009,.179044,.20236],11:[.0093,.028002,.065984,.121703,.175713,.198596],13:[.002406,.009255,.027867,.065666,.121117,.174868,.197641],15:[489e-6,.002403,.009246,.02784,.065602,.120999,.174697,.197448]},_s=["varying vec2 vBlurTexCoords[%size%];","uniform sampler2D uSampler;","void main(void)","{","    gl_FragColor = vec4(0.0);","    %blur%","}"].join("\n");var xs=function(t){function e(e,i,r,n,o){var s=function(t,e){var i,r=Math.ceil(t/2),n=ms,o="";i=e?"vBlurTexCoords[%index%] =  textureCoord + vec2(%sampleIndex% * strength, 0.0);":"vBlurTexCoords[%index%] =  textureCoord + vec2(0.0, %sampleIndex% * strength);";for(var s=0;s<t;s++){var a=i.replace("%index%",s);o+=a=a.replace("%sampleIndex%",s-(r-1)+".0"),o+="\n"}return n=(n=n.replace("%blur%",o)).replace("%size%",t)}(o=o||5,e),a=function(t){for(var e,i=ys[t],r=i.length,n=_s,o="",s=0;s<t;s++){var a="gl_FragColor += texture2D(uSampler, vBlurTexCoords[%index%]) * %value%;".replace("%index%",s);e=s,s>=r&&(e=t-s-1),o+=a=a.replace("%value%",i[e]),o+="\n"}return n=(n=n.replace("%blur%",o)).replace("%size%",t)}(o);t.call(this,s,a),this.horizontal=e,this.resolution=n||g.RESOLUTION,this._quality=0,this.quality=r||4,this.blur=i||8}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={blur:{configurable:!0},quality:{configurable:!0}};return e.prototype.apply=function(t,e,i,r){if(i?this.horizontal?this.uniforms.strength=1/i.width*(i.width/e.width):this.uniforms.strength=1/i.height*(i.height/e.height):this.horizontal?this.uniforms.strength=1/t.renderer.width*(t.renderer.width/e.width):this.uniforms.strength=1/t.renderer.height*(t.renderer.height/e.height),this.uniforms.strength*=this.strength,this.uniforms.strength/=this.passes,1===this.passes)t.applyFilter(this,e,i,r);else{var n=t.getFilterTexture(),o=t.renderer,s=e,a=n;this.state.blend=!1,t.applyFilter(this,s,a,!1);for(var h=1;h<this.passes-1;h++){o.renderTexture.bind(s,s.filterFrame),this.uniforms.uSampler=a;var u=a;a=s,s=u,o.shader.bind(this),o.geometry.draw(5)}this.state.blend=!0,t.applyFilter(this,a,i,r),t.returnFilterTexture(n)}},i.blur.get=function(){return this.strength},i.blur.set=function(t){this.padding=1+2*Math.abs(t),this.strength=t},i.quality.get=function(){return this._quality},i.quality.set=function(t){this._quality=t,this.passes=t},Object.defineProperties(e.prototype,i),e}(Tr),bs=function(t){function e(e,i,r,n){t.call(this),this.blurXFilter=new xs(!0,e,i,r,n),this.blurYFilter=new xs(!1,e,i,r,n),this.resolution=r||g.RESOLUTION,this.quality=i||4,this.blur=e||8,this.repeatEdgePixels=!1}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={blur:{configurable:!0},quality:{configurable:!0},blurX:{configurable:!0},blurY:{configurable:!0},blendMode:{configurable:!0},repeatEdgePixels:{configurable:!0}};return e.prototype.apply=function(t,e,i,r){var n=Math.abs(this.blurXFilter.strength),o=Math.abs(this.blurYFilter.strength);if(n&&o){var s=t.getFilterTexture();this.blurXFilter.apply(t,e,s,!0),this.blurYFilter.apply(t,s,i,r),t.returnFilterTexture(s)}else o?this.blurYFilter.apply(t,e,i,r):this.blurXFilter.apply(t,e,i,r)},e.prototype.updatePadding=function(){this._repeatEdgePixels?this.padding=0:this.padding=2*Math.max(Math.abs(this.blurXFilter.strength),Math.abs(this.blurYFilter.strength))},i.blur.get=function(){return this.blurXFilter.blur},i.blur.set=function(t){this.blurXFilter.blur=this.blurYFilter.blur=t,this.updatePadding()},i.quality.get=function(){return this.blurXFilter.quality},i.quality.set=function(t){this.blurXFilter.quality=this.blurYFilter.quality=t},i.blurX.get=function(){return this.blurXFilter.blur},i.blurX.set=function(t){this.blurXFilter.blur=t,this.updatePadding()},i.blurY.get=function(){return this.blurYFilter.blur},i.blurY.set=function(t){this.blurYFilter.blur=t,this.updatePadding()},i.blendMode.get=function(){return this.blurYFilter.blendMode},i.blendMode.set=function(t){this.blurYFilter.blendMode=t},i.repeatEdgePixels.get=function(){return this._repeatEdgePixels},i.repeatEdgePixels.set=function(t){this._repeatEdgePixels=t,this.updatePadding()},Object.defineProperties(e.prototype,i),e}(Tr),Ts="varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform float m[20];\nuniform float uAlpha;\n\nvoid main(void)\n{\n    vec4 c = texture2D(uSampler, vTextureCoord);\n\n    if (uAlpha == 0.0) {\n        gl_FragColor = c;\n        return;\n    }\n\n    // Un-premultiply alpha before applying the color matrix. See issue #3539.\n    if (c.a > 0.0) {\n      c.rgb /= c.a;\n    }\n\n    vec4 result;\n\n    result.r = (m[0] * c.r);\n        result.r += (m[1] * c.g);\n        result.r += (m[2] * c.b);\n        result.r += (m[3] * c.a);\n        result.r += m[4];\n\n    result.g = (m[5] * c.r);\n        result.g += (m[6] * c.g);\n        result.g += (m[7] * c.b);\n        result.g += (m[8] * c.a);\n        result.g += m[9];\n\n    result.b = (m[10] * c.r);\n       result.b += (m[11] * c.g);\n       result.b += (m[12] * c.b);\n       result.b += (m[13] * c.a);\n       result.b += m[14];\n\n    result.a = (m[15] * c.r);\n       result.a += (m[16] * c.g);\n       result.a += (m[17] * c.b);\n       result.a += (m[18] * c.a);\n       result.a += m[19];\n\n    vec3 rgb = mix(c.rgb, result.rgb, uAlpha);\n\n    // Premultiply alpha again.\n    rgb *= result.a;\n\n    gl_FragColor = vec4(rgb, result.a);\n}\n",ws=function(t){function e(){var e={m:new Float32Array([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0]),uAlpha:1};t.call(this,Qr,Ts,e),this.alpha=1}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={matrix:{configurable:!0},alpha:{configurable:!0}};return e.prototype._loadMatrix=function(t,e){void 0===e&&(e=!1);var i=t;e&&(this._multiply(i,this.uniforms.m,t),i=this._colorMatrix(i)),this.uniforms.m=i},e.prototype._multiply=function(t,e,i){return t[0]=e[0]*i[0]+e[1]*i[5]+e[2]*i[10]+e[3]*i[15],t[1]=e[0]*i[1]+e[1]*i[6]+e[2]*i[11]+e[3]*i[16],t[2]=e[0]*i[2]+e[1]*i[7]+e[2]*i[12]+e[3]*i[17],t[3]=e[0]*i[3]+e[1]*i[8]+e[2]*i[13]+e[3]*i[18],t[4]=e[0]*i[4]+e[1]*i[9]+e[2]*i[14]+e[3]*i[19]+e[4],t[5]=e[5]*i[0]+e[6]*i[5]+e[7]*i[10]+e[8]*i[15],t[6]=e[5]*i[1]+e[6]*i[6]+e[7]*i[11]+e[8]*i[16],t[7]=e[5]*i[2]+e[6]*i[7]+e[7]*i[12]+e[8]*i[17],t[8]=e[5]*i[3]+e[6]*i[8]+e[7]*i[13]+e[8]*i[18],t[9]=e[5]*i[4]+e[6]*i[9]+e[7]*i[14]+e[8]*i[19]+e[9],t[10]=e[10]*i[0]+e[11]*i[5]+e[12]*i[10]+e[13]*i[15],t[11]=e[10]*i[1]+e[11]*i[6]+e[12]*i[11]+e[13]*i[16],t[12]=e[10]*i[2]+e[11]*i[7]+e[12]*i[12]+e[13]*i[17],t[13]=e[10]*i[3]+e[11]*i[8]+e[12]*i[13]+e[13]*i[18],t[14]=e[10]*i[4]+e[11]*i[9]+e[12]*i[14]+e[13]*i[19]+e[14],t[15]=e[15]*i[0]+e[16]*i[5]+e[17]*i[10]+e[18]*i[15],t[16]=e[15]*i[1]+e[16]*i[6]+e[17]*i[11]+e[18]*i[16],t[17]=e[15]*i[2]+e[16]*i[7]+e[17]*i[12]+e[18]*i[17],t[18]=e[15]*i[3]+e[16]*i[8]+e[17]*i[13]+e[18]*i[18],t[19]=e[15]*i[4]+e[16]*i[9]+e[17]*i[14]+e[18]*i[19]+e[19],t},e.prototype._colorMatrix=function(t){var e=new Float32Array(t);return e[4]/=255,e[9]/=255,e[14]/=255,e[19]/=255,e},e.prototype.brightness=function(t,e){var i=[t,0,0,0,0,0,t,0,0,0,0,0,t,0,0,0,0,0,1,0];this._loadMatrix(i,e)},e.prototype.greyscale=function(t,e){var i=[t,t,t,0,0,t,t,t,0,0,t,t,t,0,0,0,0,0,1,0];this._loadMatrix(i,e)},e.prototype.blackAndWhite=function(t){this._loadMatrix([.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],t)},e.prototype.hue=function(t,e){t=(t||0)/180*Math.PI;var i=Math.cos(t),r=Math.sin(t),n=1/3,o=(0,Math.sqrt)(n),s=[i+(1-i)*n,n*(1-i)-o*r,n*(1-i)+o*r,0,0,n*(1-i)+o*r,i+n*(1-i),n*(1-i)-o*r,0,0,n*(1-i)-o*r,n*(1-i)+o*r,i+n*(1-i),0,0,0,0,0,1,0];this._loadMatrix(s,e)},e.prototype.contrast=function(t,e){var i=(t||0)+1,r=-.5*(i-1),n=[i,0,0,0,r,0,i,0,0,r,0,0,i,0,r,0,0,0,1,0];this._loadMatrix(n,e)},e.prototype.saturate=function(t,e){void 0===t&&(t=0);var i=2*t/3+1,r=-.5*(i-1),n=[i,r,r,0,0,r,i,r,0,0,r,r,i,0,0,0,0,0,1,0];this._loadMatrix(n,e)},e.prototype.desaturate=function(){this.saturate(-1)},e.prototype.negative=function(t){this._loadMatrix([-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],t)},e.prototype.sepia=function(t){this._loadMatrix([.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],t)},e.prototype.technicolor=function(t){this._loadMatrix([1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0],t)},e.prototype.polaroid=function(t){this._loadMatrix([1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],t)},e.prototype.toBGR=function(t){this._loadMatrix([0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],t)},e.prototype.kodachrome=function(t){this._loadMatrix([1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0],t)},e.prototype.browni=function(t){this._loadMatrix([.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],t)},e.prototype.vintage=function(t){this._loadMatrix([.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],t)},e.prototype.colorTone=function(t,e,i,r,n){var o=((i=i||16770432)>>16&255)/255,s=(i>>8&255)/255,a=(255&i)/255,h=((r=r||3375104)>>16&255)/255,u=(r>>8&255)/255,l=(255&r)/255,c=[.3,.59,.11,0,0,o,s,a,t=t||.2,0,h,u,l,e=e||.15,0,o-h,s-u,a-l,0,0];this._loadMatrix(c,n)},e.prototype.night=function(t,e){var i=[-2*(t=t||.1),-t,0,0,0,-t,0,t,0,0,0,t,2*t,0,0,0,0,0,1,0];this._loadMatrix(i,e)},e.prototype.predator=function(t,e){var i=[11.224130630493164*t,-4.794486999511719*t,-2.8746118545532227*t,0*t,.40342438220977783*t,-3.6330697536468506*t,9.193157196044922*t,-2.951810836791992*t,0*t,-1.316135048866272*t,-3.2184197902679443*t,-4.2375030517578125*t,7.476448059082031*t,0*t,.8044459223747253*t,0,0,0,1,0];this._loadMatrix(i,e)},e.prototype.lsd=function(t){this._loadMatrix([2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],t)},e.prototype.reset=function(){this._loadMatrix([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],!1)},i.matrix.get=function(){return this.uniforms.m},i.matrix.set=function(t){this.uniforms.m=t},i.alpha.get=function(){return this.uniforms.uAlpha},i.alpha.set=function(t){this.uniforms.uAlpha=t},Object.defineProperties(e.prototype,i),e}(Tr);ws.prototype.grayscale=ws.prototype.greyscale;var Es="attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\nuniform mat3 filterMatrix;\n\nvarying vec2 vTextureCoord;\nvarying vec2 vFilterCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n    vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n    return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n    return aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\n\nvoid main(void)\n{\n\tgl_Position = filterVertexPosition();\n\tvTextureCoord = filterTextureCoord();\n\tvFilterCoord = ( filterMatrix * vec3( vTextureCoord, 1.0)  ).xy;\n}\n",Ss="varying vec2 vFilterCoord;\nvarying vec2 vTextureCoord;\n\nuniform vec2 scale;\nuniform mat2 rotation;\nuniform sampler2D uSampler;\nuniform sampler2D mapSampler;\n\nuniform highp vec4 inputSize;\nuniform vec4 inputClamp;\n\nvoid main(void)\n{\n  vec4 map =  texture2D(mapSampler, vFilterCoord);\n\n  map -= 0.5;\n  map.xy = scale * inputSize.zw * (rotation * map.xy);\n\n  gl_FragColor = texture2D(uSampler, clamp(vec2(vTextureCoord.x + map.x, vTextureCoord.y + map.y), inputClamp.xy, inputClamp.zw));\n}\n",Is=function(t){function e(e,i){var r=new ye;e.renderable=!1,t.call(this,Es,Ss,{mapSampler:e._texture,filterMatrix:r,scale:{x:1,y:1},rotation:new Float32Array([1,0,0,1])}),this.maskSprite=e,this.maskMatrix=r,null==i&&(i=20),this.scale=new ce(i,i)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={map:{configurable:!0}};return e.prototype.apply=function(t,e,i,r){this.uniforms.filterMatrix=t.calculateSpriteMatrix(this.maskMatrix,this.maskSprite),this.uniforms.scale.x=this.scale.x,this.uniforms.scale.y=this.scale.y;var n=this.maskSprite.transform.worldTransform,o=Math.sqrt(n.a*n.a+n.b*n.b),s=Math.sqrt(n.c*n.c+n.d*n.d);0!==o&&0!==s&&(this.uniforms.rotation[0]=n.a/o,this.uniforms.rotation[1]=n.b/o,this.uniforms.rotation[2]=n.c/s,this.uniforms.rotation[3]=n.d/s),t.applyFilter(this,e,i,r)},i.map.get=function(){return this.uniforms.mapSampler},i.map.set=function(t){this.uniforms.mapSampler=t},Object.defineProperties(e.prototype,i),e}(Tr),Ps="\nattribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 v_rgbNW;\nvarying vec2 v_rgbNE;\nvarying vec2 v_rgbSW;\nvarying vec2 v_rgbSE;\nvarying vec2 v_rgbM;\n\nvarying vec2 vFragCoord;\n\nuniform vec4 inputPixel;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n    vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n    return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvoid texcoords(vec2 fragCoord, vec2 inverseVP,\n               out vec2 v_rgbNW, out vec2 v_rgbNE,\n               out vec2 v_rgbSW, out vec2 v_rgbSE,\n               out vec2 v_rgbM) {\n    v_rgbNW = (fragCoord + vec2(-1.0, -1.0)) * inverseVP;\n    v_rgbNE = (fragCoord + vec2(1.0, -1.0)) * inverseVP;\n    v_rgbSW = (fragCoord + vec2(-1.0, 1.0)) * inverseVP;\n    v_rgbSE = (fragCoord + vec2(1.0, 1.0)) * inverseVP;\n    v_rgbM = vec2(fragCoord * inverseVP);\n}\n\nvoid main(void) {\n\n   gl_Position = filterVertexPosition();\n\n   vFragCoord = aVertexPosition * outputFrame.zw;\n\n   texcoords(vFragCoord, inputPixel.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n}\n",As='varying vec2 v_rgbNW;\nvarying vec2 v_rgbNE;\nvarying vec2 v_rgbSW;\nvarying vec2 v_rgbSE;\nvarying vec2 v_rgbM;\n\nvarying vec2 vFragCoord;\nuniform sampler2D uSampler;\nuniform highp vec4 inputPixel;\n\n\n/**\n Basic FXAA implementation based on the code on geeks3d.com with the\n modification that the texture2DLod stuff was removed since it\'s\n unsupported by WebGL.\n\n --\n\n From:\n https://github.com/mitsuhiko/webgl-meincraft\n\n Copyright (c) 2011 by Armin Ronacher.\n\n Some rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are\n met:\n\n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n\n * Redistributions in binary form must reproduce the above\n copyright notice, this list of conditions and the following\n disclaimer in the documentation and/or other materials provided\n with the distribution.\n\n * The names of the contributors may not be used to endorse or\n promote products derived from this software without specific\n prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n#ifndef FXAA_REDUCE_MIN\n#define FXAA_REDUCE_MIN   (1.0/ 128.0)\n#endif\n#ifndef FXAA_REDUCE_MUL\n#define FXAA_REDUCE_MUL   (1.0 / 8.0)\n#endif\n#ifndef FXAA_SPAN_MAX\n#define FXAA_SPAN_MAX     8.0\n#endif\n\n//optimized version for mobile, where dependent\n//texture reads can be a bottleneck\nvec4 fxaa(sampler2D tex, vec2 fragCoord, vec2 inverseVP,\n          vec2 v_rgbNW, vec2 v_rgbNE,\n          vec2 v_rgbSW, vec2 v_rgbSE,\n          vec2 v_rgbM) {\n    vec4 color;\n    vec3 rgbNW = texture2D(tex, v_rgbNW).xyz;\n    vec3 rgbNE = texture2D(tex, v_rgbNE).xyz;\n    vec3 rgbSW = texture2D(tex, v_rgbSW).xyz;\n    vec3 rgbSE = texture2D(tex, v_rgbSE).xyz;\n    vec4 texColor = texture2D(tex, v_rgbM);\n    vec3 rgbM  = texColor.xyz;\n    vec3 luma = vec3(0.299, 0.587, 0.114);\n    float lumaNW = dot(rgbNW, luma);\n    float lumaNE = dot(rgbNE, luma);\n    float lumaSW = dot(rgbSW, luma);\n    float lumaSE = dot(rgbSE, luma);\n    float lumaM  = dot(rgbM,  luma);\n    float lumaMin = min(lumaM, min(min(lumaNW, lumaNE), min(lumaSW, lumaSE)));\n    float lumaMax = max(lumaM, max(max(lumaNW, lumaNE), max(lumaSW, lumaSE)));\n\n    mediump vec2 dir;\n    dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));\n    dir.y =  ((lumaNW + lumaSW) - (lumaNE + lumaSE));\n\n    float dirReduce = max((lumaNW + lumaNE + lumaSW + lumaSE) *\n                          (0.25 * FXAA_REDUCE_MUL), FXAA_REDUCE_MIN);\n\n    float rcpDirMin = 1.0 / (min(abs(dir.x), abs(dir.y)) + dirReduce);\n    dir = min(vec2(FXAA_SPAN_MAX, FXAA_SPAN_MAX),\n              max(vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX),\n                  dir * rcpDirMin)) * inverseVP;\n\n    vec3 rgbA = 0.5 * (\n                       texture2D(tex, fragCoord * inverseVP + dir * (1.0 / 3.0 - 0.5)).xyz +\n                       texture2D(tex, fragCoord * inverseVP + dir * (2.0 / 3.0 - 0.5)).xyz);\n    vec3 rgbB = rgbA * 0.5 + 0.25 * (\n                                     texture2D(tex, fragCoord * inverseVP + dir * -0.5).xyz +\n                                     texture2D(tex, fragCoord * inverseVP + dir * 0.5).xyz);\n\n    float lumaB = dot(rgbB, luma);\n    if ((lumaB < lumaMin) || (lumaB > lumaMax))\n        color = vec4(rgbA, texColor.a);\n    else\n        color = vec4(rgbB, texColor.a);\n    return color;\n}\n\nvoid main() {\n\n      vec4 color;\n\n      color = fxaa(uSampler, vFragCoord, inputPixel.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n\n      gl_FragColor = color;\n}\n',Os=function(t){function e(){t.call(this,Ps,As)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Tr),Cs="precision highp float;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform float uNoise;\nuniform float uSeed;\nuniform sampler2D uSampler;\n\nfloat rand(vec2 co)\n{\n    return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\n}\n\nvoid main()\n{\n    vec4 color = texture2D(uSampler, vTextureCoord);\n    float randomValue = rand(gl_FragCoord.xy * uSeed);\n    float diff = (randomValue - 0.5) * uNoise;\n\n    // Un-premultiply alpha before applying the color matrix. See issue #3539.\n    if (color.a > 0.0) {\n        color.rgb /= color.a;\n    }\n\n    color.r += diff;\n    color.g += diff;\n    color.b += diff;\n\n    // Premultiply alpha again.\n    color.rgb *= color.a;\n\n    gl_FragColor = color;\n}\n",Ms=function(t){function e(e,i){void 0===e&&(e=.5),void 0===i&&(i=Math.random()),t.call(this,Qr,Cs,{uNoise:0,uSeed:0}),this.noise=e,this.seed=i}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={noise:{configurable:!0},seed:{configurable:!0}};return i.noise.get=function(){return this.uniforms.uNoise},i.noise.set=function(t){this.uniforms.uNoise=t},i.seed.get=function(){return this.uniforms.uSeed},i.seed.set=function(t){this.uniforms.uSeed=t},Object.defineProperties(e.prototype,i),e}(Tr),Ds=new ye;Ue.prototype._cacheAsBitmap=!1,Ue.prototype._cacheData=!1;var Rs=function(){this.textureCacheId=null,this.originalRender=null,this.originalRenderCanvas=null,this.originalCalculateBounds=null,this.originalGetLocalBounds=null,this.originalUpdateTransform=null,this.originalHitTest=null,this.originalDestroy=null,this.originalMask=null,this.originalFilterArea=null,this.sprite=null};Object.defineProperties(Ue.prototype,{cacheAsBitmap:{get:function(){return this._cacheAsBitmap},set:function(t){var e;this._cacheAsBitmap!==t&&(this._cacheAsBitmap=t,t?(this._cacheData||(this._cacheData=new Rs),(e=this._cacheData).originalRender=this.render,e.originalRenderCanvas=this.renderCanvas,e.originalUpdateTransform=this.updateTransform,e.originalCalculateBounds=this.calculateBounds,e.originalGetLocalBounds=this.getLocalBounds,e.originalDestroy=this.destroy,e.originalContainsPoint=this.containsPoint,e.originalMask=this._mask,e.originalFilterArea=this.filterArea,this.render=this._renderCached,this.renderCanvas=this._renderCachedCanvas,this.destroy=this._cacheAsBitmapDestroy):((e=this._cacheData).sprite&&this._destroyCachedDisplayObject(),this.render=e.originalRender,this.renderCanvas=e.originalRenderCanvas,this.calculateBounds=e.originalCalculateBounds,this.getLocalBounds=e.originalGetLocalBounds,this.destroy=e.originalDestroy,this.updateTransform=e.originalUpdateTransform,this.containsPoint=e.originalContainsPoint,this._mask=e.originalMask,this.filterArea=e.originalFilterArea))}}}),Ue.prototype._renderCached=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObject(t),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._render(t))},Ue.prototype._initCachedDisplayObject=function(t){if(!this._cacheData||!this._cacheData.sprite){var e=this.alpha;this.alpha=1,t.batch.flush();var i=this.getLocalBounds().clone();if(this.filters){var r=this.filters[0].padding;i.pad(r)}i.ceil(g.RESOLUTION);var n=t.renderTexture.current,o=t.renderTexture.sourceFrame,s=t.projection.transform,a=wi.create(i.width,i.height),h="cacheAsBitmap_"+Wt();this._cacheData.textureCacheId=h,si.addToCache(a.baseTexture,h),bi.addToCache(a,h);var u=Ds;u.tx=-i.x,u.ty=-i.y,this.transform.worldTransform.identity(),this.render=this._cacheData.originalRender,t.render(this,a,!0,u,!0),t.projection.transform=s,t.renderTexture.bind(n,o),this.render=this._renderCached,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null;var l=new Kn(a);l.transform.worldTransform=this.transform.worldTransform,l.anchor.x=-i.x/i.width,l.anchor.y=-i.y/i.height,l.alpha=e,l._bounds=this._bounds,this._cacheData.sprite=l,this.transform._parentID=-1,this.parent?this.updateTransform():(this.parent=t._tempDisplayObjectParent,this.updateTransform(),this.parent=null),this.containsPoint=l.containsPoint.bind(l)}},Ue.prototype._renderCachedCanvas=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObjectCanvas(t),this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._renderCanvas(t))},Ue.prototype._initCachedDisplayObjectCanvas=function(t){if(!this._cacheData||!this._cacheData.sprite){var e=this.getLocalBounds(),i=this.alpha;this.alpha=1;var r=t.context;e.ceil(g.RESOLUTION);var n=wi.create(e.width,e.height),o="cacheAsBitmap_"+Wt();this._cacheData.textureCacheId=o,si.addToCache(n.baseTexture,o),bi.addToCache(n,o);var s=Ds;this.transform.localTransform.copyTo(s),s.invert(),s.tx-=e.x,s.ty-=e.y,this.renderCanvas=this._cacheData.originalRenderCanvas,t.render(this,n,!0,s,!1),t.context=r,this.renderCanvas=this._renderCachedCanvas,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null;var a=new Kn(n);a.transform.worldTransform=this.transform.worldTransform,a.anchor.x=-e.x/e.width,a.anchor.y=-e.y/e.height,a.alpha=i,a._bounds=this._bounds,this._cacheData.sprite=a,this.transform._parentID=-1,this.parent?this.updateTransform():(this.parent=t._tempDisplayObjectParent,this.updateTransform(),this.parent=null),this.containsPoint=a.containsPoint.bind(a)}},Ue.prototype._calculateCachedBounds=function(){this._bounds.clear(),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite._calculateBounds(),this._lastBoundsID=this._boundsID},Ue.prototype._getCachedLocalBounds=function(){return this._cacheData.sprite.getLocalBounds()},Ue.prototype._destroyCachedDisplayObject=function(){this._cacheData.sprite._texture.destroy(!0),this._cacheData.sprite=null,si.removeFromCache(this._cacheData.textureCacheId),bi.removeFromCache(this._cacheData.textureCacheId),this._cacheData.textureCacheId=null},Ue.prototype._cacheAsBitmapDestroy=function(t){this.cacheAsBitmap=!1,this.destroy(t)},Ue.prototype.name=null,Xe.prototype.getChildByName=function(t){for(var e=0;e<this.children.length;e++)if(this.children[e].name===t)return this.children[e];return null},Ue.prototype.getGlobalPosition=function(t,e){return void 0===t&&(t=new ce),void 0===e&&(e=!1),this.parent?this.parent.toGlobal(this.position,t,e):(t.x=this.position.x,t.y=this.position.y),t};var Fs="5.0.0";var Ls=function(t,e){this.uvBuffer=t,this.uvMatrix=e,this.data=null,this._bufferUpdateId=-1,this._textureUpdateId=-1,this._updateID=0};Ls.prototype.update=function(t){if(t||this._bufferUpdateId!==this.uvBuffer._updateID||this._textureUpdateId!==this.uvMatrix._updateID){this._bufferUpdateId=this.uvBuffer._updateID,this._textureUpdateId=this.uvMatrix._updateID;var e=this.uvBuffer.data;this.data&&this.data.length===e.length||(this.data=new Float32Array(e.length)),this.uvMatrix.multiplyUvs(e,this.data),this._updateID++}};var Ns=new ce,Bs=new Le,Us=function(t){function e(e,i,r,n){void 0===n&&(n=Tt.TRIANGLES),t.call(this),this.geometry=e,e.refCount++,this.shader=i,this.state=r||xr.for2d(),this.drawMode=n,this.start=0,this.size=0,this.uvs=null,this.indices=null,this.vertexData=new Float32Array(1),this.vertexDirty=0,this._transformID=-1,this.tint=16777215,this.blendMode=bt.NORMAL,this._roundPixels=g.ROUND_PIXELS,this.batchUvs=null}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={uvBuffer:{configurable:!0},verticesBuffer:{configurable:!0},material:{configurable:!0},blendMode:{configurable:!0},roundPixels:{configurable:!0},tint:{configurable:!0},texture:{configurable:!0}};return i.uvBuffer.get=function(){return this.geometry.buffers[1]},i.verticesBuffer.get=function(){return this.geometry.buffers[0]},i.material.set=function(t){this.shader=t},i.material.get=function(){return this.shader},i.blendMode.set=function(t){this.state.blendMode=t},i.blendMode.get=function(){return this.state.blendMode},i.roundPixels.set=function(t){this._roundPixels!==t&&(this._transformID=-1),this._roundPixels=t},i.roundPixels.get=function(){return this._roundPixels},i.tint.get=function(){return this.shader.tint},i.tint.set=function(t){this.shader.tint=t},i.texture.get=function(){return this.shader.texture},i.texture.set=function(t){this.shader.texture=t},e.prototype._render=function(t){var i=this.geometry.buffers[0].data;this.shader.batchable&&this.drawMode===Tt.TRIANGLES&&i.length<2*e.BATCHABLE_SIZE?this._renderToBatch(t):this._renderDefault(t)},e.prototype._renderDefault=function(t){var e=this.shader;e.alpha=this.worldAlpha,e.update&&e.update(),t.batch.flush(),e.program.uniformData.translationMatrix&&(e.uniforms.translationMatrix=this.transform.worldTransform.toArray(!0)),t.shader.bind(e),t.state.set(this.state),t.geometry.bind(this.geometry,e),t.geometry.draw(this.drawMode,this.size,this.start,this.geometry.instanceCount)},e.prototype._renderToBatch=function(t){var e=this.geometry;this.shader.uvMatrix&&(this.shader.uvMatrix.update(),this.calculateUvs()),this.calculateVertices(),this.indices=e.indexBuffer.data,this._tintRGB=this.shader._tintRGB,this._texture=this.shader.texture;var i=this.material.pluginName;t.batch.setObjectRenderer(t.plugins[i]),t.plugins[i].render(this)},e.prototype.calculateVertices=function(){var t=this.geometry,e=t.buffers[0].data;if(t.vertexDirtyId!==this.vertexDirty||this._transformID!==this.transform._worldID){this._transformID=this.transform._worldID,this.vertexData.length!==e.length&&(this.vertexData=new Float32Array(e.length));for(var i=this.transform.worldTransform,r=i.a,n=i.b,o=i.c,s=i.d,a=i.tx,h=i.ty,u=this.vertexData,l=0;l<u.length/2;l++){var c=e[2*l],d=e[2*l+1];u[2*l]=r*c+o*d+a,u[2*l+1]=n*c+s*d+h}if(this._roundPixels)for(var p=0;p<u.length;p++)u[p]=Math.round(u[p]);this.vertexDirty=t.vertexDirtyId}},e.prototype.calculateUvs=function(){var t=this.geometry.buffers[1];this.shader.uvMatrix.isSimple?this.uvs=t.data:(this.batchUvs||(this.batchUvs=new Ls(t,this.shader.uvMatrix)),this.batchUvs.update(),this.uvs=this.batchUvs.data)},e.prototype._calculateBounds=function(){this.calculateVertices(),this._bounds.addVertexData(this.vertexData,0,this.vertexData.length)},e.prototype.containsPoint=function(t){if(!this.getBounds().contains(t.x,t.y))return!1;this.worldTransform.applyInverse(t,Ns);for(var e=this.geometry.getBuffer("aVertexPosition").data,i=Bs.points,r=this.geometry.getIndex().data,n=r.length,o=4===this.drawMode?3:1,s=0;s+2<n;s+=o){var a=2*r[s],h=2*r[s+1],u=2*r[s+2];if(i[0]=e[a],i[1]=e[a+1],i[2]=e[h],i[3]=e[h+1],i[4]=e[u],i[5]=e[u+1],Bs.contains(Ns.x,Ns.y))return!0}return!1},e.prototype.destroy=function(e){t.prototype.destroy.call(this,e),this.geometry.refCount--,0===this.geometry.refCount&&this.geometry.dispose(),this.geometry=null,this.shader=null,this.state=null,this.uvs=null,this.indices=null,this.vertexData=null},Object.defineProperties(e.prototype,i),e}(Xe);Us.BATCHABLE_SIZE=100;var ks="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTextureMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n    gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n    vTextureCoord = (uTextureMatrix * vec3(aTextureCoord, 1.0)).xy;\n}\n",Xs="varying vec2 vTextureCoord;\nuniform vec4 uColor;\n\nuniform sampler2D uSampler;\n\nvoid main(void)\n{\n    gl_FragColor = texture2D(uSampler, vTextureCoord) * uColor;\n}\n",js=function(t){function e(e,i){var r={uSampler:e,alpha:1,uTextureMatrix:ye.IDENTITY,uColor:new Float32Array([1,1,1,1])};(i=Object.assign({tint:16777215,alpha:1,pluginName:"batch"},i)).uniforms&&Object.assign(r,i.uniforms),t.call(this,i.program||gr.from(ks,Xs),r),this._colorDirty=!1,this.uvMatrix=new Ir(e),this.batchable=void 0===i.program,this.pluginName=i.pluginName,this.tint=i.tint,this.alpha=i.alpha}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={texture:{configurable:!0},alpha:{configurable:!0},tint:{configurable:!0}};return i.texture.get=function(){return this.uniforms.uSampler},i.texture.set=function(t){this.uniforms.uSampler!==t&&(this.uniforms.uSampler=t,this.uvMatrix.texture=t)},i.alpha.set=function(t){t!==this._alpha&&(this._alpha=t,this._colorDirty=!0)},i.alpha.get=function(){return this._alpha},i.tint.set=function(t){t!==this._tint&&(this._tint=t,this._tintRGB=(t>>16)+(65280&t)+((255&t)<<16),this._colorDirty=!0)},i.tint.get=function(){return this._tint},e.prototype.update=function(){if(this._colorDirty){this._colorDirty=!1;var t=this.texture.baseTexture;Ht(this._tint,this._alpha,this.uniforms.uColor,t.premultiplyAlpha)}this.uvMatrix.update()&&(this.uniforms.uTextureMatrix=this.uvMatrix.mapCoord)},Object.defineProperties(e.prototype,i),e}(yr),Gs=function(t){function e(e,i,r){t.call(this);var n=new Pi(e),o=new Pi(i,!0),s=new Pi(r,!0,!0);this.addAttribute("aVertexPosition",n,2,!1,St.FLOAT).addAttribute("aTextureCoord",o,2,!1,St.FLOAT).addIndex(s),this._updateId=-1}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={vertexDirtyId:{configurable:!0}};return i.vertexDirtyId.get=function(){return this.buffers[0]._updateID},Object.defineProperties(e.prototype,i),e}(Ri),Hs=function(t){function e(e,i,r,n){void 0===e&&(e=100),void 0===i&&(i=100),void 0===r&&(r=10),void 0===n&&(n=10),t.call(this),this.segWidth=r,this.segHeight=n,this.width=e,this.height=i,this.build()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.build=function(){for(var t=this.segWidth*this.segHeight,e=[],i=[],r=[],n=this.segWidth-1,o=this.segHeight-1,s=this.width/n,a=this.height/o,h=0;h<t;h++){var u=h%this.segWidth,l=h/this.segWidth|0;e.push(u*s,l*a),i.push(u/n,l/o)}for(var c=n*o,d=0;d<c;d++){var p=d%n,f=d/n|0,v=f*this.segWidth+p,g=f*this.segWidth+p+1,m=(f+1)*this.segWidth+p,y=(f+1)*this.segWidth+p+1;r.push(v,g,m,g,y,m)}this.buffers[0].data=new Float32Array(e),this.buffers[1].data=new Float32Array(i),this.indexBuffer.data=new Uint16Array(r),this.buffers[0].update(),this.buffers[1].update(),this.indexBuffer.update()},e}(Gs),zs=function(t){function e(e,i){void 0===e&&(e=200),t.call(this,new Float32Array(4*i.length),new Float32Array(4*i.length),new Uint16Array(6*(i.length-1))),this.points=i,this.width=e,this.build()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.build=function(){var t=this.points;if(t){var e=this.getBuffer("aVertexPosition"),i=this.getBuffer("aTextureCoord"),r=this.getIndex();if(!(t.length<1)){e.data.length/4!==t.length&&(e.data=new Float32Array(4*t.length),i.data=new Float32Array(4*t.length),r.data=new Uint16Array(6*(t.length-1)));var n=i.data,o=r.data;n[0]=0,n[1]=0,n[2]=0,n[3]=1;for(var s=t.length,a=0;a<s;a++){var h=4*a,u=a/(s-1);n[h]=u,n[h+1]=0,n[h+2]=u,n[h+3]=1}for(var l=0,c=0;c<s-1;c++){var d=2*c;o[l++]=d,o[l++]=d+1,o[l++]=d+2,o[l++]=d+2,o[l++]=d+1,o[l++]=d+3}i.update(),r.update(),this.updateVertices()}}},e.prototype.updateVertices=function(){var t=this.points;if(!(t.length<1)){for(var e,i=t[0],r=0,n=0,o=this.buffers[0].data,s=t.length,a=0;a<s;a++){var h=t[a],u=4*a;n=-((e=a<t.length-1?t[a+1]:h).x-i.x),r=e.y-i.y;var l=Math.sqrt(r*r+n*n),c=this.width/2;r/=l,n/=l,r*=c,n*=c,o[u]=h.x+r,o[u+1]=h.y+n,o[u+2]=h.x-r,o[u+3]=h.y-n,i=h}this.buffers[0].update()}},e.prototype.update=function(){this.updateVertices()},e}(Gs),Vs=function(t){function e(e,i){var r=new zs(e.height,i),n=new js(e);t.call(this,r,n),this.autoUpdate=!0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._render=function(e){(this.autoUpdate||this.geometry.width!==this.shader.texture.height)&&(this.geometry.width=this.shader.texture.height,this.geometry.update()),t.prototype._render.call(this,e)},e}(Us),Ys=function(t){function e(e,i,r){var n=new Hs(e.width,e.height,i,r),o=new js(bi.WHITE);t.call(this,n,o),this.texture=e}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={texture:{configurable:!0}};return e.prototype.textureUpdated=function(){this._textureID=this.shader.texture._updateID,this.geometry.width=this.shader.texture.width,this.geometry.height=this.shader.texture.height,this.geometry.build()},i.texture.set=function(t){this.shader.texture!==t&&(this.shader.texture=t,this._textureID=-1,t.baseTexture.valid?this.textureUpdated():t.once("update",this.textureUpdated,this))},i.texture.get=function(){return this.shader.texture},e.prototype._render=function(e){this._textureID!==this.shader.texture._updateID&&this.textureUpdated(),t.prototype._render.call(this,e)},Object.defineProperties(e.prototype,i),e}(Us),Ws=function(t){function e(e,i,r,n,o){void 0===e&&(e=bi.EMPTY);var s=new Gs(i,r,n);s.getBuffer("aVertexPosition").static=!1;var a=new js(e);t.call(this,s,a,null,o),this.autoUpdate=!0}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={vertices:{configurable:!0}};return i.vertices.get=function(){return this.geometry.getBuffer("aVertexPosition").data},i.vertices.set=function(t){this.geometry.getBuffer("aVertexPosition").data=t},e.prototype._render=function(e){this.autoUpdate&&this.geometry.getBuffer("aVertexPosition").update(),t.prototype._render.call(this,e)},Object.defineProperties(e.prototype,i),e}(Us),qs=10,Zs=function(t){function e(e,i,r,n,o){t.call(this,bi.WHITE,4,4),this._origWidth=e.orig.width,this._origHeight=e.orig.height,this._width=this._origWidth,this._height=this._origHeight,this._leftWidth=void 0!==i?i:qs,this._rightWidth=void 0!==n?n:qs,this._topHeight=void 0!==r?r:qs,this._bottomHeight=void 0!==o?o:qs,this.texture=e}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={vertices:{configurable:!0},width:{configurable:!0},height:{configurable:!0},leftWidth:{configurable:!0},rightWidth:{configurable:!0},topHeight:{configurable:!0},bottomHeight:{configurable:!0}};return e.prototype.textureUpdated=function(){this._textureID=this.shader.texture._updateID,this._refresh()},i.vertices.get=function(){return this.geometry.getBuffer("aVertexPosition").data},i.vertices.set=function(t){this.geometry.getBuffer("aVertexPosition").data=t},e.prototype.updateHorizontalVertices=function(){var t=this.vertices,e=this._topHeight+this._bottomHeight,i=this._height>e?1:this._height/e;t[9]=t[11]=t[13]=t[15]=this._topHeight*i,t[17]=t[19]=t[21]=t[23]=this._height-this._bottomHeight*i,t[25]=t[27]=t[29]=t[31]=this._height},e.prototype.updateVerticalVertices=function(){var t=this.vertices,e=this._leftWidth+this._rightWidth,i=this._width>e?1:this._width/e;t[2]=t[10]=t[18]=t[26]=this._leftWidth*i,t[4]=t[12]=t[20]=t[28]=this._width-this._rightWidth*i,t[6]=t[14]=t[22]=t[30]=this._width},i.width.get=function(){return this._width},i.width.set=function(t){this._width=t,this._refresh()},i.height.get=function(){return this._height},i.height.set=function(t){this._height=t,this._refresh()},i.leftWidth.get=function(){return this._leftWidth},i.leftWidth.set=function(t){this._leftWidth=t,this._refresh()},i.rightWidth.get=function(){return this._rightWidth},i.rightWidth.set=function(t){this._rightWidth=t,this._refresh()},i.topHeight.get=function(){return this._topHeight},i.topHeight.set=function(t){this._topHeight=t,this._refresh()},i.bottomHeight.get=function(){return this._bottomHeight},i.bottomHeight.set=function(t){this._bottomHeight=t,this._refresh()},e.prototype._refresh=function(){var t=this.texture,e=this.geometry.buffers[1].data;this._origWidth=t.orig.width,this._origHeight=t.orig.height;var i=1/this._origWidth,r=1/this._origHeight;e[0]=e[8]=e[16]=e[24]=0,e[1]=e[3]=e[5]=e[7]=0,e[6]=e[14]=e[22]=e[30]=1,e[25]=e[27]=e[29]=e[31]=1,e[2]=e[10]=e[18]=e[26]=i*this._leftWidth,e[4]=e[12]=e[20]=e[28]=1-i*this._rightWidth,e[9]=e[11]=e[13]=e[15]=r*this._topHeight,e[17]=e[19]=e[21]=e[23]=1-r*this._bottomHeight,this.updateHorizontalVertices(),this.updateVerticalVertices(),this.geometry.buffers[0].update(),this.geometry.buffers[1].update()},Object.defineProperties(e.prototype,i),e}(Ys),Ks=function(t){function e(e,i){t.call(this,e[0]instanceof bi?e[0]:e[0].texture),this._textures=null,this._durations=null,this.textures=e,this._autoUpdate=!1!==i,this.animationSpeed=1,this.loop=!0,this.updateAnchor=!1,this.onComplete=null,this.onFrameChange=null,this.onLoop=null,this._currentTime=0,this.playing=!1}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={totalFrames:{configurable:!0},textures:{configurable:!0},currentFrame:{configurable:!0}};return e.prototype.stop=function(){this.playing&&(this.playing=!1,this._autoUpdate&&qe.shared.remove(this.update,this))},e.prototype.play=function(){this.playing||(this.playing=!0,this._autoUpdate&&qe.shared.add(this.update,this,Ye.HIGH))},e.prototype.gotoAndStop=function(t){this.stop();var e=this.currentFrame;this._currentTime=t,e!==this.currentFrame&&this.updateTexture()},e.prototype.gotoAndPlay=function(t){var e=this.currentFrame;this._currentTime=t,e!==this.currentFrame&&this.updateTexture(),this.play()},e.prototype.update=function(t){var e=this.animationSpeed*t,i=this.currentFrame;if(null!==this._durations){var r=this._currentTime%1*this._durations[this.currentFrame];for(r+=e/60*1e3;r<0;)this._currentTime--,r+=this._durations[this.currentFrame];var n=Math.sign(this.animationSpeed*t);for(this._currentTime=Math.floor(this._currentTime);r>=this._durations[this.currentFrame];)r-=this._durations[this.currentFrame]*n,this._currentTime+=n;this._currentTime+=r/this._durations[this.currentFrame]}else this._currentTime+=e;this._currentTime<0&&!this.loop?(this.gotoAndStop(0),this.onComplete&&this.onComplete()):this._currentTime>=this._textures.length&&!this.loop?(this.gotoAndStop(this._textures.length-1),this.onComplete&&this.onComplete()):i!==this.currentFrame&&(this.loop&&this.onLoop&&(this.animationSpeed>0&&this.currentFrame<i?this.onLoop():this.animationSpeed<0&&this.currentFrame>i&&this.onLoop()),this.updateTexture())},e.prototype.updateTexture=function(){this._texture=this._textures[this.currentFrame],this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this.uvs=this._texture._uvs.uvsFloat32,this.updateAnchor&&this._anchor.copyFrom(this._texture.defaultAnchor),this.onFrameChange&&this.onFrameChange(this.currentFrame)},e.prototype.destroy=function(e){this.stop(),t.prototype.destroy.call(this,e),this.onComplete=null,this.onFrameChange=null,this.onLoop=null},e.fromFrames=function(t){for(var i=[],r=0;r<t.length;++r)i.push(bi.from(t[r]));return new e(i)},e.fromImages=function(t){for(var i=[],r=0;r<t.length;++r)i.push(bi.from(t[r]));return new e(i)},i.totalFrames.get=function(){return this._textures.length},i.textures.get=function(){return this._textures},i.textures.set=function(t){if(t[0]instanceof bi)this._textures=t,this._durations=null;else{this._textures=[],this._durations=[];for(var e=0;e<t.length;e++)this._textures.push(t[e].texture),this._durations.push(t[e].time)}this.gotoAndStop(0),this.updateTexture()},i.currentFrame.get=function(){var t=Math.floor(this._currentTime)%this._textures.length;return t<0&&(t+=this._textures.length),t},Object.defineProperties(e.prototype,i),e}(Kn);Zr.registerPlugin("accessibility",Ge),Zr.registerPlugin("extract",pn),Zr.registerPlugin("interaction",wn),Zr.registerPlugin("particle",is),Zr.registerPlugin("prepare",_o),Zr.registerPlugin("batch",cn),Zr.registerPlugin("tilingSprite",ds),Zo.registerPlugin(fs),Zo.registerPlugin(os),So.registerPlugin(Je),So.registerPlugin(Ko);var Js={AlphaFilter:gs,BlurFilter:bs,BlurFilterPass:xs,ColorMatrixFilter:ws,DisplacementFilter:Is,FXAAFilter:Os,NoiseFilter:Ms};return t.AbstractBatchRenderer=nn,t.AbstractRenderer=qr,t.AnimatedSprite=Ks,t.AppLoaderPlugin=Ko,t.Application=So,t.Attribute=Si,t.BLEND_MODES=bt,t.BaseRenderTexture=yi,t.BaseTexture=si,t.BatchDrawCall=tn,t.BatchGeometry=sn,t.BatchPluginFactory=un,t.BatchRenderer=cn,t.BatchShaderGenerator=on,t.BitmapFontLoader=fs,t.BitmapText=ps,t.Bounds=Be,t.Buffer=Pi,t.Circle=Re,t.Container=Xe,t.CubeTexture=$r,t.DEG_TO_RAD=ge,t.DRAW_MODES=Tt,t.DisplayObject=Ue,t.ENV=_t,t.Ellipse=Fe,t.FORMATS=wt,t.FillStyle=In,t.Filter=Tr,t.Framebuffer=gi,t.GC_MODES=Ot,t.GLProgram=Fr,t.GLTexture=si,t.GRAPHICS_CURVES=Sn,t.Geometry=Ri,t.Graphics=Wn,t.GraphicsData=Pn,t.GraphicsGeometry=kn,t.GroupD8=Pe,t.LineStyle=Xn,t.Loader=Zo,t.LoaderResource=Jo,t.MIPMAP_MODES=At,t.Matrix=ye,t.Mesh=Us,t.MeshBatchUvs=Ls,t.MeshGeometry=Gs,t.MeshMaterial=js,t.NineSlicePlane=Zs,t.ObjectRenderer=Xi,t.ObservablePoint=de,t.PI_2=fe,t.PRECISION=Ct,t.ParticleContainer=Qo,t.ParticleRenderer=is,t.PlaneGeometry=Hs,t.Point=ce,t.Polygon=Le,t.Program=gr,t.Quad=Fi,t.QuadUv=Li,t.RAD_TO_DEG=ve,t.RENDERER_TYPE=xt,t.Rectangle=Ce,t.RenderTexture=wi,t.RenderTexturePool=Ei,t.Renderer=Zr,t.RopeGeometry=zs,t.RoundedRectangle=Ne,t.Runner=ze,t.SCALE_MODES=It,t.SHAPES=me,t.Shader=yr,t.SimpleMesh=Ws,t.SimplePlane=Ys,t.SimpleRope=Vs,t.Sprite=Kn,t.SpriteMaskFilter=Ar,t.Spritesheet=rs,t.SpritesheetLoader=os,t.State=xr,t.System=fi,t.TARGETS=Et,t.TEXT_GRADIENT=Jn,t.TYPES=St,t.Text=ho,t.TextMetrics=oo,t.TextStyle=to,t.Texture=bi,t.TextureLoader=qo,t.TextureMatrix=Ir,t.TextureUvs=_i,t.Ticker=qe,t.TickerPlugin=Je,t.TilingSprite=as,t.TilingSpriteRenderer=ds,t.Transform=Ae,t.UPDATE_PRIORITY=Ye,t.UniformGroup=Bi,t.VERSION="5.1.4",t.ViewableBuffer=en,t.WRAP_MODES=Pt,t.accessibility=He,t.autoDetectRenderer=Kr,t.checkMaxIfStatementsInShader=dr,t.defaultFilterVertex=Qr,t.defaultVertex=Jr,t.extract=fn,t.filters=Js,t.interaction=En,t.isMobile=v,t.prepare=Eo,t.resources=pi,t.settings=g,t.systems=Yr,t.useDeprecated=function(){var t=this;Object.defineProperties(t,{SVG_SIZE:{get:function(){return ue(Fs,"PIXI.utils.SVG_SIZE property has moved to PIXI.resources.SVGResource.SVG_SIZE"),t.SVGResource.SVG_SIZE}},TransformStatic:{get:function(){return ue(Fs,"PIXI.TransformStatic class has been removed, use PIXI.Transform"),t.Transform}},TransformBase:{get:function(){return ue(Fs,"PIXI.TransformBase class has been removed, use PIXI.Transform"),t.Transform}},TRANSFORM_MODE:{get:function(){return ue(Fs,"PIXI.TRANSFORM_MODE property has been removed"),{STATIC:0,DYNAMIC:1}}},WebGLRenderer:{get:function(){return ue(Fs,"PIXI.WebGLRenderer class has moved to PIXI.Renderer"),t.Renderer}},CanvasRenderTarget:{get:function(){return ue(Fs,"PIXI.CanvasRenderTarget class has moved to PIXI.utils.CanvasRenderTarget"),t.utils.CanvasRenderTarget}},loader:{get:function(){return ue(Fs,"PIXI.loader instance has moved to PIXI.Loader.shared"),t.Loader.shared}},FilterManager:{get:function(){return ue(Fs,"PIXI.FilterManager class has moved to PIXI.systems.FilterSystem"),t.systems.FilterSystem}}}),t.extras={},Object.defineProperties(t.extras,{TilingSprite:{get:function(){return ue(Fs,"PIXI.extras.TilingSprite class has moved to PIXI.TilingSprite"),t.TilingSprite}},TilingSpriteRenderer:{get:function(){return ue(Fs,"PIXI.extras.TilingSpriteRenderer class has moved to PIXI.TilingSpriteRenderer"),t.TilingSpriteRenderer}},AnimatedSprite:{get:function(){return ue(Fs,"PIXI.extras.AnimatedSprite class has moved to PIXI.AnimatedSprite"),t.AnimatedSprite}},BitmapText:{get:function(){return ue(Fs,"PIXI.extras.BitmapText class has moved to PIXI.BitmapText"),t.BitmapText}}}),Object.defineProperties(t.utils,{getSvgSize:{get:function(){return ue(Fs,"PIXI.utils.getSvgSize function has moved to PIXI.resources.SVGResource.getSize"),t.SVGResource.getSize}}}),t.mesh={},Object.defineProperties(t.mesh,{Mesh:{get:function(){return ue(Fs,"PIXI.mesh.Mesh class has moved to PIXI.SimpleMesh"),t.SimpleMesh}},NineSlicePlane:{get:function(){return ue(Fs,"PIXI.mesh.NineSlicePlane class has moved to PIXI.NineSlicePlane"),t.NineSlicePlane}},Plane:{get:function(){return ue(Fs,"PIXI.mesh.Plane class has moved to PIXI.SimplePlane"),t.SimplePlane}},Rope:{get:function(){return ue(Fs,"PIXI.mesh.Rope class has moved to PIXI.SimpleRope"),t.SimpleRope}},RawMesh:{get:function(){return ue(Fs,"PIXI.mesh.RawMesh class has moved to PIXI.Mesh"),t.Mesh}},CanvasMeshRenderer:{get:function(){return ue(Fs,"PIXI.mesh.CanvasMeshRenderer class has moved to PIXI.CanvasMeshRenderer"),t.CanvasMeshRenderer}},MeshRenderer:{get:function(){return ue(Fs,"PIXI.mesh.MeshRenderer class has moved to PIXI.MeshRenderer"),t.MeshRenderer}}}),t.particles={},Object.defineProperties(t.particles,{ParticleContainer:{get:function(){return ue(Fs,"PIXI.particles.ParticleContainer class has moved to PIXI.ParticleContainer"),t.ParticleContainer}},ParticleRenderer:{get:function(){return ue(Fs,"PIXI.particles.ParticleRenderer class has moved to PIXI.ParticleRenderer"),t.ParticleRenderer}}}),t.ticker={},Object.defineProperties(t.ticker,{Ticker:{get:function(){return ue(Fs,"PIXI.ticker.Ticker class has moved to PIXI.Ticker"),t.Ticker}},shared:{get:function(){return ue(Fs,"PIXI.ticker.shared instance has moved to PIXI.Ticker.shared"),t.Ticker.shared}}}),t.loaders={},Object.defineProperties(t.loaders,{Loader:{get:function(){return ue(Fs,"PIXI.loaders.Loader class has moved to PIXI.Loader"),t.Loader}},Resource:{get:function(){return ue(Fs,"PIXI.loaders.Resource class has moved to PIXI.LoaderResource"),t.LoaderResource}},bitmapFontParser:{get:function(){return ue(Fs,"PIXI.loaders.bitmapFontParser function has moved to PIXI.BitmapFontLoader.use"),t.BitmapFontLoader.use}},parseBitmapFontData:{get:function(){return ue(Fs,"PIXI.loaders.parseBitmapFontData function has moved to PIXI.BitmapFontLoader.parse"),t.BitmapFontLoader.parse}},spritesheetParser:{get:function(){return ue(Fs,"PIXI.loaders.spritesheetParser function has moved to PIXI.SpritesheetLoader.use"),t.SpritesheetLoader.use}},getResourcePath:{get:function(){return ue(Fs,"PIXI.loaders.getResourcePath property has moved to PIXI.SpritesheetLoader.getResourcePath"),t.SpritesheetLoader.getResourcePath}}}),t.Loader.addPixiMiddleware=function(e){return ue(Fs,"PIXI.loaders.Loader.addPixiMiddleware function is deprecated, use PIXI.loaders.Loader.registerPlugin"),t.loaders.Loader.registerPlugin({use:e()})},Object.defineProperty(t.extract,"WebGLExtract",{get:function(){return ue(Fs,"PIXI.extract.WebGLExtract method has moved to PIXI.extract.Extract"),t.extract.Extract}}),Object.defineProperty(t.prepare,"WebGLPrepare",{get:function(){return ue(Fs,"PIXI.prepare.WebGLPrepare class has moved to PIXI.prepare.Prepare"),t.prepare.Prepare}}),t.Container.prototype._renderWebGL=function(t){ue(Fs,"PIXI.Container._renderWebGL method has moved to PIXI.Container._render"),this._render(t)},t.Container.prototype.renderWebGL=function(t){ue(Fs,"PIXI.Container.renderWebGL method has moved to PIXI.Container.render"),this.render(t)},t.DisplayObject.prototype.renderWebGL=function(t){ue(Fs,"PIXI.DisplayObject.renderWebGL method has moved to PIXI.DisplayObject.render"),this.render(t)},t.Container.prototype.renderAdvancedWebGL=function(t){ue(Fs,"PIXI.Container.renderAdvancedWebGL method has moved to PIXI.Container.renderAdvanced"),this.renderAdvanced(t)},Object.defineProperties(t.settings,{TRANSFORM_MODE:{get:function(){return ue(Fs,"PIXI.settings.TRANSFORM_MODE property has been removed"),0},set:function(){ue(Fs,"PIXI.settings.TRANSFORM_MODE property has been removed")}}});var e=t.BaseTexture;e.prototype.loadSource=function(e){ue(Fs,"PIXI.BaseTexture.loadSource method has been deprecated");var i=t.resources.autoDetectResource(e);i.internal=!0,this.setResource(i),this.update()},Object.defineProperties(e.prototype,{hasLoaded:{get:function(){return ue(Fs,"PIXI.BaseTexture.hasLoaded property has been removed, use PIXI.BaseTexture.valid"),this.valid}},imageUrl:{get:function(){return ue(Fs,"PIXI.BaseTexture.imageUrl property has been removed, use PIXI.BaseTexture.resource.url"),this.resource&&this.resource.url},set:function(t){ue(Fs,"PIXI.BaseTexture.imageUrl property has been removed, use PIXI.BaseTexture.resource.url"),this.resource&&(this.resource.url=t)}},source:{get:function(){return ue(Fs,"PIXI.BaseTexture.source property has been moved, use `PIXI.BaseTexture.resource.source`"),this.resource&&this.resource.source},set:function(t){ue(Fs,"PIXI.BaseTexture.source property has been moved, use `PIXI.BaseTexture.resource.source` if you want to set HTMLCanvasElement. Otherwise, create new BaseTexture."),this.resource&&(this.resource.source=t)}}}),e.fromImage=function(t,i,r,n){ue(Fs,"PIXI.BaseTexture.fromImage method has been replaced with PIXI.BaseTexture.from");var o={scale:n,crossorigin:i};return e.from(t,{scaleMode:r,resourceOptions:o})},e.fromCanvas=function(t,i){return ue(Fs,"PIXI.BaseTexture.fromCanvas method has been replaced with PIXI.BaseTexture.from"),e.from(t,{scaleMode:i})},e.fromSVG=function(t,i,r,n){ue(Fs,"PIXI.BaseTexture.fromSVG method has been replaced with PIXI.BaseTexture.from");var o={scale:n,crossorigin:i};return e.from(t,{scaleMode:r,resourceOptions:o})},t.Point.prototype.copy=function(t){return ue(Fs,"PIXI.Point.copy method has been replaced with PIXI.Point.copyFrom"),this.copyFrom(t)},t.ObservablePoint.prototype.copy=function(t){return ue(Fs,"PIXI.ObservablePoint.copy method has been replaced with PIXI.ObservablePoint.copyFrom"),this.copyFrom(t)},t.Rectangle.prototype.copy=function(t){return ue(Fs,"PIXI.Rectangle.copy method has been replaced with PIXI.Rectangle.copyFrom"),this.copyFrom(t)},t.Matrix.prototype.copy=function(t){return ue(Fs,"PIXI.Matrix.copy method has been replaced with PIXI.Matrix.copyTo"),this.copyTo(t)},t.systems.StateSystem.prototype.setState=function(t){return ue("v5.1.0","StateSystem.setState has been renamed to StateSystem.set"),this.set(t)},Object.assign(t.systems.FilterSystem.prototype,{getRenderTarget:function(t,e){return ue(Fs,"PIXI.FilterManager.getRenderTarget method has been replaced with PIXI.systems.FilterSystem#getFilterTexture"),this.getFilterTexture(e)},returnRenderTarget:function(t){ue(Fs,"PIXI.FilterManager.returnRenderTarget method has been replaced with PIXI.systems.FilterSystem.returnFilterTexture"),this.returnFilterTexture(t)},calculateScreenSpaceMatrix:function(t){ue(Fs,"PIXI.systems.FilterSystem.calculateScreenSpaceMatrix method is removed, use `(vTextureCoord * inputSize.xy) + outputFrame.xy` instead");var e=t.identity(),i=this.activeState,r=i.sourceFrame,n=i.destinationFrame;return e.translate(r.x/n.width,r.y/n.height),e.scale(n.width,n.height),e},calculateNormalizedScreenSpaceMatrix:function(t){ue(Fs,"PIXI.systems.FilterManager.calculateNormalizedScreenSpaceMatrix method is removed, use `((vTextureCoord * inputSize.xy) + outputFrame.xy) / outputFrame.zw` instead.");var e=this.activeState,i=e.sourceFrame,r=e.destinationFrame,n=t.identity();n.translate(i.x/r.width,i.y/r.height);var o=r.width/i.width,s=r.height/i.height;return n.scale(o,s),n}}),Object.defineProperties(t.RenderTexture.prototype,{sourceFrame:{get:function(){return ue(Fs,"PIXI.RenderTexture.sourceFrame property has been removed"),this.filterFrame}},size:{get:function(){return ue(Fs,"PIXI.RenderTexture.size property has been removed"),this._frame}}});var i=function(t){function e(e,i,r,n){ue(Fs,"PIXI.filters.BlurXFilter class is deprecated, use PIXI.filters.BlurFilterPass"),t.call(this,!0,e,i,r,n)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(t.filters.BlurFilterPass),r=function(t){function e(e,i,r,n){ue(Fs,"PIXI.filters.BlurYFilter class is deprecated, use PIXI.filters.BlurFilterPass"),t.call(this,!1,e,i,r,n)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(t.filters.BlurFilterPass);Object.assign(t.filters,{BlurXFilter:i,BlurYFilter:r});var n=t.Sprite,o=t.Texture,s=t.Graphics;function a(t,e,i,r){return ue(Fs,"PIXI.Sprite."+t+" method is deprecated, use PIXI.Sprite.from"),n.from(e,{resourceOptions:{scale:r,crossorigin:i}})}function h(t,e,i,r){return ue(Fs,"PIXI.Texture."+t+" method is deprecated, use PIXI.Texture.from"),o.from(e,{resourceOptions:{scale:r,crossorigin:i}})}s.prototype.generateCanvasTexture||(s.prototype.generateCanvasTexture=function(){ue(Fs,'PIXI.Graphics.generateCanvasTexture method is only available in "pixi.js-legacy"')}),Object.defineProperty(t.Graphics.prototype,"graphicsData",{get:function(){return ue(Fs,"PIXI.Graphics.graphicsData property is deprecated, use PIXI.Graphics.geometry.graphicsData"),this.geometry.graphicsData}}),n.fromImage=a.bind(null,"fromImage"),n.fromSVG=a.bind(null,"fromSVG"),n.fromCanvas=a.bind(null,"fromCanvas"),n.fromVideo=a.bind(null,"fromVideo"),n.fromFrame=a.bind(null,"fromFrame"),o.fromImage=h.bind(null,"fromImage"),o.fromSVG=h.bind(null,"fromSVG"),o.fromCanvas=h.bind(null,"fromCanvas"),o.fromVideo=h.bind(null,"fromVideo"),o.fromFrame=h.bind(null,"fromFrame"),Object.defineProperty(t.AbstractRenderer.prototype,"autoResize",{get:function(){return ue(Fs,"PIXI.AbstractRenderer.autoResize property is deprecated, use PIXI.AbstractRenderer.autoDensity"),this.autoDensity},set:function(t){ue(Fs,"PIXI.AbstractRenderer.autoResize property is deprecated, use PIXI.AbstractRenderer.autoDensity"),this.autoDensity=t}}),Object.defineProperty(t.Renderer.prototype,"textureManager",{get:function(){return ue(Fs,"PIXI.Renderer.textureManager property is deprecated, use PIXI.Renderer.texture"),this.texture}}),t.utils.mixins={mixin:function(){ue(Fs,"PIXI.utils.mixins.mixin function is no longer available")},delayMixin:function(){ue(Fs,"PIXI.utils.mixins.delayMixin function is no longer available")},performMixins:function(){ue(Fs,"PIXI.utils.mixins.performMixins function is no longer available")}}},t.utils=le,t}({});PIXI.useDeprecated();
+//# sourceMappingURL=pixi.min.js.map
diff --git a/js/utils.js b/js/utils.js
index 5c2ad3d..d2db017 100644
--- a/js/utils.js
+++ b/js/utils.js
@@ -100,6 +100,7 @@ utils.clean = function(data) {
 
 	data.forEach(function(d,i){
 		d.search = Object.keys(d).map(function(e) { return d[e] }).join(' - ').toUpperCase()
+		// d.search = d._layerId
 		d.i = i;
 		d.keywords = _(d.keywords)
 		  .chain()
@@ -123,12 +124,14 @@ utils.clean = function(data) {
 		d.loaded = false;
 		d.type = "image";
 		d.page = 0
-		d.scaleFactor = 0.9
+		d.scaleFactor = 0.5
 		d.x = i;
 		d.y = i;
 		d.order = i;
 	});
 
+	data.sort(function(a,b){ return +a._layerId - b._layerId })
+
 }
 
 utils.simulateLargeDatasets = function(data){
diff --git a/js/viz.js b/js/viz.js
index 137d7fe..a0128cb 100644
--- a/js/viz.js
+++ b/js/viz.js
@@ -72,20 +72,34 @@ function init() {
 						canvas.addTsneData(tsne)
 					})
 				}
-
+				var i = 0
+				var allTextures = {}
 				LoaderSprites()
 					.progress(function (textures) {
-						Object.keys(textures).forEach(function (id) {
-							data
-								.filter(function (d) {
-									return d.id === id
-								})
-								.forEach(function (d) {
-									d.sprite.texture = textures[id]
-								})
-						})
+						console.log("textures", textures)
+						allTextures = { ...textures, ...allTextures }
+						// Object.keys(textures).forEach(function (id) {
+						// 	if(i++ % 1000 == 0) console.log(i)
+						// 	var d = data
+						// 		.find(function (d) {
+						// 			return d.id === id
+						// 		})
+						// 	// if(d) d.sprite.texture = textures[id]
+						// 	// if(!d) console.log(id)
+						// 		// .forEach(function (d) {
+						// 		// 	d.sprite.texture = textures[id]
+						// 		// })
+						// })
 						canvas.wakeup()
 					})
+					.done(function(){
+						console.log(allTextures)
+						data.forEach(d => {
+							// if(!allTextures[d.id]) console.log(d.id)
+							d.sprite.texture = allTextures[d.id]
+							if(i++ % 10000 == 0) console.log(i)
+						})
+					})
 					.load(config.loader.textures.medium.url)
 			});
 		});
-- 
GitLab